Shift Length Calculator
Calculate the length of a work shift including overnight shifts that cross midnight. Enter values for instant results with step-by-step formulas.
Calculator
Adjust values & calculateFormula
The calculator subtracts the start time from the end time to get gross shift duration. For overnight shifts where the end time is before the start time, 24 hours is added. Break minutes are then subtracted to yield net working hours. The result is shown in both hours:minutes and decimal format.
Last reviewed: December 2025
Worked Examples
Example 1: Standard Day Shift
Example 2: Overnight Nursing Shift
Background & Theory
The Shift Length Calculator applies the following established principles and formulas. Date and time calculations underpin a vast range of applications from financial settlement to scheduling and age verification. The complexity arises because civil timekeeping uses irregular units: months have 28, 29, 30, or 31 days; years have 365 or 366 days; hours, minutes, and seconds use base-60 arithmetic; and time zones introduce offsets ranging from -12:00 to +14:00 relative to UTC. The Gregorian calendar's leap year rule is a compound condition: a year is a leap year if it is divisible by 4, except for century years, which must be divisible by 400. Thus 1900 was not a leap year but 2000 was. This rule keeps the calendar synchronized with the solar year to within about 26 seconds per year. For algorithmic date calculations, the Julian Day Number provides a continuous integer count of days since January 1, 4713 BCE, eliminating the irregularity of calendar months and making interval arithmetic straightforward. The Unix epoch, by contrast, counts seconds since 00:00:00 UTC on January 1, 1970, and is the basis of POSIX time used in most computing systems. ISO 8601 standardizes date and time representation as YYYY-MM-DD and combined datetime as YYYY-MM-DDTHH:MM:SSยฑHH:MM, ensuring unambiguous machine-readable interchange across locales that would otherwise differ in day/month/year ordering. Business day calculation requires excluding weekends and, optionally, a jurisdiction-specific list of public holidays. Duration calculations expressed in years, months, and days must account for the variable length of months, making them non-commutative: the interval from January 31 to February 28 is different from the interval from February 28 to March 31. Age calculation algorithms must handle the edge case of birthdays on February 29 and ensure that a person born on December 31 is not counted as one year older on January 1 of the following year until the clock passes midnight. Zeller's Congruence provides a closed-form formula to determine the day of the week for any Gregorian or Julian calendar date using only integer arithmetic.
History
The history behind the Shift Length Calculator traces back through the following developments. The need to track time and predict astronomical events gave rise to calendrical systems independently across many civilizations. The Babylonians, around 2000 BCE, developed a lunisolar calendar with 12 months of alternating 29 and 30 days, inserting an intercalary month periodically to keep pace with the solar year. They also divided the day into 24 hours and the hour into 60 minutes, a sexagesimal convention that persists in every modern clock. The Egyptian civil calendar used 12 months of exactly 30 days plus five epagomenal days, totaling 365 days. Though simple for administrative purposes, it drifted against the solar year by one day every four years. Julius Caesar, advised by the Egyptian astronomer Sosigenes, reformed the Roman calendar in 45 BCE. The Julian calendar introduced a 365-day year with a leap day every four years, a system that served Europe for over sixteen centuries. By the 16th century, the accumulated error of the Julian calendar had shifted the spring equinox ten days from its ecclesiastically mandated date, disrupting the calculation of Easter. Pope Gregory XIII commissioned the calendar reform that bears his name, and the Gregorian calendar was introduced in Catholic countries in October 1582. The transition required skipping ten days: October 4 was followed by October 15. Protestant and Orthodox countries adopted the reform slowly; Britain and its colonies switched in 1752, Russia not until 1918, and Greece in 1923. The expansion of railways in the 1840s created an urgent practical problem: each city operated on its own local solar time, making train timetables impossible to coordinate. British railways adopted Greenwich Mean Time as a standard in 1847. The International Meridian Conference of 1884 in Washington formalized the prime meridian at Greenwich and established the global framework of 24 time zones. Daylight saving time was first adopted nationally during World War I to reduce coal consumption. The development of atomic clocks after World War II led to the definition of Coordinated Universal Time (UTC) in 1960, accurate to nanoseconds. The Y2K problem of 1999-2000 demonstrated that two-digit year storage in legacy systems could cause widespread failures, prompting a global remediation effort costing an estimated 300 to 600 billion dollars.
Frequently Asked Questions
Formula
Net Hours = (End Time - Start Time) - Break Time
The calculator subtracts the start time from the end time to get gross shift duration. For overnight shifts where the end time is before the start time, 24 hours is added. Break minutes are then subtracted to yield net working hours. The result is shown in both hours:minutes and decimal format.
Worked Examples
Example 1: Standard Day Shift
Problem: A worker starts at 8:00 AM and ends at 4:30 PM with a 30-minute lunch break. What is the net working time?
Solution: Start: 8:00 AM = 480 minutes from midnight\nEnd: 4:30 PM = 990 minutes from midnight\nGross time: 990 - 480 = 510 minutes = 8 hours 30 minutes\nBreak: 30 minutes\nNet time: 510 - 30 = 480 minutes = 8 hours 0 minutes\nDecimal: 8.00 hours
Result: Gross: 8h 30m | Net: 8h 00m (8.00 decimal hours) | Day shift
Example 2: Overnight Nursing Shift
Problem: A nurse works from 7:00 PM to 7:30 AM with a 45-minute break. Calculate the shift length and pay at $35/hour.
Solution: Start: 7:00 PM = 1140 minutes\nEnd: 7:30 AM = 450 minutes (next day)\nGross time: (450 + 1440) - 1140 = 750 minutes = 12 hours 30 minutes\nBreak: 45 minutes\nNet time: 750 - 45 = 705 minutes = 11 hours 45 minutes = 11.75 decimal hours\nPay: 11.75 x $35.00 = $411.25
Result: Gross: 12h 30m | Net: 11h 45m (11.75 hrs) | Shift pay: $411.25 | Overnight shift
Frequently Asked Questions
What is the difference between gross and net shift hours?
Gross shift hours represent the total time from your clock-in to your clock-out, including any break time. Net shift hours subtract your break time from the gross total to show your actual working hours. For payroll purposes, most employers pay based on net hours since break time is typically unpaid for non-exempt workers. For example, a shift from 8 AM to 5 PM is 9 gross hours, but with a 60-minute unpaid lunch break, the net working time is 8 hours. The distinction matters for accurate pay calculations.
How does the calculator determine if a shift is a night shift?
The calculator flags a shift as a night shift based on simple time-of-day heuristics. If the start time is at 6 PM or later, if the end time is at 6 AM or earlier, or if the shift crosses midnight (overnight), it is classified as a night shift. This classification is informational and helps you identify whether night shift differentials might apply to your pay. Many employers offer a premium of $1 to $5 per hour for night shift work, though this is not federally mandated and depends on company policy or union contracts.
What is the standard full-time shift length in the United States?
The most common full-time shift in the United States is 8 hours, typically scheduled as five days per week for a total of 40 hours. However, alternative schedules are increasingly popular. Compressed workweeks use four 10-hour shifts, while healthcare often uses three 12-hour shifts. Some industries like firefighting use 24-hour shifts followed by 48 or 72 hours off. The FLSA does not define full-time versus part-time employment, so these designations are set by the employer. Generally, working 30 or more hours per week qualifies as full-time for benefits under the Affordable Care Act.
How do I calculate shift length for a rotating schedule?
For rotating schedules where shift times change weekly or biweekly, calculate each unique shift length separately and then average them over the rotation cycle. For example, a common rotation might include a week of day shifts (7 AM to 3 PM), a week of evening shifts (3 PM to 11 PM), and a week of night shifts (11 PM to 7 AM). Each of these is an 8-hour shift in this example, but if your rotation includes shifts of varying lengths, you can use Shift Length Calculator for each distinct shift and track the pattern to estimate your total monthly and annual working hours.
Is my data stored or sent to a server?
No. All calculations run entirely in your browser using JavaScript. No data you enter is ever transmitted to any server or stored anywhere. Your inputs remain completely private.
Does Shift Length Calculator work offline?
Once the page is loaded, the calculation logic runs entirely in your browser. If you have already opened the page, most calculators will continue to work even if your internet connection is lost, since no server requests are needed for computation.
References
Reviewed by Abdullah, Technical Content Specialist ยท Editorial policy