Everyday math & dates

Hours Calculator

Enter a start and end time. If the end time is earlier than the start, it's treated as the next day, so night shifts work too.

Your result will appear here.

How it's calculated

Both times are turned into minutes after midnight and the start is subtracted from the end. A day is added when the end is earlier. Divide the minutes by 60 for decimal hours, which is the figure to multiply by an hourly rate.

How to do it in Excel

=MOD(B2-A2, 1) - C2/1440
Time worked, with the start in A2, end in B2 and break minutes in C2. Format as h:mm.
=(MOD(B2-A2, 1) - C2/1440)*24
The same as decimal hours.

Related Excel tutorials