Calculator

Time Calculator | Add, Subtract & Calculate Time Duration

Free online time calculator to add and subtract time, find time duration between two times or dates, and use the hours and minutes calculator for quick HH:MM:SS math.

Time Calculator – Add, Subtract & Find Time Duration Online

Add or subtract hours, minutes, and seconds from any date or time. Calculate the exact duration between two times or two dates. Evaluate HH:MM:SS math expressions. Free — no sign-up required.

Starting Point (optional — leave blank for pure duration math)

Operation & Duration

Duration Between Two Times

If the end time is earlier than the start time, next-day is applied automatically.

Duration Between Two Dates and Times

Time Math Expression

Use d days · h hours · m minutes · s seconds. Operators: + and . Example: 1d 2h + 45m - 30s

Result

How to Use the Time Calculator

This tool combines four time utilities into a single tabbed interface. Select the tab that matches your goal.

1. Add or Subtract Time

Enter an optional start date and start time, choose Add or Subtract, and enter the days, hours, minutes, and seconds to apply. If you leave the start date blank, the calculator normalizes the duration without anchoring it to a calendar date. Results include the new date, time, and day of the week.

Example: Starting April 1, 2026 at 9:00 AM, add 3 days, 5 hours, 45 minutes → April 4, 2026 at 2:45 PM (Saturday).

2. Time Duration Between Two Times

Enter a start clock time and an end clock time to find the exact elapsed duration within a day. Use the next-day toggle for overnight shifts where the end time is numerically earlier than the start time. Results include decimal hours for payroll use.

Example: 7:30 AM to 4:15 PM → 8 hours, 45 minutes (8.75 decimal hours).

3. Time Between Two Dates and Times

For durations that span multiple days, enter a full start date and time and a full end date and time. The calculator returns the total days, hours, minutes, and seconds accurately — including leap year handling, month-length differences, and any number of calendar days.

Example: March 1, 2026 at 10:00 AM → March 3, 2026 at 3:30 PM = 2 days, 5 hours, 30 minutes.

4. Time Expression Math

Type any time math formula in natural notation. Use d for days, h for hours, m for minutes, s for seconds. Mix and chain multiple operations. The calculator evaluates the full expression and normalizes the result.

Example: 1d 2h + 45m - 30s → 1 day, 2 hours, 44 minutes, 30 seconds.

Hours and Minutes Calculator

For quick HH:MM:SS math without entering a full date, use the calculator below. Enter two time durations, choose add or subtract, and get an instant result. This is ideal for adding up shift segments, combining travel legs, or checking total study time.

Quick Hours & Minutes Math

h
m
h
m

Why Decimal Hours Matter for Payroll

Decimal hours express a duration as a single number where the decimal represents a fraction of 60 minutes — not a fraction of 100. This is the most common source of payroll errors.

Decimal Hours = Hours + (Minutes ÷ 60)

15 minutes = 0.25 hours. 30 minutes = 0.50 hours. 45 minutes = 0.75 hours. The duration calculator provides decimal hours automatically in every result breakdown.

Work and Business Time Calculations

Many scheduling tasks need to count only business days — Monday through Friday — rather than all calendar days. A deadline 5 business days from Friday lands the following Friday, not the following Wednesday (which is what adding 5 × 24 hours gives you).

The calculators on this page count all calendar days, which is correct for shift math, travel planning, and any scenario that runs continuously around the clock. For business-day-only calculations — project timelines, contract deadlines, or SLA windows that skip weekends — use our Date Calculator, which includes a workdays-only mode.

Payroll example: Shift from 8:00 AM to 5:30 PM = 9 hours 30 minutes = 9.5 decimal hours. At $18.00/hr → 9.5 × $18.00 = $171.00. Use the Time Between Two Times tab to get the decimal hours instantly.

How Time Arithmetic Works

Adding Time — Base-60 Carrying

