Date and work guide

How to Calculate a Rotating Shift Schedule

Generate repeating work and off-day patterns, handle overnight shifts and keep calendar arithmetic separate from fatigue and employment requirements.

Purpose: Map dates onto a repeating work/off cycle while keeping overnight duration, exceptions and fatigue controls separate.

3 min read 5 practical sectionsPublished by Nexynto ToolsSources reviewed 26 Nov 2026Updated 26 Nov 2026
Use the methodOpen calculator
Day and night calendar cycle beside a clock in a round-the-clock operations workspace
Editorial illustration of a repeating day-and-night rota. The exact schedule comes from the verified cycle start and pattern.
1work2work3work4work5off6off7off8offCycle position = whole days since the verified start date mod 8
Illustrative 4-on/4-off cycle. Calendar arithmetic does not determine whether a rota is safe or lawful.
Direct answer

What you need to know

Define the cycle as consecutive work days plus off days. For each calendar date, calculate days since the cycle start modulo cycle length; positions below the work-day count are scheduled shifts.

Formula variables and scope

d
Whole days since verified cycle start
W
Consecutive work days
O
Consecutive off days
p
Cycle position, d mod (W + O)

Worked examples

Four-on/four-off

Inputs: Cycle start is work day 1; target is 10 days later

  1. Cycle length = 8
  2. 10 mod 8 = 2

Result: Target falls on work day 3 of the repeated cycle.

Limitation: The start date and local calendar date must be verified.

Overnight shift duration

Inputs: 22:00 to 06:00; 30-minute unpaid break

  1. Gross duration = 8 hours
  2. Subtract 0.5 hour

Result: Net modeled duration = 7.5 hours.

Limitation: Schedule position does not determine payroll or legal entitlement.

Define one complete cycle

A 4-on/4-off rotation has eight positions. Anchor position zero to a verified cycle-start date; otherwise every generated date can be shifted even when the repeating arithmetic is correct.

Use modulo arithmetic

Count whole calendar days from the start date and take the remainder after division by cycle length. In a 4-on/4-off pattern, remainders zero through three are work days.

Handle overnight time separately

A 19:00 start with a twelve-hour duration ends at 07:00 the following date. Elapsed hours must explicitly cross midnight.

Keep exceptions visible

Leave, swaps, training and holidays interrupt a base pattern. Generate the repeating rota first, then reconcile exceptions against the actual roster.

Treat fatigue as a safety issue

NIOSH explains that night and extended schedules can disrupt sleep and contribute to fatigue. A rotation calculator identifies dates; it does not determine whether a schedule is safe, lawful or suitable.

PatternCycle lengthCalendar interpretation
4 on / 4 off8 daysPositions 0–3 work
2 on / 2 off4 daysPositions 0–1 work

Put the method into practice

Use the related calculator with your own verified values and review the visible breakdown.

Open calculator

Related calculators

Frequently asked questions

What should I verify about define one complete cycle?

A 4-on/4-off rotation has eight positions. Anchor position zero to a verified cycle-start date; otherwise every generated date can be shifted even when the repeating arithmetic is correct.

What should I verify about use modulo arithmetic?

Count whole calendar days from the start date and take the remainder after division by cycle length. In a 4-on/4-off pattern, remainders zero through three are work days.

What should I verify about handle overnight time separately?

A 19:00 start with a twelve-hour duration ends at 07:00 the following date. Elapsed hours must explicitly cross midnight.

What should I verify about keep exceptions visible?

Leave, swaps, training and holidays interrupt a base pattern. Generate the repeating rota first, then reconcile exceptions against the actual roster.

References and scope

This guide is educational and does not replace current official guidance, a contract, manufacturer instructions, approved plans, lender disclosures, registrar records or qualified professional advice.