时间计算器 — 加减小时、分钟、秒

本时间计算器可对多个小时、分钟和秒的时间值进行加减运算。输入每段时间,选择加或减,即可即时查看 HH:MM:SS 格式的总结果,以及十进制小时、十进制分钟和总秒数。

Result

Total Time00:00:00
Decimal Hours0.0000
Decimal Minutes0.0000
Total Seconds0

常见问题

时间计算器是如何工作的?

时间计算器支持对时间进行加减运算。您可以输入两个时间点来计算时间差,也可以在某个时间点上加减小时、分钟或秒来得到新的时间点。支持处理跨午夜的情况(如 11:00 PM + 3 小时 = 2:00 AM)。

如何计算两个时间点之间的时间差?

输入开始时间和结束时间,计算器会自动计算差值并以小时、分钟、秒的格式显示。对于跨日的时间差(如从下午到次日早晨),可选择"跨日"选项,计算器会正确处理 24 小时制的进位。

如何将时间转换为十进制小时?

十进制小时 = 小时数 + 分钟数/60 + 秒数/3600。例如,2 小时 30 分 = 2 + 30/60 = 2.5 小时;1 小时 45 分 30 秒 = 1 + 45/60 + 30/3600 ≈ 1.758 小时。十进制格式便于计算工资(时薪 × 十进制小时数)。

时间单位的换算关系是什么?

1 天 = 24 小时;1 小时 = 60 分钟 = 3,600 秒;1 分钟 = 60 秒;1 周 = 7 天 = 168 小时;1 年 ≈ 365.25 天 = 8,766 小时(含闰年平均)。本计算器支持在这些单位间相互换算。

Time Addition Formula

Adding or subtracting time values follows a simple rule: convert everything to seconds, perform the arithmetic, then convert back to hours, minutes, and seconds.

Step 1 — Convert to seconds

Total Seconds = (hours × 3600) + (minutes × 60) + seconds

Step 2 — Add or subtract

Result = Time⊂1⊂ ± Time⊂2⊂ ± …

Step 3 — Convert back

Hours = ⌊Seconds / 3600⌋

Minutes = ⌊(Seconds mod 3600) / 60⌋

Seconds = Seconds mod 60

How to Add and Subtract Time

Use the calculator above by entering hours, minutes, and seconds for each time value. Toggle the + / button to add or subtract that row's time from the running total. Add as many rows as needed.

Example: Shift duration

A worker starts at 8:30 AM and finishes at 5:15 PM with a 45-minute lunch break.

  • Row 1 (+): 8 hours 45 minutes 0 seconds (8:30 AM to 5:15 PM = 8h 45m)
  • Row 2 (−): 0 hours 45 minutes 0 seconds (lunch)
  • Result: 08:00:00 — 8 hours of work

Example: Project time tracking

Combine multiple time logs across a day: 1h 20m, 2h 45m, and 0h 50m.

  • Row 1 (+): 1:20:00
  • Row 2 (+): 2:45:00
  • Row 3 (+): 0:50:00
  • Result: 04:55:00

Converting Time to Decimal

Decimal hours are often required for payroll, billing, or spreadsheet formulas. Converting is straightforward:

Decimal Hours = Total Seconds / 3600

Decimal Minutes = Total Seconds / 60

Example: 1 hour 30 minutes = 5400 seconds → 1.5 decimal hours or 90 decimal minutes.

Common Time Conversions Table

Use these reference values when converting between time formats:

HH:MM:SSDecimal HoursDecimal MinutesTotal Seconds
00:15:000.2515900
00:30:000.5301,800
00:45:000.75452,700
01:00:001.0603,600
01:30:001.5905,400
02:00:002.01207,200
04:00:004.024014,400
08:00:008.048028,800
12:00:0012.072043,200
24:00:0024.01,44086,400

Related Tools