# Time Duration Calculator

- **URL:** https://codeasystem.com/calculators/dates/time-duration-calculator/
- **Category:** dates
- **Description:** Measure the elapsed time between two clock times on the same day, shown as H:MM:SS plus decimal hours for timesheets.
- **Primary output:** Duration: 3:30:00

## Inputs
- Start time (name: `start`, type: text, example: 09:15)
- End time (name: `end`, type: text, example: 12:45)

## Outputs
- Duration: 3:30:00
- Total minutes: 210
- Decimal hours: 3.5

## Formula / methodology
```
Duration = end − start (minutes), rendered as H:MM:SS
Decimal hours = minutes ÷ 60
```

Both inputs must be strict 24-hour HH:MM strings with two-digit hours and minutes. Each converts to minutes since midnight; the difference becomes an H:MM:SS duration and, divided by sixty, decimal hours; the format payroll and invoicing systems usually expect.

## Assumptions & limitations
- Both times fall on the same calendar day; overnight spans are rejected.
- 24-hour notation only; “2:45 PM” style input is not accepted.
- Seconds granularity is not offered; results resolve to whole minutes.

## How to use
1. **Type both times in HH:MM**; Use 24-hour format with leading zeros, e.g. 08:05 and 17:30.
2. **Check the order**; The end time must come after the start time on the same day.
3. **Copy the format you need**; H:MM:SS for readability, decimal hours for payroll systems.

## Example
From 09:15 to 12:45 is a 3:30:00 shift; 210 minutes or 3.5 decimal hours for a timesheet.

Result for these inputs:

```
Duration: 3:30:00
```

## About this calculator
### Decimal hours versus H:MM

Humans read “7:45” as seven three-quarter hours; spreadsheets want 7.75. Showing both formats side by side means one calculation serves your wall clock and your invoice template without mental conversion.

### Why overnight spans are refused

A start of 22:00 and end of 06:00 could mean eight hours or minus sixteen; the tool cannot know if midnight was crossed, so it asks you to use same-day times instead of guessing wrong. For night shifts, split the entry at midnight into two calculations.

### Strict parsing on purpose

Loose parsers silently turn “9:5” into something surprising. Requiring exact HH:MM keeps typos out of timesheets, where small errors compound across a pay period.

## FAQs
### Can I calculate overnight durations?

No; both times are treated as same-day. Split a night shift at midnight and add the two results together.

### Why was my input rejected?

Times must be strict 24-hour HH:MM with valid ranges (hours 00–23, minutes 00–59) and the end after the start.

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

The “Decimal hours” row already does it: minutes divided by 60, e.g. 3:30 becomes 3.5.

### Does it handle seconds?

Inputs are minute-granular; seconds always render as :00 in the duration.

## Related calculators
- [Days Between Dates Calculator](https://codeasystem.com/calculators/dates/days-between-dates-calculator/)
- [Working Days Calculator](https://codeasystem.com/calculators/dates/working-days-calculator/)
- [Overtime Pay Calculator](https://codeasystem.com/calculators/salary/overtime-pay-calculator/)

---
Last updated: 2026-08-23 · Version: 1.0.0 · [HTML version](https://codeasystem.com/calculators/dates/time-duration-calculator/)
