How to use the schedule fairness score calculator
- Paste one line per shift worked: the person, a comma, and the kind of shift such as Weekend, Night or Holiday. The kind is optional.
- Add the names of other people with no shifts if they should count in the comparison.
- Read the evenness score, the Gini coefficient, the Jain index and the spread for all shifts together.
- Check the table of shifts by person, with each person's difference from the average, and the evenness of each kind of shift.
Formula
Gini = sum over all pairs of |xi - xj| / (2 x n x total shifts)
evenness = 1 - Gini
Jain index = (total shifts) squared / (people x sum of each person's shifts squared)
coefficient of variation = standard deviation of the counts / the average count
Gini is 0 when everyone has the same number of shifts and grows toward 1 as the shifts concentrate in a few people. The Jain index is 1 when counts are equal and 1 divided by the number of people when one person has everything.
Four people, three kinds of shift
Sixteen shifts are shared by Ana (4), Ben (5), Cara (4) and Dev (3). The average is 4.00, the Gini coefficient is 0.094, so the evenness score is 0.906, the Jain index is 0.970 and the coefficient of variation is 17.7 percent.
Looking by kind of shift tells a different story. Weekend shifts are 2, 3, 0 and 1: a Gini of 0.417 and a Jain index of 0.643, the least even kind. Night shifts are 2, 1, 3 and 1 (Gini 0.250) and holiday shifts 0, 1, 1 and 1 (Gini 0.250). Ben is one shift above the average overall, and Dev one below. If the people differ in how many shifts they are due, the counts alone do not show fairness.
Totals can hide unevenness
An even total does not mean an even load. A person can have the average number of shifts and still take all the nights, or none of the weekends. Looking at each kind of shift separately finds those gaps. The page therefore shows evenness for all shifts and for each kind, and names the kind that is least even. Compare the counts with how the work was assigned: requests, availability, contracts and part-time hours all explain differences.
To build a repeating pattern, use the shift rotation schedule generator. For a fair on-call order, see the on-call rotation generator, and to check coverage, the shift coverage calculator. For staggered breaks, the staggered break schedule generator helps.
Reading the scores with care
Gini and Jain describe how counts are spread. They do not say whether a spread is acceptable, and with small numbers they move a lot: one extra shift for one person changes them noticeably. A score of 1 on the evenness scale means equal counts, not equal burden, since a night shift and a day shift are counted the same. Use the numbers to start a conversation or to check a rota, and add context that counts cannot hold. The calculation uses only the lines you paste.
Assumptions and limits
- Each line is one shift. Two lines with the same person and kind count as two shifts.
- Everyone is compared equally. Differences in contract, hours or availability are not modeled.
- People with no shifts count as zero only if they appear in the second box or in a line for another kind.
- Up to 20,000 lines, 300 people and any number of kinds of shift are read. Names and kinds are shortened to 40 and 30 characters.
Frequently asked questions
What is a Gini coefficient?
It is a number from 0 to 1 that measures how unequally something is shared. 0 means everyone has the same amount. It is best known for income, and here it is applied to shift counts.
What is the Jain index?
It is another evenness measure, equal to 1 when all counts are the same and falling toward 1 divided by the number of people as one person takes everything. It is often used for sharing in computing, and works well for small groups.
How do I include someone who has no shifts?
Put their name in the second box. Without it they do not appear, because only people named in the shift lines are counted. Leaving out people with none makes a schedule look fairer than it is.
Does a high score mean the schedule is fair?
Only that the counts are close. Fairness can depend on requests, contracts and the effort of each shift, which the page cannot see. Use it as one input to a conversation, not a verdict.