- 2026.12.01 Invoice tracker spreadsheet: spot balances due for follow-up
- 2026.11.30 Google Sheets timesheet: calculate overnight shift hours You are here
- 2026.11.29 Business app development cost: what shapes your quote?
- 2026.11.29 Google Sheets vs a web app: which fits your workflow?
- 2026.11.28 Repair shop parts inventory: tie stock to each work order
- 2026.11.26 Shift handover checklist app: keep unfinished work visible
- 2026.11.25 Importing orders into Google Sheets without duplicate rows
- 2026.11.24 Google Sheets purchase order tracker: flag late deliveries
- 2026.11.22 AI email triage in Sheets: review labels before routing
- 2026.11.22 Google Sheets approval workflow: keep each decision visible
- 2026.11.19 Vehicle inspection checklist app: keep defects from disappearing
- 2026.11.18 Maintenance work order tracker: keep open jobs visible
- 2026.11.16 Expense approval spreadsheet: keep receipts with each claim
- 2026.11.15 Supplier price list CSV: review prices before a catalog update
- 2026.11.15 Google Forms response cleanup: check duplicates before reporting
- 2026.11.14 Customer request tracker spreadsheet: stop losing follow-ups
- 2026.11.13 Combine branch reports in Google Sheets without losing rows
- 2026.11.12 Shop inventory spreadsheet: why counts don't match
- 2026.11.11 Google Forms for Appointments: Form, Calendar, or Booking App?
- 2026.11.09 Invoice data entry to Google Sheets: review before posting
- 2026.11.08 Job site daily report app: capture work before the drive home
- 2026.11.08 Multi-location inventory spreadsheet: stop missing transfers
- 2026.11.06 Reconcile marketplace payouts with your orders in Google Sheets
- 2026.11.01 What to automate first in a small business office: pick one task
- 2026.10.31 Hiring someone to automate a spreadsheet: 5 questions before you sign
- 2026.10.29 Same order submitted twice at once? Stop duplicate rows in Sheets
- 2026.10.24 Slow Google Sheets script on order intake? Read once, write once
- 2026.10.20 Google Sheets CSV export drops leading zeros: keep IDs intact
- 2026.10.16 Google Sheets automation sent the email twice? 6 trigger traps
- 2026.10.16 Stop dragging formulas down in Google Sheets (ARRAYFORMULA)
- 2026.10.15 Filter, total and sort a Google Sheet with one formula (QUERY)
- 2026.10.15 Shift swaps from a phone: one approval, and the roster updates
- 2026.10.14 Google Sheets lookup shows the wrong value: VLOOKUP vs XLOOKUP
- 2026.10.14 Expense app that logs a coffee in two taps and totals in Sheets
- 2026.10.14 Daily check-in app with CSV export you can total in Google Sheets
- 2026.10.13 Stale data on your dashboard: when 'updated' doesn't mean fresh
- 2026.07.28 Tracking staff attendance in Google Calendar: where records break
- 2026.07.26 Google Sheet shared by link: how company data quietly leaks
- 2026.07.23 Form auto-reply emails that annoy customers, and how to fix them
- 2026.07.13 ChatGPT API bill higher than expected? Where the cost leaks
- 2026.07.07 I Vibe-Coded a Real GAS App — the Demo Was Fine, and the Field Broke Everything
- 2026.06.30 So How Do You Actually Vibe Code? Not the GPT App — Claude Code or Codex
- 2026.06.30 You Built a Slick Front End — and It's Stuck on localhost. Now Deploy It.
- 2026.06.30 Vibe Coding 101: Build with AI, Auto-Deploy Free on Cloudflare
- 2026.06.20 Monthly SaaS bill for a simple workflow: rent it or own a tool?
- 2026.06.19 Adding AI to a work app: what it costs each month, and who pays
- 2026.06.19 Automate repetitive office work in Google Sheets with Apps Script
- 2026.06.16 Field inspection app for a small team: paper checklist to phone
- 2026.06.10 Inventory tracking in Google Sheets for one store: where it stops
- 2026.06.08 Is Google Sheets automation free? No server bill, but plan upkeep
- 2026.06.06 Outsource, DIY or SaaS for one workflow: which costs less?
Google Sheets timesheet: calculate overnight shift hours
Calculate a 10 p.m.–6 a.m. shift in Google Sheets without a negative result, know when MOD is enough, and use explicit date-time values when dates matter.
Imagine a hypothetical timesheet row used only for explanation: work starts at 10 p.m. (22:00), ends the next morning at 6 a.m. (06:00), and has a 30-minute break. When B2 contains 22:00, C2 contains 06:00, D2 contains 30, and the shift is under 24 hours, =MOD(C2-B2,1)*24-D2/60 returns 7.5 decimal hours.
| Cell | Meaning | Fictional value |
|---|---|---|
| B2 | Start clock time | 22:00 |
| C2 | End clock time | 06:00 |
| D2 | Break minutes | 30 |
| E2 | Calculated decimal hours | 7.5 |
The row is invented for explanation, not a worker, customer, or real timesheet. Here 7.5 decimal hours means 7 hours 30 minutes.
Why does 6:00 minus 22:00 go negative?
Google Sheets stores a time-only value as a fraction of one day. In this example, 22:00 is about 0.9167 of a day and 06:00 is 0.25 of a day. Plain C2-B2 subtraction therefore moves backward by 16 hours within the same day; after subtracting the 30-minute break, the naive result is -16.5 hours.
MOD turns that negative time difference into the matching positive position in a 24-hour cycle. The difference of -0.6667 days becomes 0.3333 days, which is 8 hours. Subtracting 30 minutes as D2/60 gives 7.5 hours. Google’s official MOD function help is https://support.google.com/docs/answer/3093497?hl=en.
Use this formula only for shifts known to be under 24 hours:
=MOD(C2-B2,1)*24-D2/60
Put the start clock time in B2, the end clock time in C2, break minutes in D2, and this formula in E2. Format E2 as a number, not as a time of day, because the result is decimal hours.
The limitation is important: a time-only formula treats any earlier end time as an overnight end time. It has no date information, so it cannot detect a mistyped date. It also cannot distinguish an 8-hour shift from a 32-hour span because both leave the same position in a 24-hour cycle.
Planning diagram, not a spreadsheet screen or tested product. Path A uses clock times only for shifts under 24 hours; path B stores explicit start and end date-times so the actual dates participate in the calculation. Open the full-size diagram.
Which input method fits the timesheet?
| Practical question | Clock-only B2 and C2 | Explicit date-time B2 and C2 |
|---|---|---|
| What is stored? | A time fraction within one day | A date and time serial value |
| How is midnight handled? | An earlier end time is treated as overnight | The entered end date determines elapsed time |
| Shift-length limit | Use only under 24 hours | Arithmetic can measure longer spans; review unusual durations |
| Wrong-date detection | Not possible from the time cells | Missing or reversed date-times can be flagged |
| Reasonable use | Simple recurring shifts with reviewed input | Records that need exact dates, longer spans, or easier review |
Neither input method makes the entries correct by itself. The choice determines what the arithmetic can know. If the date matters to the record, put the date in the same value as the time rather than keeping it in a separate note.
When should you use explicit start and end date-times?
Use actual start and end date-time values when a record needs an explicit date, when a span could exceed 24 hours, or when a reviewer needs to catch missing and reversed entries. The values must be real spreadsheet date-time values, not plain text that only looks like a date.
With the same cell layout — start in B2, end in C2, break minutes in D2, calculated hours in E2 — use direct subtraction:
=(C2-B2)*24-D2/60
In the fictional example, B2 is 2026-11-30 22:00, C2 is 2026-12-01 06:00, and D2 is 30. The elapsed span is 8 hours; subtracting a 0.5-hour break produces 7.5 hours.
The following weekly illustration uses rows 2–8, with calculated hours in column E. Rows 4 and 8 are intentionally blank because the fictional schedule has no shift there.
| Row | B: start date-time | C: end date-time | D: break minutes | E: calculated hours |
|---|---|---|---|---|
| 2 | 2026-11-30 22:00 | 2026-12-01 06:00 | 30 | 7.5 |
| 3 | 2026-12-01 22:00 | 2026-12-02 05:30 | 30 | 7 |
| 4 | ||||
| 5 | 2026-12-03 22:00 | 2026-12-04 06:00 | 45 | 7.25 |
| 6 | 2026-12-04 22:00 | 2026-12-05 05:00 | 30 | 6.5 |
| 7 | 2026-12-05 23:00 | 2026-12-06 06:00 | 30 | 6.5 |
| 8 |
These dates, times, and breaks are invented teaching values. A real sheet should use the date-time format and input method of its own locale and spreadsheet settings.
How do you total the week in decimal hours?
If rows 2–8 are the week’s records and column E holds the calculated decimal hours, put the weekly total where the team expects it — for example, E9 — with:
=SUM(E2:E8)
In the fictional illustration, the populated cells are 7.5, 7, 7.25, 6.5, and 6.5, so the total is 34.75 decimal hours. That is 34 hours 45 minutes, not 34 hours 75 minutes.
This is only arithmetic over the rows present in E2:E8. It does not prove that the shifts happened, that the breaks were taken, or that the total is the correct payable time.
How can you flag problem entries for review?
For rows that use explicit date-times, an optional review cell such as F2 can catch three common input problems before anyone reads the hours:
=IF(OR(B2="",C2=""),"REVIEW MISSING",IF(C2<=B2,"REVIEW ORDER",IF(OR(D2<0,D2>(C2-B2)*24*60),"REVIEW BREAK","OK")))
The first branch marks a missing start or end as REVIEW MISSING. The second marks an end that is not after the start as REVIEW ORDER; this is where a reversed or mistyped date can become visible. The third marks a negative break, or a break longer than the elapsed span, as REVIEW BREAK. Otherwise it returns OK.
Treat the label as a review prompt, not proof. A row can be arithmetic-valid and still wrong: an end date one day too late may look valid if the resulting long span is plausible enough to pass the team’s checks. Do not use the calculated hours from a row marked for review until a person corrects or accepts the entry.
This date-time check should not be applied to the clock-only MOD setup, where an end clock time earlier than the start is the expected overnight pattern.
When is a mobile app worth scoping?
A shared spreadsheet can be a reasonable system when the people involved can enter accurate date-times and review exceptions in the same table. Nothing about the overnight calculation makes the spreadsheet inherently unsafe or inadequate.
A mobile app becomes worth scoping only when capture or review needs differ: for example, a person on a phone needs a guided start/end entry, a reviewer needs a smaller exception queue, or different roles need different record views. In that case, workflow automation may help connect the agreed review steps, while a mobile app may be one way to shape phone-side capture. Those are scoping options, not features the formulas already provide.
What does this calculation not decide?
The arithmetic does not determine payroll, overtime, wage, break entitlement, or local compliance rules. It does not know which minutes are payable, whether a break is required or unpaid, how overtime is defined, or which jurisdiction applies. Those decisions need the organization’s rules, qualified local advice where appropriate, and human review.
Google Sheets represents date and time values as serial numbers based on the spreadsheet’s time zone, and those serials do not store a time-zone offset. If a shift crosses a daylight-saving change or its times come from another zone, decide whether you need a wall-clock difference or actual elapsed time before relying on direct subtraction (Google’s date and number format notes).
For this guide, the displayed arithmetic formulas were evaluated locally in HyperFormula 3.5.0 against the stated fictional cell values. The checks produced 7.5 hours for both overnight examples, 34.75 hours for the weekly total, and the expected review labels for missing, reversed, and excessive-break cases. This was not a live Google Sheets test. No live spreadsheet, Google account, payroll system, worker record, or customer workflow was opened or tested.
For adjacent spreadsheet workflows, read how to decide between a shared Sheet and a web app and how to keep shift handovers visible.
If you want help shaping the workflow, send a sanitized sample schedule or a short workflow description. Remove worker names, business names, exact locations, customer identifiers, private notes, and account details; keep only the fields, example times, break rules, and review questions you want to examine.
Frequently asked questions
- Why does 6 a.m. minus 10 p.m. go negative in Google Sheets?
- Time-only cells are fractions of one day. When the end clock time is earlier than the start clock time, plain subtraction moves backward within the same day. MOD can wrap a shift under 24 hours, but it does not know the actual dates.
- Can MOD handle a shift longer than 24 hours?
- No. MOD returns the remainder within a 24-hour cycle, so it cannot represent the full elapsed time of a shift that lasts 24 hours or longer. Use real start and end date-time values instead.
- Does this worksheet calculate payroll or overtime?
- No. It only calculates elapsed decimal hours from entered values. Payroll, overtime, wages, breaks, and local compliance rules require separate decisions and review.
- 2026.12.01 Invoice tracker spreadsheet: spot balances due for follow-up
- 2026.11.30 Google Sheets timesheet: calculate overnight shift hours You are here
- 2026.11.29 Business app development cost: what shapes your quote?
- 2026.11.29 Google Sheets vs a web app: which fits your workflow?
- 2026.11.28 Repair shop parts inventory: tie stock to each work order
- 2026.11.26 Shift handover checklist app: keep unfinished work visible
- 2026.11.25 Importing orders into Google Sheets without duplicate rows
- 2026.11.24 Google Sheets purchase order tracker: flag late deliveries
- 2026.11.22 AI email triage in Sheets: review labels before routing
- 2026.11.22 Google Sheets approval workflow: keep each decision visible
- 2026.11.19 Vehicle inspection checklist app: keep defects from disappearing
- 2026.11.18 Maintenance work order tracker: keep open jobs visible
- 2026.11.16 Expense approval spreadsheet: keep receipts with each claim
- 2026.11.15 Supplier price list CSV: review prices before a catalog update
- 2026.11.15 Google Forms response cleanup: check duplicates before reporting
- 2026.11.14 Customer request tracker spreadsheet: stop losing follow-ups
- 2026.11.13 Combine branch reports in Google Sheets without losing rows
- 2026.11.12 Shop inventory spreadsheet: why counts don't match
- 2026.11.11 Google Forms for Appointments: Form, Calendar, or Booking App?
- 2026.11.09 Invoice data entry to Google Sheets: review before posting
- 2026.11.08 Job site daily report app: capture work before the drive home
- 2026.11.08 Multi-location inventory spreadsheet: stop missing transfers
- 2026.11.06 Reconcile marketplace payouts with your orders in Google Sheets
- 2026.11.01 What to automate first in a small business office: pick one task
- 2026.10.31 Hiring someone to automate a spreadsheet: 5 questions before you sign
- 2026.10.29 Same order submitted twice at once? Stop duplicate rows in Sheets
- 2026.10.24 Slow Google Sheets script on order intake? Read once, write once
- 2026.10.20 Google Sheets CSV export drops leading zeros: keep IDs intact
- 2026.10.16 Google Sheets automation sent the email twice? 6 trigger traps
- 2026.10.16 Stop dragging formulas down in Google Sheets (ARRAYFORMULA)
- 2026.10.15 Filter, total and sort a Google Sheet with one formula (QUERY)
- 2026.10.15 Shift swaps from a phone: one approval, and the roster updates
- 2026.10.14 Google Sheets lookup shows the wrong value: VLOOKUP vs XLOOKUP
- 2026.10.14 Expense app that logs a coffee in two taps and totals in Sheets
- 2026.10.14 Daily check-in app with CSV export you can total in Google Sheets
- 2026.10.13 Stale data on your dashboard: when 'updated' doesn't mean fresh
- 2026.07.28 Tracking staff attendance in Google Calendar: where records break
- 2026.07.26 Google Sheet shared by link: how company data quietly leaks
- 2026.07.23 Form auto-reply emails that annoy customers, and how to fix them
- 2026.07.13 ChatGPT API bill higher than expected? Where the cost leaks
- 2026.07.07 I Vibe-Coded a Real GAS App — the Demo Was Fine, and the Field Broke Everything
- 2026.06.30 So How Do You Actually Vibe Code? Not the GPT App — Claude Code or Codex
- 2026.06.30 You Built a Slick Front End — and It's Stuck on localhost. Now Deploy It.
- 2026.06.30 Vibe Coding 101: Build with AI, Auto-Deploy Free on Cloudflare
- 2026.06.20 Monthly SaaS bill for a simple workflow: rent it or own a tool?
- 2026.06.19 Adding AI to a work app: what it costs each month, and who pays
- 2026.06.19 Automate repetitive office work in Google Sheets with Apps Script
- 2026.06.16 Field inspection app for a small team: paper checklist to phone
- 2026.06.10 Inventory tracking in Google Sheets for one store: where it stops
- 2026.06.08 Is Google Sheets automation free? No server bill, but plan upkeep
- 2026.06.06 Outsource, DIY or SaaS for one workflow: which costs less?