Date & Time

Time Calculator

This time calculator adds and subtracts hours and minutes, finds the time between two times (hours worked, with an unpaid break and payroll rounding), totals a list of times for a timesheet, and adds time to a date and time.

Try
Operation
More options Days (first time), Seconds (first time), Days (second time), Seconds (second time)

Result

Total time: 4 h 15 min

Total time

4 h 15 min

4.25 hours

Decimal hours
4.25 h
Total minutes
255 min
Total seconds
15,300 s
Decimal days
0.1770833333 days
Clock format (h:mm:ss)
4:15:00
First time (normalized)
2 h 45 min
Second time (normalized)
1 h 30 min

2 h 45 min plus 1 h 30 min is 4 h 15 min, or 4.25 hours.

Step-by-step working (3 steps)
  1. Convert each time to seconds

    First: 9,900 s. Second: 5,400 s. (1 day = 86,400 s, 1 h = 3,600 s, 1 min = 60 s.)

  2. Add

    9,900 s + 5,400 s = 15,300 s.

  3. Normalize

    Divide out whole days, then hours, then minutes: 15,300 s = 4 h 15 min.

Every time is converted to seconds, combined, then normalized, so 2 h 45 min + 1 h 30 min = 4 h 15 min, shown in decimal hours (4.25) too.

By Hira Noor, mathematicianLast reviewed Free, no sign-up, runs in your browserReport a problem

How to use this calculator

  1. Choose a calculation: Add or subtract two times, Time between two times for hours worked, Add up a list of times for a timesheet, or Add or subtract time from a date and time.
  2. To add time, enter hours and minutes; open More options for days and seconds. Decimals and values over 60 are fine: 1.5 hours or 90 minutes both work.
  3. For hours worked, enter the start and end times. For a night shift, set the end date to the next day. Add an unpaid break in minutes, and pick a rounding rule if your employer rounds clock times.
  4. For a timesheet, type one time per line as 7:45, 7h 45m or 7.75, then add an hourly rate to see pay.
  5. Read the result at the top, with decimal hours, total minutes and the h:mm:ss clock format underneath. Open the working to see each step.

Formulas

Converting to seconds

t=86400d+3600h+60m+st = 86400\,d + 3600\,h + 60\,m + s

Plain-text formula: t = 86400 d + 3600 h + 60 m + s

d, h, m, s
days, hours, minutes and seconds entered
t
the total in seconds

Every time is turned into one number of seconds (to the millisecond) before adding or subtracting, which avoids carrying errors between units.

Normalizing

d=⌊t86400⌋,h=⌊tmod864003600⌋,m=⌊tmod360060⌋d = \left\lfloor \frac{t}{86400} \right\rfloor, \quad h = \left\lfloor \frac{t \bmod 86400}{3600} \right\rfloor, \quad m = \left\lfloor \frac{t \bmod 3600}{60} \right\rfloor

Plain-text formula: d = ⌊t/86400⌋, h = ⌊(t mod 86400)/3600⌋, m = ⌊(t mod 3600)/60⌋

Whole days are taken out first, then hours (0 to 23), minutes (0 to 59) and the remaining seconds. A negative total is normalized the same way and shown with a minus sign.

Decimal hours

hours=h+m60+s3600\text{hours} = h + \frac{m}{60} + \frac{s}{3600}

Plain-text formula: hours = h + m/60 + s/3600

Timesheets and payroll use decimal hours: 4 h 15 min = 4.25 h and 7 h 45 min = 7.75 h. Pay is decimal hours times the hourly rate.

Time between two times

worked=(tend−tstart)−break\text{worked} = (t_{\text{end}} - t_{\text{start}}) - \text{break}

Plain-text formula: worked = (t_end − t_start) − break

Both moments are placed on one time line (date and clock time), so a shift from 10:00 PM to 6:30 AM the next day gives 8 h 30 min instead of a negative number.

Reading the result

The main result is normalized: no part is larger than its unit allows, so 75 minutes appears as 1 h 15 min. The clock format (h:mm:ss) keeps all hours together, the way timesheets and spreadsheets show long totals, for example 38:45:00 for a working week.

Decimal hours are not the same as hours and minutes: 1.30 hours is 1 h 18 min, not 1 h 30 min. Use the decimal value when multiplying by an hourly rate.

When you subtract a longer time from a shorter one, the result is negative, shown with a leading minus sign, for example −1 h 30 min.

How to add hours and minutes

