Time Duration Calculator Online — Free Time Duration Calculator Tool

CodexFuse Team · 2026-11-06T21:47:58.904Z · 13 min read min read

Free time duration calculator: exact hours and minutes between two times, overnight shifts included, with a worked payroll example.

A time duration calculator answers a question that looks trivial until you get it wrong: how long passed between two clock times? Anyone who has ever added up a week of shifts by hand, or argued over a freelancer's invoice, knows the answer is rarely as simple as it looks. Cross midnight, forget a lunch break, or misread 24-hour time, and the total quietly drifts — and with it, the pay, the bill, or the deadline.

This guide explains exactly how a time duration calculator works, where manual maths goes wrong, and how to use CodexFuse's free tool to get an exact answer in seconds — including overnight shifts. No sign-up, no install, and the calculation runs entirely in your browser.

What is a time duration calculator?

A time duration calculator is a free online tool that takes a start time and an end time and returns the exact gap between them in hours and minutes, plus the total in minutes. Enter 09:30 and 14:45 and it returns 5 hours 15 minutes — 315 minutes in total. The one job it does better than mental arithmetic is handling the cases where subtraction is not straightforward, chiefly shifts that cross midnight.

It is not a timesheet system and it is not a payroll tool. It answers one narrow question, precisely, and that narrowness is the point: when the question is small, a small tool beats a spreadsheet.

Why do people get time durations wrong by hand?

Time is not decimal, and that is the whole trap. An hour has 60 minutes, so subtracting 09:45 from 14:15 is not a clean column subtraction — you borrow 60, not 100. Most errors come from exactly this mismatch, and they cluster in four familiar places.

  • The midnight crossing: a shift from 22:00 to 06:00 is 8 hours, not −16. Anyone subtracting naively gets a negative number and then guesses.
  • The borrowed hour: 14:15 minus 09:45 needs 15 − 45, which borrows an hour; people routinely borrow 100 instead of 60 and land a full hour out.
  • The break that never got deducted: an 09:00 to 17:00 day is 8 hours on paper and 7 hours 30 minutes once a 30-minute lunch is accounted for. The calculator returns the raw gap, so the break must be handled deliberately.
  • The 12-hour confusion: 7:00 in the morning and 7:00 in the evening are 12 hours apart. A 24-hour clock removes the ambiguity entirely, which is why the tool uses it.

None of these errors is dramatic on its own. Over a week of shifts, or a month of billable hours, they compound into real money — an hour under-billed here, a half-hour overpaid there.

How does the CodexFuse time duration calculator work?

Open the time duration calculator and you will see four fields: start hours, start minutes, end hours, end minutes. Everything uses the 24-hour clock — hours from 0 to 23, minutes from 0 to 59. Enter the times, click Calculate, and the result appears in hours and minutes with the total minutes underneath.

Three presets fill the times for you. 9-5 sets 09:00 to 17:00, an 8-hour day. Morning sets 08:30 to 12:30, a 4-hour block. Night sets 22:00 to 06:00, an 8-hour overnight shift. Each preset is a starting point — adjust the times after tapping one and recalculate.

Behind the scenes the maths is simple and exact. Both times are converted to minutes since midnight, the start is subtracted from the end, and if the result is negative, 24 hours (1,440 minutes) are added — that single rule is what makes overnight shifts work. The result is then split back into hours and minutes.

Pro Tip

When you need decimal hours for an invoice, divide the total minutes by 60. A 315-minute session is 5.25 billable hours, and 220 minutes is 3.67 hours. The tool shows total minutes precisely so this conversion is one division, not a fresh calculation.

A worked example: the overnight warehouse shift

Consider a fictional scenario — a warehouse supervisor in Manchester, let's call her Sarah, who needs to log a night shift for payroll. Her team member, Dan, clocks in at 22:40 and clocks out at 06:15 the next morning. He takes a 45-minute unpaid meal break at 02:00. Sarah needs the payable hours, and she needs them right.

Step one: the raw gap. Sarah opens the time duration calculator and enters 22:40 as the start and 06:15 as the end. Because the end time is earlier than the start, the tool adds 24 hours and reads 06:15 as the next day. The result: 7 hours 35 minutes — 455 minutes in total. Done by hand, this is exactly the calculation most people get wrong, because 06:15 minus 22:40 crosses midnight and borrows across the hour boundary twice.

