Time Calculator
Add, subtract, and convert time. Calculate duration between times and convert between time units.
Time Calculator
Result
13:15:30
13h 15m 30s
Quick Reference
Time Calculation Tips
- ✓Use decimal hours (e.g., 1.5 hours = 1h 30m) for timesheet calculations
- ✓Time difference is useful for calculating work hours
- ✓Convert to minutes or seconds for precise calculations
- ✓Remember: 0.25 hours = 15 mins, 0.5 hours = 30 mins, 0.75 hours = 45 mins
What Is a Time Calculator?
A time calculator is a digital tool that performs arithmetic on time values — adding, subtracting, finding the difference between two clock times, and converting between time units. Unlike a standard calculator that works with decimal numbers, a proper time calculator handles the sexagesimal (base-60) nature of minutes and seconds automatically, carrying over 60 seconds into a minute and 60 minutes into an hour without any extra effort from the user.
Whether you need to total up hours worked across a shift, figure out when a process will finish after adding a known duration, or convert milliseconds to hours for a performance profiling task, a time calculator handles all of these in seconds. The tool on this page supports four distinct modes:
- Add Time — combine two durations expressed in hours, minutes, and seconds.
- Subtract Time — find the remainder after removing one duration from another.
- Time Difference — compute the absolute gap between two clock times (HH:MM format).
- Convert Units — translate a value between milliseconds, seconds, minutes, hours, days, weeks, months (30-day), and years (365-day).
Time arithmetic is surprisingly error-prone when done by hand. Carrying 60-second units, remembering that a day has 86,400 seconds, or converting fractional hours into minutes trips up even careful thinkers. This free online time calculator eliminates that friction, giving you instant, accurate results across all common time-unit conversions and duration calculations.
How Time Addition and Subtraction Work
The add and subtract modes share the same underlying mechanism: both durations are first converted to a common unit — total seconds — and then combined or differenced before the result is decomposed back into hours, minutes, and seconds.
Add / Subtract Formula
Where:
- H₁, M₁, S₁= Hours, minutes, and seconds of the base (start) duration
- H₂, M₂, S₂= Hours, minutes, and seconds of the duration to add or subtract
- resultSeconds= Total seconds of the result (absolute value is taken for subtraction)
- 3600= Seconds in one hour
- 60= Seconds in one minute
Calculating the Difference Between Two Times
The Time Difference mode calculates how much time elapses between a start clock time and an end clock time, both expressed in hours (0–23) and minutes (0–59). This is useful for calculating shift lengths, meeting durations, cooking times, or any scenario where you know two wall-clock readings and need the gap between them.
The formula converts both clock readings to seconds since midnight and takes the absolute difference:
diffSeconds = | (H₂ × 3600 + M₂ × 60) − (H₁ × 3600 + M₁ × 60) |
The result is then expressed as HH:MM:SS, as a decimal hours value (useful for payroll), as total minutes, and as total seconds. For example, a work shift from 09:00 to 17:30 produces a difference of 8.5 decimal hours — exactly what most timesheets require.
Note that this mode computes the absolute difference, so putting the end time before the start time still returns a positive duration. If you need to track overnight shifts that cross midnight (e.g., 22:00 to 06:00), use the Add Time mode: add 2 hours to 22:00 to reach midnight, then add 6 more hours for the morning portion.
Time Unit Conversion: Milliseconds to Years
The Convert Units mode lets you translate any numeric value between eight time units. All conversions route through a common base of seconds: the input value is first multiplied by its unit's "seconds per unit" factor, then divided by the target unit's factor.
result = value × unitToSeconds[fromUnit] / unitToSeconds[toUnit]
The unit factors used by this calculator are:
| Unit | Seconds per Unit |
|---|---|
| Millisecond | 0.001 |
| Second | 1 |
| Minute | 60 |
| Hour | 3,600 |
| Day | 86,400 |
| Week | 604,800 |
| Month (30 days) | 2,592,000 |
| Year (365 days) | 31,536,000 |
These are the exact constants baked into the calculator's code. The month figure assumes a uniform 30-day month and the year figure assumes exactly 365 days — no leap-year correction. For civil calendar precision, use a dedicated date-difference tool instead.
Practical Uses of Time Calculation
Time calculation comes up in dozens of everyday and professional contexts. Here are the most common use cases where this online time calculator saves real effort:
- Payroll and timesheets — Hourly workers and freelancers need to convert clock-in/clock-out pairs into decimal hours. A shift from 08:45 to 17:15 is 8.5 hours — the Time Difference mode produces this decimal directly.
- Project scheduling — Adding estimated task durations reveals when a project will complete. If Task A takes 3h 45m and Task B takes 2h 20m, their sum of 6h 5m tells you the earliest finish time.
- Sports and fitness — Runners adding lap times, swimmers totalling interval sets, or cyclists computing race splits all need reliable duration arithmetic.
- Media and content production — Video editors summing clip lengths, podcast producers calculating total episode runtime, and animators tracking frame-based timing all rely on accurate time addition.
- Science and engineering — Converting between milliseconds and seconds (latency profiling), seconds and days (uptime metrics), or hours and years (lifetime calculations) requires the precise unit factors this calculator uses.
- Travel and cooking — Adding travel segments, calculating recipe timing from start to serve, or determining when to begin cooking to hit a target meal time all benefit from quick time arithmetic.
Regardless of the use case, the core principle is the same: reduce all durations to a single unit, operate on them as plain numbers, then reformat the result into a human-readable representation. That is exactly what this calculator does automatically.
Worked Examples
Adding Two Work Shifts
Problem:
A worker clocks a morning shift of 4 hours 30 minutes 0 seconds and an afternoon shift of 3 hours 45 minutes 15 seconds. What is their total time worked?
Solution Steps:
- 1Convert morning shift to seconds: 4 × 3600 + 30 × 60 + 0 = 14,400 + 1,800 + 0 = 16,200 s
- 2Convert afternoon shift to seconds: 3 × 3600 + 45 × 60 + 15 = 10,800 + 2,700 + 15 = 13,515 s
- 3Add: 16,200 + 13,515 = 29,715 s
- 4Decompose: 29,715 ÷ 3600 = 8 remainder 915; 915 ÷ 60 = 15 remainder 15
- 5Result: 8 hours 15 minutes 15 seconds (08:15:15)
Result:
Total work time: 08:15:15 (8.254 decimal hours)
Finding a Work Shift Duration (Time Difference)
Problem:
An employee starts at 09:00 and finishes at 17:30. How long did they work?
Solution Steps:
- 1Convert start time to seconds since midnight: 9 × 3600 + 0 × 60 = 32,400 s
- 2Convert end time to seconds since midnight: 17 × 3600 + 30 × 60 = 61,200 + 1,800 = 63,000 s
- 3Difference: |63,000 − 32,400| = 30,600 s
- 4Decompose: 30,600 ÷ 3600 = 8 remainder 1,800; 1,800 ÷ 60 = 30 remainder 0
- 5Express as decimal: 30,600 ÷ 3600 = 8.5 hours
Result:
Shift duration: 8h 30m (08:30:00) = 8.50 decimal hours
Converting Hours to Minutes and Seconds
Problem:
A video file is 2.75 hours long. How many minutes and seconds is that?
Solution Steps:
- 1Value in seconds: 2.75 × unitToSeconds['hours'] = 2.75 × 3600 = 9,900 s
- 2Convert to minutes: 9,900 ÷ unitToSeconds['minutes'] = 9,900 ÷ 60 = 165 minutes
- 3Convert to seconds (direct): 9,900 ÷ 1 = 9,900 seconds
- 4Verify minutes: 165 minutes = 2 hours 45 minutes (2.75 × 60 = 165 ✓)
Result:
2.75 hours = 165 minutes = 9,900 seconds
Subtracting a Break from a Duration
Problem:
A meeting ran for 2 hours 0 minutes 0 seconds but included a 15-minute 30-second break. What was the net meeting time?
Solution Steps:
- 1Convert meeting duration to seconds: 2 × 3600 + 0 × 60 + 0 = 7,200 s
- 2Convert break to seconds: 0 × 3600 + 15 × 60 + 30 = 900 + 30 = 930 s
- 3Subtract: |7,200 − 930| = 6,270 s
- 4Decompose: 6,270 ÷ 3600 = 1 remainder 2,670; 2,670 ÷ 60 = 44 remainder 30
Result:
Net meeting time: 1 hour 44 minutes 30 seconds (01:44:30)
Tips & Best Practices
- ✓Use decimal hours for payroll: total seconds ÷ 3600 gives the hours and fraction you can multiply directly by an hourly rate.
- ✓To handle an overnight shift crossing midnight, add the pre-midnight portion and the post-midnight portion separately using Add Time, then add those two results.
- ✓When converting large millisecond values (e.g., from performance benchmarks), switch to the Convert Units mode — it handles fractional results up to 6 decimal places.
- ✓The Time Difference mode always returns a positive value regardless of which time is entered first, so order does not matter when you just need a duration.
- ✓1 hour = 3,600 seconds; 1 day = 86,400 seconds; 1 week = 604,800 seconds — memorise these anchors and mental estimates become quick.
- ✓For timesheet rounding, note that 0.25 h = 15 min, 0.5 h = 30 min, 0.75 h = 45 min — common payroll rounding intervals.
- ✓Subtract mode takes the absolute value of the difference, so you will never see a negative result even if the second duration is larger than the first.
- ✓When adding many durations (e.g., multiple video clips), add them two at a time sequentially — each intermediate result feeds into the next addition.
Frequently Asked Questions
Sources & References
Last updated: 2026-06-05
Help us improve!
How would you rate the Time Calculator?
Editorial Note
MyCalcBuddy Editorial Team
This page is maintained as an educational calculator reference.
Formula Source: Standard Mathematical References
by Various