# Time calculator

URL: https://shahid09.is-a.dev/tools/time-calculator/
Author: Muhammad Shahid (https://shahid09.is-a.dev/)
Free tool · runs in your browser

Add up or subtract durations, and work out the time between two clock times, even across midnight.

**Quick answer:** Enter hours, minutes and seconds in as many rows as you need, choosing + or − for each, to get a total in HH:MM:SS, minutes and decimal hours. For shifts, enter two clock times to find the time between them; if the end is earlier than the start, the tool treats it as the next day, so 22:30 to 06:15 is 7 hours 45 minutes.

## How to use it

1. **Add your durations.** Enter hours, minutes and seconds in each row, adding rows as needed.
2. **Choose add or subtract.** Set + or − on each row to get the running total.
3. **Compare clock times.** Enter a start and end time to see the gap, or the finish time after your total.

## Example

Adding two durations and subtracting a break:

Input:

```
+ 1h 45m 30s
+ 2h 30m 45s
− 0h 16m 15s
```

Output:

```
Total: 04:00:00
In minutes: 240
In decimal hours: 4
```

## Common errors and how to fix them

- **The shift length looks wrong**: Check AM and PM in the time boxes. 10:00 to 06:00 is treated as overnight, or 20 hours.
- **Decimal hours look odd**: 1.30 hours is not 1 hour 30 minutes. It is 1 hour 18 minutes. 1 hour 30 minutes is 1.5 hours.

## Frequently asked questions

### How do I add hours and minutes?

Add each part separately, then carry each 60 minutes into an hour. Enter the values here and it does that for you.

### How do I convert minutes to decimal hours?

Divide by 60. So 1 hour 30 minutes is 1.5 hours and 45 minutes is 0.75. Payroll systems often need this form.

### How do I calculate hours worked?

Enter your start and end times, then subtract any unpaid break by entering it as a − row. Multiply decimal hours by your hourly rate to get your pay.

### What happens when a shift crosses midnight?

If the end time is earlier than the start, the end is treated as the next day and "Crosses midnight" shows Yes.

### Can totals go over 24 hours?

Yes. Durations are not clock times, so 30 hours shows as 30:00:00.

### Can the result be negative?

Yes. Subtracting more than you added shows a leading minus, such as -00:01:30.

### Does it handle 12-hour times?

The time boxes follow your device settings and may show AM and PM. The calculation works the same either way.

### Does it account for daylight saving?

No. Clock times are treated as a plain 24-hour day. A shift across a clock change will be an hour off.

### How do I add up weekly work hours?

Add a row for each day with its hours and minutes. The total appears in HH:MM:SS and in decimal hours for payroll.

### How do I find time between two dates?

This tool covers clock times within a day or overnight. For whole days between dates, use the [date difference calculator](https://shahid09.is-a.dev/tools/date-difference-calculator/).

## Related

- [Date difference calculator](https://shahid09.is-a.dev/tools/date-difference-calculator/)
- [Age calculator](https://shahid09.is-a.dev/tools/age-calculator/)
- [Basic calculator](https://shahid09.is-a.dev/tools/basic-calculator/)

## Sources

- [Wikipedia: ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
