Shift Pattern Calculator
Build a rotating shift pattern — morning, afternoon, night, day or off — and get a colour-coded calendar for up to a year, with public holidays marked. Print it or save a PDF to pin on the wall.
Calculator
Shift calendar
4-on-4-off · 8-day cycle · —
About this calculator
This calculator turns a rotating shift pattern into a colour-coded calendar you can read at a glance, print, or save as a PDF. Pick a ready-made rotation — 4-on-4-off, Panama (2-2-3), DuPont, Continental three-shift, 5-on/2-off or 2-2-2 — or build your own from scratch, then set the date your cycle starts and how many months to show (up to a full year). Every day is shaded and labelled by its shift type — Morning, Afternoon, Night, Day or Off — and public holidays for any of 200+ countries are overlaid so you can see at once which holidays fall on a working shift.
How to read your results
The calendar is the centrepiece: each cell is coloured by that day's shift type, with a one-letter label (M / A / N / D) for work days and a green dot on public holidays. The legend maps every colour to its shift name, typical clock times and hours. Beneath the legend, the totals strip sums the whole window — work days, off days, total hours, the average hours per week, the number of holidays in range, and how many of those holidays land on a scheduled shift. Each month also carries its own per-type tally in the footer. The average hours per week is the total hours worked divided by the number of weeks in the window (days ÷ 7), so a 4-on-4-off rota of 12-hour shifts reads 42 hours a week.
How it's calculated
The engine first concatenates the ordered segments into a per-day cycle array of length C. For each day in the requested window it computes the whole-day offset D from the anchor (start) date using Julian Day Numbers — integer day arithmetic that is immune to daylight-saving — and resolves the cycle position p = (((D + offset) % C) + C) % C, which wraps correctly for dates before the anchor (negative D). The shift type at position p is the base classification. The public-holiday set for the chosen country is then overlaid: a holiday on a scheduled shift is reclassified to Off only when "treat as off" is enabled, but is always flagged. Work days are days whose effective type is not Off; total hours sum the per-type hours over those days; and the average hours per week is total hours × 7 ÷ days in the window. Days are grouped into calendar months for the per-month tallies, and the whole window is summed for the totals strip. The calculation is a pure function with no clock or network access — "today" and the holiday set are resolved by the page and passed in — so the same inputs always produce the same calendar.
Worked example
Choose the 4-on-4-off preset (Day shifts of 12 hours), set the start date to the first day of your rotation, and show 1 month.
The cycle is 8 days long — four 12-hour day shifts followed by four days off — so it repeats roughly 3¾ times across a 31-day month. The totals show about 42 hours per week on average, and any public holiday that falls on one of your day shifts is flagged so you can plan holiday pay or swap the shift.
Frequently asked questions
How does the rotation model work?
A rotation is an ordered list of segments — each segment is a shift type repeated for a number of days, like "Day ×4, Off ×4". The segments concatenate into a cycle of length C and repeat from your start date. For any calendar day, the calculator counts the whole days since the start date (call it D) and finds the position in the cycle with p = (((D + offset) % C) + C) % C; the shift for that day is the type at position p. Day counts are computed from Julian Day Numbers, so daylight-saving changes never shift a day.
What is the cycle offset for?
Leave it at 0 if your start date is day 1 of the rotation. If today is, say, the third day of your cycle and you would rather anchor the calendar to today, set the offset to 2 to roll the pattern forward to the correct position. The offset shifts where in the cycle the start date lands without changing the cycle itself.
How are public holidays handled?
Holidays for the country you choose are overlaid from the same per-country data the Working Days Counter uses, and each holiday is marked with a green dot. By default a holiday that falls on a working shift stays a work day but is flagged — useful for planning holiday pay. Turn on "treat a public holiday as a day off" and any holiday landing on a shift is counted as off instead, which is handy when the holiday is a paid day off.
Are the shift hours and clock times fixed?
No. The clock bands shown in the legend — Morning 06:00–14:00, Afternoon 14:00–22:00, Night 22:00–06:00 and Day 07:00–19:00 — are typical values and are employer-adjustable; presets set Day and Night to 12 hours for 4-on-4-off, Panama and DuPont, and to 8 hours for the three-shift and 5-on/2-off patterns. The cycle lengths and the 4-on-4-off, 2-2-3 and DuPont structures are drawn from the cited reference, while the precise per-day Day/Night ordering inside DuPont and the "Pitman = Panama" labelling are common industry conventions rather than cited facts.
Can I share or reprint a schedule later?
Yes. The entire rota — pattern, segments, start date, offset, months, week start, holiday country and the holiday-as-off setting — is stored in the page URL, so the share link and the printed "Scan to revisit" QR code both reopen the exact schedule. Nothing is stored on a server and no account is needed.
Sources
Reviewed by the YouCalc Team · Last reviewed
Spot a translation issue, a calculation issue, or have a suggestion? Let us know.