Two additions and a subtraction
- Durations, one per line
- 1:45:30 2:20:15 - 0:30:00
- Total
- 3 h 35 min 45 s
- Total as H:MM:SS
- 3:35:45
- Decimal hours
- 3.5958 h
照合元:Python fractions: (6330 + 8415 − 1800) s = 12945 s = 3 h 35 min 45 s; 12945/3600 = 3.5958333…
Add and subtract hours, minutes and seconds from a list of durations, with the total as H:MM:SS, decimal hours, minutes and seconds.
更新日 検証済みの例:4
The 3 entries add up to 3:35:45 (H:MM:SS), which is 3.5958 hours or 215.75 minutes.
| Line | Entry | Seconds | Running total |
|---|---|---|---|
| 1 | 1:45:30 | 6,330 | 1:45:30 |
| 2 | 2:20:15 | 8,415 | 4:05:45 |
| 3 | - 0:30:00 | −1,800 | 3:35:45 |
H:MM:SS → 3600 × H + 60 × MM + SS.
12,945 s = 3:35:45
Each line is converted to seconds (3,600 × hours + 60 × minutes + seconds), lines that start with a minus sign are subtracted, and the sum is turned back into hours, minutes and seconds. Entries can be written as H:MM:SS, H:MM, 2h 15m, 90 min or 1.5 h. The total is a duration, not a time of day, so 23:59:59 plus one second gives 24:00:00 rather than wrapping to midnight.
Typical uses are adding up timesheet entries, video clip lengths, lap splits and flight legs. The default list, 1:45:30 plus 2:20:15 minus 0:30:00, totals 3:35:45, which is 3.5958 decimal hours or 215.75 minutes.
Decimal hours are the total seconds divided by 3,600, the form payroll and invoicing systems usually ask for: 7 hours 45 minutes is 7.75 hours. To find the time between a start and an end time of day, use the hours calculator instead.
照合元:Python fractions: (6330 + 8415 − 1800) s = 12945 s = 3 h 35 min 45 s; 12945/3600 = 3.5958333…
照合元:86399 + 1 = 86400 s by hand
照合元:3600 − 9000 = −5400 s by hand
照合元:5400 + 5400 + 45 = 10845 s; 10845 / 60 = 180.75 by hand
Add the hours and the minutes separately, then carry every 60 minutes into an hour. 1:45 plus 2:20 gives 3 hours and 65 minutes, and 65 minutes is 1 hour 5 minutes, so the total is 4:05. Seconds carry into minutes the same way. Typing each duration on its own line here does the carrying for you.
Divide the minutes by 60. 15 minutes is 0.25 hours, 45 minutes is 0.75 hours, so 7 hours 45 minutes is 7.75 hours, and 3:35:45 is 12,945 ÷ 3,600 = 3.5958 hours. When a timesheet rounds to two decimals, each 0.01 hour is 36 seconds, so 3.5958 is entered as 3.60.
Keep the whole hours and multiply the decimal part by 60 to get minutes. 1.5 hours is 1 hour 30 minutes, 3.6 hours is 3 hours 36 minutes and 0.1 hours is 6 minutes. Type an entry such as 3.6 h on a line here to see it shown as 3:36:00.
Start the line with a minus sign. If the minutes to take away are larger, borrow 60 minutes from the hours: 2:10 minus 0:45 becomes 1:70 minus 0:45, which is 1:25. The total can go below zero; 1:00 minus 2:30 gives −1:30:00, an hour and a half short.
Excel stores a time as a fraction of a day, so a plain h:mm format wraps after 24 hours and 25 hours shows as 1:00. Format the total cell with the custom format [h]:mm:ss and the square brackets let hours run past 24. To get decimal hours in Excel, multiply the time by 24.
精度は入力値と計算方法の前提に依存します。十進演算には有効数字50桁を使いますが、推定、数値計算手法、元データの精度はそれより低い場合があります。表示の丸め処理でこれらの制約がなくなるわけではありません。 独立した出典の解答と照合した計算例:4。 例えば、「Two additions and a subtraction」はPython fractions: (6330 + 8415 − 1800) s = 12945 s = 3 h 35 min 45 s; 12945/3600 = 3.5958333…と照合しています。
ISO 8601-1:2019 — durations and the extended time format hh:mm:ss; BIPM, The International System of Units (SI), 9th ed. — minute and hour as non-SI units accepted for use with the SI.
この計算機には、独立した出典の解答を使った計算例が 4 件あります。テストに組み込まれており、ここでも実行できます。
Calculate work hours, breaks and weekly timesheets. Use dates and a time zone for overnight shifts across daylight-saving changes and repeated hours.
任意のタイムゾーンの日時までの残り、または経過した日・時・分・秒をリアルタイムで表示し、時刻変更も考慮します。
1つのタイムゾーンの時刻を最大12の別の地域の現地時刻に変換します。夏時間を適用し、会議の予定表も表示します。
Unix timestamp converter: epoch seconds, milliseconds, microseconds or nanoseconds to an ISO 8601 UTC date and local time, and dates back to epoch time.
Military time converter: 12-hour to 24-hour time and back, how it is spoken, time-zone letters with the Zulu equivalent, and a full-day chart.