To add hours and minutes by hand, add the minutes together and the hours together. If the minutes reach 60 or more, take away 60 and carry 1 hour. For example, 3 h 50 min + 2 h 25 min: the minutes give 50 + 25 = 75, which is 1 h 15 min, and the hours give 3 + 2 = 5, so the total is 5 + 1 = 6 h 15 min.

To subtract time, take the minutes away first. If there are not enough minutes, borrow 1 hour as 60 minutes. For 5 h 10 min − 2 h 45 min, rewrite 5 h 10 min as 4 h 70 min, then 70 − 45 = 25 minutes and 4 − 2 = 2 hours: 2 h 25 min.

Adding and subtracting time with a carry or a borrow
ProblemMinutesHoursAnswer
3 h 50 min + 2 h 25 min50 + 25 = 75 = 1 h 15 min3 + 2 + 1 carried = 66 h 15 min
2 h 45 min + 1 h 30 min45 + 30 = 75 = 1 h 15 min2 + 1 + 1 carried = 44 h 15 min
5 h 10 min − 2 h 45 min70 − 45 = 25 (60 borrowed)4 − 2 = 22 h 25 min
8 h 00 min − 3 h 20 min60 − 20 = 40 (60 borrowed)7 − 3 = 44 h 40 min

Hours between two times, including overnight shifts

To find the hours between two times, convert both to 24-hour time and subtract the start from the end. From 7:30 AM to 4:30 PM is 16:30 − 7:30 = 9 hours; with a 30-minute unpaid lunch, that is 8 h 30 min, or 8.5 hours worked.

When a shift passes midnight the end time is smaller than the start, so add 24 hours to the end first. From 10:00 PM to 6:30 AM is (6:30 + 24:00) − 22:00 = 8 h 30 min. In this calculator, choose Time between two times and set the end date to the next day. The time duration calculator reads an earlier end time as the next day on its own and shows the subtraction column by column.

For a full timecard, use the hours calculator: it totals Monday to Sunday with unpaid breaks, splits out overtime over 40 hours a week (or California daily overtime) and works out gross pay.

Common shifts and the hours between the times
ShiftUnpaid breakTime workedDecimal hours
9:00 AM to 5:00 PM1 hour7 h7.00
8:00 AM to 4:30 PM30 min8 h8.00
7:30 AM to 4:30 PM30 min8 h 30 min8.50
6:45 AM to 3:15 PM30 min8 h8.00
12:00 PM to 8:45 PM45 min8 h8.00
10:00 PM to 6:30 AMNone8 h 30 min8.50
7:00 PM to 7:00 AM1 hour11 h11.00

Minutes to decimal hours

To turn minutes into decimal hours, divide by 60. Payroll and invoicing software usually wants hours as a decimal, so 7 h 45 min is entered as 7.75. To go back, multiply the decimal part by 60: 0.4 h × 60 = 24 minutes. Steps of 6 minutes give exact tenths of an hour. The minutes to hours converter has a full chart from 1 to 60 minutes and shows any total as hours and minutes.

Minutes as decimal hours (rounded to two decimals)
MinutesDecimal hoursMinutesDecimal hours
10.02300.50
50.08350.58
60.10360.60
100.17400.67
120.20420.70
150.25450.75
180.30480.80
200.33500.83
240.40540.90
250.42550.92

Rounding time for payroll: the 7-minute rule

Many employers round clock-in and clock-out times. In the United States, the Department of Labor allows rounding to the nearest 5 minutes, the nearest tenth of an hour (6 minutes) or the nearest quarter hour (15 minutes), provided the rounding averages out over time and does not always favor the employer (29 CFR 785.48(b)).

Quarter-hour rounding is often called the 7-minute rule: 1 to 7 minutes past a quarter hour round down, and 8 to 14 minutes round up. Choose the rule under Round start and end times; the working shows each rounded time.

Quarter-hour rounding (7-minute rule) for a shift starting at 8:00
Clock timeMinutes past 8:00Rounded to
8:0558:00
8:0778:00
8:0888:15
8:12128:15
8:22228:15
8:23238:30

Time units, and 12-hour and 24-hour time

One hour is 60 minutes and one minute is 60 seconds, so the units do not carry at 10 or 100 the way decimals do. That is why 1:30 on a clock means 1.5 hours, not 1.3.

The 24-hour clock (military time) counts hours from 00 to 23. To convert a PM time, add 12 to the hour, except for 12 PM, which stays 12:00; 12 AM (midnight) is 00:00. So 4:30 PM is 16:30 and 12:15 AM is 00:15.

