If you've ever stared at a timesheet wondering whether that overnight coding session was 5 hours or 6, you're not alone. Calculating hours worked sounds simple — until you cross midnight, forget to account for a lunch break, or realize your client's payroll system needs decimal hours, not "4 hours and 35 minutes." This guide walks you through all of it, in plain English.
Let's start with the easy version. If you worked from 9:00 AM to 5:30 PM, you just subtract the start time from the end time:
5:30 PM − 9:00 AM = 8 hours and 30 minutes
Simple enough. But the moment you add overnight shifts, breaks, or multiple sessions in a day, things get messy fast.
| Start time | End time | Hours worked |
|---|---|---|
| 9:00 AM | 5:00 PM | 8 hours 0 min |
| 10:30 AM | 4:45 PM | 6 hours 15 min |
| 8:00 AM | 1:30 PM | 5 hours 30 min |
| 2:00 PM | 7:20 PM | 5 hours 20 min |
This is where most people go wrong. Say you start work at 10:00 PM and finish at 3:15 AM. If you just subtract 10:00 from 3:15, you get a negative number — which obviously makes no sense.
The fix is simple: add 24 hours to the end time when it falls on the next day.
Example
Start: 10:00 PM (22:00)
End: 3:15 AM → treat as 27:15
27:15 − 22:00 = 5 hours 15 minutes
You can also think of it this way: count forward from your start time to midnight (that's 2 hours), then add the time from midnight to when you finished (3 hours 15 minutes). 2 + 3:15 = 5 hours 15 minutes. Same answer, different route.
| Start time | End time (next day) | Hours worked |
|---|---|---|
| 10:00 PM | 3:15 AM | 5 hours 15 min |
| 11:30 PM | 7:00 AM | 7 hours 30 min |
| 9:45 PM | 6:30 AM | 8 hours 45 min |
| 8:00 PM | 2:00 AM | 6 hours 0 min |
Our free hours calculator handles overnight shifts automatically. Just punch in your start and end time and it figures out the rest — no mental gymnastics needed.
Try the Hours Calculator →Most payroll systems and invoicing tools don't accept "6 hours and 40 minutes" — they want a decimal number like 6.67. Converting is easy once you know the trick.
The formula: take your minutes and divide by 60. That gives you the decimal part.
Quick formula
Minutes ÷ 60 = decimal fraction
So 5 hours 23 minutes → 23 ÷ 60 = 0.38 → 5.38 hours
And 3 hours 45 minutes → 45 ÷ 60 = 0.75 → 3.75 hours
Here's a quick reference for the most common minute values:
| Minutes | Decimal | Example (6 hrs +) |
|---|---|---|
| 15 min | 0.25 | 6.25 hours |
| 20 min | 0.33 | 6.33 hours |
| 30 min | 0.50 | 6.50 hours |
| 40 min | 0.67 | 6.67 hours |
| 45 min | 0.75 | 6.75 hours |
| 50 min | 0.83 | 6.83 hours |
Once you have your decimal hours, multiply by your rate to get your invoice amount. For example, at ₹2,000/hour, 6.75 hours works out to ₹13,500.
Not every hour you're present is a billable hour. If your contract doesn't pay for lunch or breaks, you need to subtract that time before invoicing.
The cleanest way to do this is to run two separate calculations:
Example
Shift: 9:00 AM to 6:30 PM = 9 hours 30 min
Lunch break: 1:00 PM to 1:45 PM = 45 min
Net billable: 9h 30min − 45min = 8 hours 45 min (8.75 hours)
Watch out: Some freelancers forget to account for short breaks — a 10-minute coffee here, a 15-minute break there. Over a week those add up. Be consistent: decide upfront what you're billing for and stick to it every day.
Convert any time between 400+ time zones in one click — no mental math, no Googling 'what is IST to EST right now.'
Open the Time Zone Converter →If you work in bursts rather than one continuous block, add up each session individually and then total them at the end. Don't try to calculate from your first start to your last end time — that inflates your hours by including the gap in between.
| Session | Start | End | Duration |
|---|---|---|---|
| Morning | 9:00 AM | 12:30 PM | 3h 30min |
| Afternoon | 2:00 PM | 5:15 PM | 3h 15min |
| Evening | 8:00 PM | 10:00 PM | 2h 0min |
| Total | 8h 45min (8.75 hours) |
This kind of split-day tracking is common for freelancers who work around family commitments, client calls, or just prefer working in focused sprints.
If you're billing a client in a different country, you might find yourself on calls at odd hours, which then leads to overnight work sessions. The hours calculation itself doesn't change — you still just measure elapsed time from when you started to when you stopped, in your local time.
Where time zones actually matter is scheduling: figuring out what time a meeting is in your city when your client says "let's hop on a call at 3 PM EST." For that, our time zone converter takes care of the conversion instantly.
The best time tracking system is one you'll actually use. Here's a dead-simple routine that works for most freelancers:
At the start of each session: note the time somewhere — a sticky note, a notes app, anywhere. Don't rely on memory.
At the end of each session: note the end time and calculate the duration right away. Don't leave it for later — later turns into "I'll just round it" which turns into lost money.
At invoice time: add up all your session durations for the period, convert to decimal, multiply by your rate, done.
If you're billing the same client regularly, a simple spreadsheet with columns for date, start, end, and hours works perfectly. You don't need fancy software for this.