Time uses base-60 for seconds and minutes, and base-24 for hours. When you add minutes and the total reaches 60 or more, you carry 1 hour and keep the remainder. When hours reach 24, you carry 1 day.

Example: 45 minutes + 30 minutes = 75 minutes. Since 75 ≥ 60, carry 1 hour and keep 15 minutes. Result: 1 hour, 15 minutes.

Subtracting Time — Borrowing

Subtraction requires borrowing when the unit being subtracted is larger than what is available. To subtract 45 minutes from 6:15, borrow 1 hour from the hours column (converting it to 60 extra minutes). You now have 75 minutes. 75 − 45 = 30. Result: 5:30.

Crossing Midnight

When a result falls before 00:00 or after 23:59, the date rolls over. Subtracting 3 hours from 1:00 AM gives 10:00 PM the previous night — the date steps back one day. Adding 6 hours to 10:00 PM gives 4:00 AM — the date steps forward one day. This calculator handles all rollovers automatically.

Duration vs. Endpoint Calculation

There are two distinct time operations that are easy to confuse:

  • Endpoint calculation: "I start at 2:00 PM and work for 6 hours — when do I finish?" → 8:00 PM. Use the Add/Subtract tab.
  • Duration calculation: "I started at 2:00 PM and finished at 8:00 PM — how long did I work?" → 6 hours. Use the Duration tabs.

Time Formats: 12-Hour vs. 24-Hour

12-Hour Format (AM/PM)

The 12-hour clock divides the day into two 12-hour periods. AM (ante meridiem) runs from midnight to noon. PM (post meridiem) runs from noon to midnight. The most common points of confusion are the noon and midnight hours: 12:00 AM is midnight and 12:00 PM is noon — the opposite of what many people expect.

24-Hour Format

The 24-hour clock runs from 00:00 (midnight) to 23:59 (one minute before the next midnight). There is no AM or PM. Each hour has a unique number, which eliminates ambiguity. It is the standard in aviation, medicine, the military, and most international contexts.

12-Hour24-HourLabel
12:00 AM00:00Midnight
12:30 AM00:30Half past midnight
6:00 AM06:00Early morning
12:00 PM12:00Noon
1:00 PM13:00Early afternoon
6:00 PM18:00Evening
11:59 PM23:59One minute before midnight

Converting Between Formats

12-hour to 24-hour: For AM hours, use the number as-is (but treat 12 AM as 00). For PM hours, add 12 (1 PM = 13, 6 PM = 18). Exception: 12 PM stays as 12.

24-hour to 12-hour: Hours 1–11 are AM. Hours 13–23 subtract 12 and become PM. Hour 0 is 12 AM. Hour 12 is 12 PM.

Worked Examples

Example 1 — Adding Time to a Clock Time

Problem: What time is 3 hours and 40 minutes after 2:15 PM?
Step 1: Add minutes: 15 + 40 = 55 minutes. No carry needed (55 < 60).
Step 2: Add hours: 2:00 PM + 3 hours = 5:00 PM.
Step 3: Combine: 5:00 PM + 55 minutes = 5:55 PM.
Result: 5:55 PM

Example 2 — Duration Between Two Times

Problem: How long is the period from 9:50 AM to 1:20 PM?
Step 1: Convert to total minutes: 9:50 AM = 9×60+50 = 590 min. 1:20 PM = 13×60+20 = 800 min.
Step 2: Subtract: 800 − 590 = 210 minutes.
Step 3: Convert: 210 ÷ 60 = 3 hours, 30 minutes remaining.
Result: 3 hours, 30 minutes (3.5 decimal hours)

Example 3 — Duration Between Two Dates

Problem: How long from March 1, 2026 at 10:00 AM to March 3, 2026 at 3:30 PM?
Step 1: Count full days: March 1 to March 3 = 2 calendar days = 48 hours.
Step 2: Clock difference within the day: 3:30 PM − 10:00 AM = 5 hours 30 minutes.
Step 3: Combine: 48 hours + 5 hours 30 minutes = 53 hours 30 minutes.
Result: 2 days, 5 hours, 30 minutes (53.5 decimal hours)