Time unit equivalents
UnitHoursMinutesSeconds
1 minute1/60 ≈ 0.0167160
1 hour1603,600
1 day241,44086,400
1 week16810,080604,800
40-hour work week402,400144,000

Adding hours and minutes in Excel or Google Sheets

Spreadsheets store a time as a fraction of a day. With durations such as 7:45 in B2 to B6, =SUM(B2:B6) gives the total; format the cell as [h]:mm so totals over 24 hours do not roll back to zero. =B7*24 converts the total to decimal hours (format it as a number).

For the time between a start in A2 and an end in B2, use =B2-A2, or =MOD(B2-A2,1) when a shift can pass midnight. In Google Sheets, choose Format > Number > Duration for totals. For days rather than hours, use the date calculator.

Worked example

A weekly timesheet

Add 7 h 45 min, 8 h 10 min, 7 h 55 min, 8 h and 6 h 30 min, and find the pay at 18.50 an hour.

  1. Add the minutes: 45 + 10 + 55 + 0 + 30 = 140 min = 2 h 20 min.
  2. Add the hours: 7 + 8 + 7 + 8 + 6 = 36 h, plus the 2 h carried = 38 h 20 min.
  3. Decimal hours: 38 + 20/60 = 38.333… h.
  4. Pay: 38.333… × 18.50 = 709.17 (rounded to the cent).

Answer: The week totals 38 h 20 min (38:20:00), or 38.33 hours, which is 709.17 at 18.50 an hour.

Frequently asked questions

How do you add hours and minutes?

Add the minutes and the hours separately. If the minutes come to 60 or more, subtract 60 and carry 1 hour. For example, 3 h 50 min + 2 h 25 min: 75 minutes is 1 h 15 min, so the total is 6 h 15 min.

How many hours is 7:30 to 4:30?

From 7:30 AM to 4:30 PM is 9 hours. With a 30-minute unpaid lunch it is 8 h 30 min, or 8.5 hours worked. From 7:30 PM to 4:30 AM is also 9 hours, across midnight.

How do I convert minutes to decimal hours?

Divide the minutes by 60. For example 45 min = 0.75 h, so 7 h 45 min = 7.75 h. The calculator shows decimal hours for every result.

How do I calculate hours worked across midnight?

Choose "Time between two times" and give the end the next day’s date. For example, 10:00 PM on October 21 to 6:30 AM on October 22 is 8 h 30 min, or 8.5 hours. Enter an unpaid break in minutes to subtract it. For a whole week with overtime, use the hours calculator.

How do I write 2 hours and 15 minutes?

As 2:15 in hours and minutes, 2 h 15 min in words, 2.25 hours as a decimal, or 135 minutes. In ISO 8601 duration format it is PT2H15M.

What is the 7-minute rule?

A payroll rounding rule for quarter hours: clock times 1 to 7 minutes past a quarter hour round down, and 8 to 14 minutes round up. US federal rules allow it if rounding averages out over time.

Are time zones and daylight saving time taken into account?

No. Times are wall-clock times without a time zone, and every day counts as 24 hours. If a daylight-saving change falls inside your span, the real elapsed time differs by one hour.

Time Duration Calculator

Hours, minutes and seconds between two times, overnight spans, clock time plus a duration, and dates.

Date & Time

Hours Calculator

Hours worked between two times minus breaks, a weekly timecard with overtime, and decimal hours for payroll.

Date & Time

Date Calculator

Days between two dates (with business days), or a date plus or minus years, months, weeks and days.

Date & Time

Age Calculator

How old you are in years, months and days, with totals, decimal age, your next birthday and birth weekday.

Date & Time

Unit Converter

Convert between units in 40 categories with exact factors, formulas and tables.

Tools

Scientific Calculator

Type or tap expressions with exact fractions, memory, variables, constants and complex mode.

Tools

Sources and further reading

  1. The International System of Units (SI Brochure), 9th ed., Table 8: non-SI units accepted for use with the SI (minute, hour, day) (opens in a new tab), Bureau International des Poids et Mesures
  2. 29 CFR 785.48: Use of time clocks (rounding of starting and stopping times) (opens in a new tab), Legal Information Institute, Cornell Law School
  3. Add or subtract time in Excel (opens in a new tab), Microsoft Support
  4. Calendrical Calculations: The Ultimate Edition (E. M. Reingold and N. Dershowitz), 4th ed., Cambridge University Press

Results are calculated in your browser with methods checked by automated tests, and are intended for learning and general use. For engineering, medical, financial, legal or safety-critical decisions, verify important values independently and follow the rounding rules your work requires. How accurate are these results?