Step two: the break. The tool has no break field, so Sarah accounts for it by adjusting the end time. The shift runs 22:40 to 06:15 with a 45-minute break, so the payable window is equivalent to 22:40 to 05:30. She re-enters 05:30 as the end time and the tool returns 6 hours 50 minutes — 410 minutes. That is the payable figure.

Step three: the money. Dan earns £14.50 an hour. 410 minutes is 6.833 hours, so the shift pays £99.08. If Sarah had forgotten the break and used the raw 455 minutes, she would have overpaid by £10.88 on a single shift — and across a four-person night team, five nights a week, that mistake would cost around £217 a week.

The same pattern works for freelancers logging billable sessions, parents splitting childcare hours, and anyone totalling a day of appointments. The tool's job is the arithmetic; the judgement — breaks, rounding rules, rates — stays with the person using it.

Stop losing hours to manual time maths

Every shift you add up by hand is another chance to under-bill a client or overpay a team. CodexFuse's free tools handle the arithmetic — and when the admin behind the hours gets heavier, CodexFuse manages your hosting, email and security for you, fully managed, on credits.

Get Started with CodexFuse

When should you use a duration calculator instead of a spreadsheet?

A spreadsheet is the right tool when you are totalling a whole week or month of entries, applying pay rates, and keeping a permanent record. A duration calculator is the right tool for the single gap in front of you right now. The dividing line is simple: one pair of times, use the calculator; twenty pairs of times, use a sheet.

There are also moments when the calculator is simply faster. Checking a single invoice line before sending it, confirming a shift length during a phone call, or settling a quick question about how long a meeting ran — each takes under ten seconds in the tool and several minutes of fumbling in a spreadsheet. Speed matters most when the question is small.

TaskBest toolWhy
One shift or session lengthDuration calculatorInstant, no setup, no formula errors
A full week of shiftsSpreadsheet or time card toolTotals and rates need a table
Adding several durations togetherTime addition calculatorBuilt for summing, not single gaps
Converting 12-hour to 24-hour timeTime converterRemoves AM/PM ambiguity first
Planning a day of blocksTime blocking plannerStructure, not just arithmetic

For the related jobs, CodexFuse has matching free tools: the time addition calculator sums several durations at once, the time card calculator totals a week of clock-ins and clock-outs, and the time converter moves between 12-hour and 24-hour formats before you start.

What are the honest limits of this tool?

A good tool is honest about its edges, and this one has several worth knowing before you rely on it.

  • No seconds: the tool works in whole minutes only. A gap of 45 seconds either way is invisible to it — fine for shifts, wrong for timing a race.
  • No dates: the longest gap it can express is just under 24 hours. A job that runs from Monday morning to Tuesday evening is outside its scope.
  • No break field: as the worked example showed, breaks need a manual adjustment to the end time. Forgetting this step is the most common source of error when using the tool itself.
  • No saving or history: everything runs in the browser and nothing is stored. The result disappears when you close the tab, so copy it — the one-click copy button puts the result on your clipboard as text — before you move on.
  • No rounding rules: payroll systems often round to the nearest quarter hour. The tool reports the exact figure; applying your employer's rounding policy is your job.

If you need durations with seconds, multi-day spans, or saved records, a spreadsheet or a dedicated time-tracking app is the honest answer. Use the calculator for what it is good at and nothing else.

Important

Equal start and end times return 0 hours 0 minutes — the tool reads them as the same moment, not a 24-hour span. If you genuinely worked a full 24 hours, split it into two entries, for example 09:00 to 00:00 and 00:00 to 09:00, and add the two results.

How do you handle breaks, overtime and split shifts?

Real working days are rarely a single clean block, so here is how to handle the three most common complications with this tool.

Unpaid breaks

Subtract the break from the end time before entering it, as in the worked example. A 09:00 to 17:00 day with a 30-minute lunch becomes 09:00 to 16:30, giving 7 hours 30 minutes. For two breaks, subtract both: a 60-minute lunch plus a 15-minute break turns 09:00 to 17:00 into 09:00 to 15:45.

Overtime thresholds

Calculate the full day first, then split it against the threshold. An 09:00 to 19:00 day is 10 hours; against an 8-hour standard day that is 8 regular hours and 2 overtime hours. The calculator gives you the total — the split is a subtraction you do once, not a second calculation.

Split shifts