Example 4 — Time Expression Math

Problem: Evaluate 1d 2h + 45m - 30s
Step 1: Convert to seconds: 1d = 86,400 s · 2h = 7,200 s · 45m = 2,700 s · 30s = 30 s.
Step 2: Calculate: 86,400 + 7,200 + 2,700 − 30 = 96,270 seconds.
Step 3: Normalize: 96,270 s ÷ 86,400 = 1 day remainder 9,870 s = 2h 44m 30s.
Result: 1 day, 2 hours, 44 minutes, 30 seconds

Example 5 — Work Shift for Payroll

Problem: A shift runs from 7:30 AM to 4:15 PM. What are the total hours and payroll amount at $22/hr?
Step 1: Convert: 7:30 AM = 450 min. 4:15 PM = 975 min.
Step 2: Subtract: 975 − 450 = 525 minutes = 8 hours 45 minutes.
Decimal hours: 8 + 45/60 = 8.75 decimal hours.
Payroll: 8.75 × $22.00 = $192.50

Common Use Cases for a Time Calculator

  • Work shifts and timesheets: Find exact shift length from clock-in to clock-out, including overnight shifts. Get decimal hours for immediate use in payroll calculations.
  • Payroll verification: Confirm that hours-and-minutes totals match decimal-hours pay calculations. Identify rounding errors before they affect a paycheck.
  • Study and focus sessions: Add up multiple study blocks to track daily or weekly totals. Subtract break time from total session length to find actual focused time.
  • Travel and flight planning: Add layover durations to departure times to find true arrival times. Calculate total journey time across multiple legs and connections.
  • Cooking and lab timing: Combine prep, cook, and rest step durations to plan the full workflow. Calculate when each stage starts and ends from a target meal time.
  • Meeting scheduling: Find what time a meeting ends given a start time and expected duration. Stack multiple back-to-back meetings to find when your schedule clears.
  • Project and deadline tracking: Count down from a deadline to the present to see exactly how much time remains. Add estimated task durations to project your completion time.
  • Fitness and athletics: Calculate interval times, total training durations, and splits. Compare performance across sessions using consistent time math.

Common Time Calculation Mistakes to Avoid

  • Treating decimal hours as hours and minutes: 8.5 hours is 8 hours and 30 minutes — not 8 hours and 50 minutes. The decimal is a fraction of 60, not a fraction of 100. Multiplying 8.50 by an hourly rate is correct. Multiplying 8 hours 50 minutes as if it were 8.50 is not.
  • Confusing endpoint calculation with duration calculation: You add a duration to a time to reach a new time. You subtract two times to find a duration. These are inverse operations. Using the wrong mode produces a meaningless result.
  • Forgetting midnight rollovers: Subtracting 3 hours from 1:00 AM gives 10:00 PM the previous night — the date decreases by one day. Adding 5 hours to 10:00 PM gives 3:00 AM and the date increases. Always verify the output date when calculations cross midnight.
  • The 12:00 AM/PM trap: 12:00 AM is midnight (the very start of a day). 12:00 PM is noon (the middle of a day). These are counterintuitive. When in doubt, use 24-hour format: midnight = 00:00, noon = 12:00.
  • Mixing 12-hour and 24-hour inputs: Entering 14:30 and calling it 2:30 AM is an error. 14:30 in 24-hour format is 2:30 PM. Stick to one format per calculation.
  • Assuming all months have 30 days: Manually adding 3 months by multiplying 3 × 30 days ignores February (28/29 days), January, March, May, July, August, October, and December (31 days each). The Time Between Dates tab uses actual calendar math to avoid this mistake.

Frequently Asked Questions

