By Iqbal Hussain, Founder and calculator developer · Formulas checked against worked examples · Last updated
Hours by Day Calculator
Split timestamped sessions across calendar days.
How Hours by Day Calculator Works?
The Hours by Day Calculator works by splitting every timestamped session at midnight and assigning each part to its own calendar date.
- 1
Paste sessions
Paste sessions with start and end date-times, for example Mon 20:00 – Tue 04:00.
- 2
Split at midnight
The session splits into Mon 20:00–24:00 (4h) and Tue 00:00–04:00 (4h).
- 3
Read daily totals
The calculator lists hours per date across all sessions.
Hours by Day Calculator Formula
The Hours by Day formula is Hours(date) = Σ length of each session’s part that falls between 00:00 and 24:00 on that date.
- Sᵢ, Eᵢ: start and end of session i.
- d: midnight at the start of date d.
Example: sessions Mon 08:00–12:00, Mon 22:00–Tue 06:00, and Tue 14:00–18:00 give Monday 6 hours and Tuesday 10 hours.
Hours by Day Calculator Conversion Table
The Hours by Day conversion table shows 4 sessions allocated across 3 dates.
| Session | Monday | Tuesday | Wednesday |
|---|---|---|---|
| Mon 08:00–12:00 | 4 | 0 | 0 |
| Mon 22:00–Tue 06:00 | 2 | 6 | 0 |
| Tue 14:00–18:00 | 0 | 4 | 0 |
| Tue 21:00–Wed 07:00 | 0 | 3 | 7 |
| Daily total | 6 | 13 | 7 |
What is Hours by Day Calculator?
The Hours by Day Calculator is an allocation tool that splits timestamped sessions across calendar days and totals hours per date.
Daily limits, daily overtime, and daily reports need hours per calendar date. The Hours by Day Calculator splits overnight sessions at midnight, so a 22:00–06:00 shift adds 2 hours to the first date and 6 hours to the second.
What are the uses of Hours by Day Calculator?
There are 5 main uses of the Hours by Day Calculator, including daily limit checks, overnight shift reports, and daily summaries.
-
Daily limit checks
Managers check no date exceeds 12 hours.
-
Overnight shift reports
Payroll splits night shifts across 2 dates.
-
Daily summaries
Freelancers summarize tracker exports by date.
-
Machine logs
Operators report runtime per calendar date.
-
Sleep tracking
Individuals allocate sleep across dates.
Hours by Day Calculator FAQ
How do I use the Hours by Day Calculator?
1. Paste sessions: Paste sessions with start and end date-times, for example Mon 20:00 – Tue 04:00. 2. Split at midnight: The session splits into Mon 20:00–24:00 (4h) and Tue 00:00–04:00 (4h). 3. Read daily totals: The calculator lists hours per date across all sessions.
What formula does the Hours by Day Calculator use?
The Hours by Day formula is Hours(date) = Σ length of each session’s part that falls between 00:00 and 24:00 on that date. In short: Hours(d) = Σᵢ max(0, min(Eᵢ, d+24h) − max(Sᵢ, d)).
Can you show a worked example?
sessions Mon 08:00–12:00, Mon 22:00–Tue 06:00, and Tue 14:00–18:00 give Monday 6 hours and Tuesday 10 hours.