Marks Calc
Back to Blog
Updated
5 min read
Hours Calculator, Time Duration, Work Hours, Payroll, Overtime

How to Calculate Hours Between Times - Step-by-Step Guide

How to Calculate Hours Between Times - Step-by-Step Guide

You just finished a shift and your manager says "log your hours." You stared at the clock — 9:17 AM to 5:43 PM — and thought: how many hours is that, exactly? It's not a clean 8 hours. It's not 9. The math is annoying enough that most people round up or down and lose money over time.

Here is the reality: calculating hours between two times is simple arithmetic, but the details (breaks, overtime, overnight shifts) are where people make expensive mistakes. This guide walks through every scenario.

The Basic Formula: Time Duration

Duration = End Time − Start Time

That's it. The problem is that time isn't decimal — 2:30 is not 2.30 hours, it's 2.5 hours. You have to convert minutes to decimals before you can do anything useful with the result.

Step-by-Step: 9:17 AM to 5:43 PM

  1. Convert both times to 24-hour format: 9:17 → 09:17, 5:43 PM → 17:43
  2. Subtract hours: 17 − 9 = 8 hours
  3. Subtract minutes: 43 − 17 = +26 minutes
  4. Total: 8 hours 26 minutes
  5. Decimal hours: 8 + (26 ÷ 60) = 8.43 hours

That 0.43 hours matters. Over a 5-day work week, rounding down from 8.43 to 8.0 costs you 2.15 hours — roughly ₹500-1,000 at minimum wage.

What If Minutes Go Negative?

If the end minutes are smaller than the start minutes, borrow an hour:

Example: 8:45 AM to 4:20 PM

  • Hours: 16 − 8 = 8, but we borrow 1 → 7 hours
  • Minutes: (20 + 60) − 45 = 35 minutes
  • Total: 7 hours 35 minutes = 7.58 hours

Overnight Shifts: Crossing Midnight

If your end time is earlier than your start time, you crossed midnight. Add 24 hours to the end time.

Example: 10:00 PM to 6:30 AM (night shift)

  • Convert: 22:00 to 06:30
  • Since 06 < 22, add 24: 6 + 24 = 30
  • Hours: 30 − 22 = 8 hours
  • Minutes: 30 − 0 = 30 minutes
  • Total: 8 hours 30 minutes

The Trench Truth: Most payroll systems auto-detect overnight shifts. But if you're filling a manual timesheet, forgetting to add 24 hours is the #1 error that gets your paycheck shorted. Always double-check overnight calculations.

Subtracting Breaks: Net Working Hours

Most jobs require you to subtract unpaid breaks. The formula:

Net Hours = Total Duration − Break Time

Example: 9:00 AM to 6:00 PM with 1-hour lunch

  1. Total duration: 9 hours
  2. Subtract break: 9 − 1 = 8 net hours

Multiple Breaks

Some jobs have two breaks:

| Break | Duration | |-------|----------| | Morning tea | 15 min | | Lunch | 30 min | | Total breaks | 45 min |

9:00 AM to 5:30 PM = 8.5 hours − 0.75 hours = 7.75 net hours

Use our Hours Calculator to handle breaks automatically — just enter start, end, and break duration.

Calculating Payroll from Hours

Once you have net hours, multiply by your hourly rate:

Gross Pay = Net Hours × Hourly Rate

Overtime Calculation

In India, the Factories Act mandates overtime at 2× the normal rate for hours beyond 9 per day. In IT/office jobs, 1.5× is common practice.

Example: 10.5 net hours at ₹200/hour, overtime at 1.5× after 8 hours

| Component | Hours | Rate | Amount | |-----------|-------|------|--------| | Regular | 8 | ₹200 | ₹1,600 | | Overtime | 2.5 | ₹300 | ₹750 | | Total | 10.5 | | ₹2,350 |

Without overtime calculation, you'd get ₹2,100 — ₹250 less. Over a month, that's ₹5,000+ lost.

Weekly Hours: Adding Up Multiple Days

For a full work week, sum daily net hours:

| Day | Start | End | Break | Net Hours | |-----|-------|-----|-------|-----------| | Mon | 9:00 | 18:30 | 1h | 8.5 | | Tue | 9:00 | 19:00 | 1h | 9.0 | | Wed | 9:00 | 18:00 | 1h | 8.0 | | Thu | 9:00 | 18:45 | 1h | 8.75 | | Fri | 9:00 | 17:30 | 1h | 7.5 | | Total | | | | 41.75 |

At ₹200/hour regular + 1.5× overtime after 8h/day: ₹8,775/week vs ₹8,350 without overtime tracking.

Study Planner: Hours Until Your Exam

Students need to know how many study hours remain before an exam. The Hours Calculator study planner mode does this automatically, but here's the manual method:

  1. Count the days between now and your exam using the Date Duration Calculator
  2. Subtract non-study days (classes, sleep, meals)
  3. Multiply remaining days by planned study hours per day

Example: 14 days until exam, 6 hours/day available = 84 study hours. With 5 subjects, that's 16.8 hours per subject.

Pomodoro Conversion

One Pomodoro = 25 minutes study + 5 minutes break = 30 minutes total.

84 study hours ÷ 0.5 hours per Pomodoro = 168 Pomodoro sessions across 14 days = 12 sessions/day.

Frequently Asked Questions

Discussion

Loading comments...