Toolstia / Hours calculator

Hours worked calculator

Working out hours worked is simple until a break, a night shift or a list of odd entries gets involved. This calculator has two modes. The first takes a start time, an end time and an unpaid break in minutes, and returns the time worked as hours and minutes and as decimal hours. The second takes a list of durations such as 1:30, 2h 15m and 45m and adds them into one total.

The first mode handles shifts that cross midnight. If the end time is earlier than the start time, the tool reads the end as the next day, so 22:00 to 06:00 is eight hours before any break, and a note on the result says that the shift ends the next day. The decimal figure is what you multiply by an hourly rate for pay, and the hours-and-minutes figure is what you write on a timesheet.

Everything is worked out in your browser and nothing is saved or uploaded. The sections below give worked examples, the list formats the tool accepts, and the situations, like daylight saving changes, where a simple clock calculation can differ from reality.

8:00

8.00 hours

How it works

  1. Choose between a start and end time, or a list to add up.
  2. Enter the times.
  3. Read the total, shown as hours and minutes and as decimal hours.

Start and end time

The hours are the time from start to end minus the break. If the end time is earlier than the start, the shift is taken to end the next day, so 22:00 to 06:00 is 8 hours.

Decimal hours

Pay is often worked out in decimal hours: 8 hours 30 minutes is 8.5 hours. Both forms are shown so you can use either on a timesheet.

Adding a list

Write one time per line. Formats such as 1:30, 1h 30m, 90m and 2 hours 15 minutes all work. Put a minus sign in front of a time to subtract it, for example -0:20.

Limits

Each shift is shorter than 24 hours. The tool does not know about dates, time zones or daylight saving changes.

Worked example: a day shift and a night shift

Start 09:00, end 17:30, break 30 minutes. The clock span is 8 hours 30 minutes, minus 30 minutes, so the result is 8:00, shown as 8.00 hours. Start 08:15, end 16:45 with a 45-minute break gives 8 hours 30 minutes minus 45 minutes, which is 7:45 or 7.75 hours.

For a night shift, start 22:00, end 06:00, break 30 minutes. The tool treats the end as the next morning, gets 8 hours, subtracts the break and returns 7:30, or 7.50 hours, with the note that the shift ends the next day. A short one, 23:30 to 00:15 with no break, gives 0:45 or 0.75 hours.

Adding up a list of times

Switch to the list mode to total several entries. Each entry goes on its own line, or you can separate them with commas or semicolons. Accepted forms are hours and minutes with a colon (1:30), hours, minutes and seconds (0:00:30), words with units (2h 15m, 45m, 30s, 1.5h, 2 hours 15 minutes), and a leading minus sign to subtract an entry (-0:20).

For example, 7:45, 8:15, 7h 30m, 6.5h and 0:45 add up to 30:45, which is 30.75 hours. Hours are not capped at 24, so a weekly total of 38:30 appears as 38:30. If the total includes seconds, they appear after the minutes, as in 0:00:30.

What the tool rejects, and why

A bare number such as 90 is refused, because it could mean 90 minutes or 90 hours, and the tool will not guess. Write 90m or 1:30. The same applies to a compact form like 1h30, which has no unit after the 30. Write 1h 30m or 1:30. A colon entry with minutes of 60 or more, such as 1:75, is also refused. Any line the tool cannot read is listed as an error and left out of the total, so check the message before trusting the sum.

In the first mode, the break box takes whole minutes only, up to four digits. If the break is longer than the time worked, the tool does not show a negative result; it asks you to check the times.

Decimal hours and pay

The decimal figure is the minutes divided by 60, rounded to two places for display. So 7:45 is 7.75, 7:20 is 7.33 and 7:10 is 7.17. Rounding matters for pay. At 20 per hour, 7 hours 20 minutes is exactly 146.67 when you use the exact fraction, but using the rounded 7.33 gives 146.60. Many payroll systems work in minutes or round to a set increment, so check how yours does it before relying on the decimal alone.

The tool does not calculate pay itself. Multiply the decimal hours by your hourly rate, and add overtime or premium rates separately if your pay rules use them.

Edge cases to know about

Start and end times that are identical give zero hours, not 24, because the tool cannot tell a full day from no time. If someone works exactly 24 hours, enter two shifts or use the list. The start-to-end mode also cannot represent a span longer than one day, so for multi-day totals use the list mode and add each shift.

This is plain clock arithmetic. It does not know about time zones or daylight saving time. On the night the clocks change, a shift from 22:00 to 06:00 is really 7 or 9 hours of elapsed time rather than 8, and the tool will still say 8 before the break. Adjust by an hour yourself for those nights.

Time inputs follow your browser and device settings, so you may see a 12-hour clock with am and pm, but the result is the same.

Questions

Can I enter a plain number like 90?

No, because it could mean 90 minutes or 90 hours. Write 90m or 1:30.

What if my break is longer than my shift?

The tool asks you to check the times instead of showing a negative result.

Does it calculate pay?

No, but you can multiply the decimal hours by your hourly rate.

Is anything uploaded?

No. Your times stays in your browser and is never sent anywhere.

How do I turn hours and minutes into decimal hours?

Divide the minutes by 60 and add the whole hours. For example 7 hours 45 minutes is 7 + 45/60 = 7.75. The tool shows this figure under the main result.

Does it handle a shift that crosses midnight?

Yes. If the end time is earlier than the start time the tool counts the end as the next day, so 22:00 to 06:00 is 8 hours before any break.

Can I subtract time in the list mode?

Yes. Put a minus sign in front of an entry, such as -0:20, and it is taken off the total. Use this for unpaid breaks or time you have already counted.

What if the clocks change during my shift?

The tool does not know about daylight saving. It works out the difference between the two clock times, so on a change night the real elapsed time is an hour more or less than shown.