Use the Time Between Two Times tab. Enter a start time and an end time, then click Calculate Duration. The result shows elapsed hours, minutes, seconds, decimal hours, and total minutes. For overnight shifts where the end time is earlier than the start time, enable the next-day toggle or let the calculator detect it automatically.
Use the Add/Subtract tab to add hours and minutes to a specific start time. For quick two-operand math, use the Hours and Minutes Calculator section on this page — enter two HH:MM:SS values and click Calculate. The calculator handles all base-60 carrying automatically.
Yes. In the Add/Subtract Time tab, enter a start date and time, set the operation to Subtract, and fill in the days, hours, minutes, and seconds to remove. The result shows the exact past date and time, including the day of the week.
A time calculator adds or subtracts a duration from a clock time to produce a new time — for example, 9:00 AM + 3 hours = 12:00 PM. A time duration calculator finds the elapsed time between two known times — for example, 9:00 AM to 12:00 PM = 3 hours. This tool does both from a single tabbed interface.
Yes. All four tabs support seconds. In the Add/Subtract tab there is a Seconds field. The Duration tabs display results broken down to the second. In Expression Math, use 's' — for example, '30m + 45s' or '1h - 120s'.
Yes. The time inputs accept 24-hour format directly. Enter 14:30 for 2:30 PM, 00:00 for midnight, or 23:59 for one minute before midnight. All calculations use 24-hour arithmetic internally.
Yes. Enter clock-in and clock-out times in the Time Between Two Times tab and click Calculate Duration. The result includes decimal hours so you can multiply directly by an hourly rate. A shift from 8:00 AM to 5:30 PM equals 9.5 decimal hours. At $18/hr that is $171.00.
Use the Time Between Dates tab. Enter a full start date and time and a full end date and time. The calculator uses JavaScript's native Date object, which correctly handles leap years, varying month lengths (28, 29, 30, or 31 days), and calendar transitions across any number of days or years.
Yes. In the Expression Math tab, type formulas like '1h 20m + 45m - 10s' or '2d + 3h 30m'. Use d for days, h for hours, m for minutes, s for seconds. Mix units freely across multiple operands and the calculator normalizes the full result.
Decimal hours express a duration as a single number where the decimal is a fraction of 60 minutes — not 100. Eight hours and 30 minutes equals 8.5 decimal hours, not 8.30. This matters for payroll: 8.5 × $15/hr = $127.50. Treating 8h 30m as 8.30 and multiplying gives the wrong answer. The calculator always provides decimal hours in the breakdown.
The next-day toggle in the Time Between Two Times tab adds 24 hours to the end time before calculating. This handles overnight shifts where the end time is numerically earlier than the start time. A shift from 10:00 PM to 6:00 AM without the toggle appears as a negative duration. With it, the result is correctly 8 hours. If the toggle is off and an end time is detected as earlier than the start time, the calculator adjusts automatically.
Yes. The Time Between Dates tab uses JavaScript's Date object, which correctly handles leap years and all month-length differences. A period spanning February in a leap year will correctly count 29 days in February rather than 28.
Open the Time Between Two Times tab. Enter your start time (e.g., 08:30) and end time (e.g., 17:00) and click Calculate Duration. The result shows 8 hours 30 minutes and 8.5 decimal hours. For overnight shifts, enable the next-day toggle before calculating.

Disclaimer: Results are calculated using standard time and date arithmetic based on your browser's local timezone. Calculations correctly handle leap years, varying month lengths, and midnight rollovers. Always verify results for mission-critical scheduling. Timezone differences, daylight saving time transitions, and local holiday rules are not factored in and may affect real-world planning.

Shares:

Related Posts

UAE gratuity calculator showing end of service benefits calculation based on UAE labour law for Dubai, Abu Dhabi and Sharjah
Calculator

401(k) Calculator

401(k) Calculator Current 401(k) Balance ($): Annual Employee Contribution ($): Employer Match (% of employee contribution): Annual Contribution Increase (%) (Optional): Expected Annual Return (%) : Years Until Retirement: Calculate