Calculate each block separately and add the results with the time addition calculator or by hand. A morning block of 07:00 to 11:00 (4 hours) and an evening block of 17:00 to 21:30 (4 hours 30 minutes) total 8 hours 30 minutes. Trying to force a split shift into a single start-to-end entry is the one mistake the tool cannot save you from, because the gap between the blocks is not working time.

Suggested Reading

If you plan your day in blocks rather than single shifts, read our guide to the time blocking planner — it pairs well with the duration calculator when you are building a schedule and then checking how long each block actually ran.

How do freelancers and small teams use it day to day?

For a freelancer, the tool earns its keep at invoicing time. Log each session's start and end as you work — a notebook, a notes app, anything — then run each pair through the calculator when the invoice is due. The total-minutes figure is what you convert to decimal hours, and the hours-and-minutes figure is what you show the client, because clients trust "5 hours 15 minutes" more than "5.25" — it reads as a real session, not a rounded number.

For a small team, the pattern is the same at a slightly larger scale. A manager checking a week's paper timesheets can verify any single entry in seconds, and the overnight rule catches the night-shift entries that spreadsheets most often miscalculate. Pair it with the task manager to keep the day's work organised alongside its timings, and the whole admin loop — plan the day, time the work, bill the hours — stays in free tools instead of a paid subscription.

That subscription point is worth pausing on. Time tracking is one of those jobs where software vendors sell a monthly plan for something a free calculator does in ten seconds. The same logic applies to the infrastructure underneath a small business: hosting, email, security and backups each arrive as a separate subscription, each with its own surprise bill, until the total quietly exceeds what the business can justify. CodexFuse exists to collapse that stack into one managed platform on credits — you pay for what you use, nothing sits idle on a monthly charge, and there is no server to babysit.

Frequently Asked Questions

How do I calculate the duration between two times?

Convert both times to minutes since midnight, subtract the start from the end, and convert the result back to hours and minutes. The calculator does this for you: 09:30 to 14:45 is 885 minus 570, which is 315 minutes, or 5 hours 15 minutes. If the end time is earlier than the start, it adds 24 hours first, so overnight gaps work automatically.

How does the tool handle overnight shifts?

If the end time is earlier than the start time, the tool adds 24 hours and reads the end as the next day. A night shift from 22:00 to 06:00 is 8 hours, and 23:50 to 00:20 is 30 minutes. You never get a negative duration for a shift that crosses midnight.

Can I subtract a break from the duration?

There is no break field, so adjust the end time instead. For a 09:00 to 17:00 shift with a 30-minute lunch, enter 09:00 to 16:30 and the tool shows 7 hours 30 minutes. For two breaks, subtract both from the end time before entering it.

Does it show decimal hours?

No — the result is hours and minutes plus the total minutes. To get decimal hours, divide the total minutes by 60: 315 minutes is 5.25 hours and 220 minutes is 3.67 hours. The total-minutes figure is shown with every result precisely for this conversion.

What are the limits of the time duration calculator?

Hours run 0 to 23 and minutes 0 to 59, with no seconds and no dates, so the longest gap is just under 24 hours. An hour of 24 or a minute of 60 is rejected, and equal start and end times give 0 hours 0 minutes. Nothing is saved — copy the result before closing the tab.

Is the time duration calculator free?

Yes, free and unlimited, with no account and no sign-up. Everything runs in your browser, and the result can be copied to your clipboard in one click. Like every tool on CodexFuse, it is free to use as often as you need it.

Stop doing time maths by hand

A time duration calculator will not run your business, but it will stop the small arithmetic errors that quietly cost you money — the mis-borrowed hour, the forgotten lunch break, the midnight shift that came out negative. Use it for every single gap, convert total minutes to decimal hours for invoices, and keep the judgement calls — breaks, rounding, rates — where they belong: with you.

And if the admin around those hours is the real drain — the hosting that needs patching, the email that keeps failing, the backups nobody has checked — move it to CodexFuse. One fully managed platform, on credits, with no subscriptions and no server babysitting. Open a free account, bring your hosting, email and security under one roof, and spend the hours you save on the work that actually pays.

Featured on Twelve Tools Hunt for Tools Featured on LaunchBuff Launch Llama Tools Launch your MCP Top Web Development Companies in the US - OnToplist.com Designer Listings Listed on SeeWhatNewAI Featured on SubmitMySaas Featured on AI Agents Directory Product Wing SaaS Wheel