Time Duration Calculator
Hours and minutes between two times, overnight shifts included, less a break, in decimal hours for timesheets.
https://calculators.nirajiitr.com/converters/time-duration-calculator
How it works
Both times are turned into minutes after midnight and subtracted. If the end is earlier than the start, the shift crosses midnight, so a day is added. The unpaid break comes off, and dividing the minutes by 60 gives decimal hours, the form payroll and timesheets use.
duration = end − start − break (+ 24 h if the end is earlier)- Decimal hours
- Minutes ÷ 60: 30 min = 0.5 h, 45 min = 0.75 h
- Overnight
- An end time before the start runs into the next day
- Formats
- 17:30, 5:30 pm, 5.30pm and 5:30PM all work
Worked example
A night shift from 10 pm to 6:15 am with no break, paid ₹250 an hour.
- 110 pm is 22:00, or 1,320 minutes after midnight; 6:15 am is 375 minutes
- 2The end is earlier, so add a day: 375 + 1,440 = 1,815
- 31,815 − 1,320 = 495 minutes = 8 h 15 min
- 4495 ÷ 60 = 8.25 hours × ₹250 = ₹2,062.50
The shift is 8 hours 15 minutes, 8.25 decimal hours, earning ₹2,062.50.
Frequently asked questions
How do I convert minutes to decimal hours?
Divide by 60. 15 minutes is 0.25 hours, 20 minutes 0.33, 30 minutes 0.5 and 45 minutes 0.75. So 7 hours 45 minutes is 7.75 hours on a timesheet, not 7.45.
How does it handle shifts past midnight?
Automatically. Any end time earlier than the start is taken as the next day, so 22:00 to 06:00 is 8 hours. It assumes a shift is shorter than 24 hours.
Should breaks be deducted?
Only unpaid ones. Many employers pay short rest breaks but not a meal break of 30 minutes or more. Enter just the unpaid time, or 0 if all of it is paid.
Related calculators
- Date Difference CalculatorDays between two dates, in years, months and days, weeks, and weekdays, with or without the end date.
- Age CalculatorWork out an exact age in years, months and days — and how long until the next birthday.
- Unit ConverterConvert length, weight and temperature between metric and imperial units.