Duration Calculator
Calculate time between dates, add or subtract durations, and convert between time units
Calculate exact time gaps between any two dates, add or subtract multiple durations, and convert between time units — seconds to weeks, hours to days, all of it. Pick your dates, hit Calculate, and get a full breakdown down to the second. And everything runs in your browser. Nothing gets uploaded.
How It Works
The calculator parses your date and time inputs into JavaScript Date objects, then computes the difference down to the second. For the "Duration Between" mode, it accounts for actual calendar lengths — so February's 28 or 29 days, months with 30 or 31 days, all of that is handled correctly. The add/subtract and conversion modes work with raw time values, treating months as 30 days and years as 365 for straightforward math.
Examples
Planning a trip abroad
You booked flights and need to know exactly how many days you'll be gone for a house-sitter.
Start: 2026-06-14 08:30
End: 2026-07-03 19:45
19 days, 11 hours, 15 minutes
= 27,855 total minutes
Adding up task time for a freelance invoice
Three separate work sessions this week — you need one total to bill the client.
Row 1: 0d 3h 45m 0s
Row 2: 0d 5h 20m 0s
Row 3: 0d 2h 10m 0s
Mode: Add
0 days, 11 hours, 15 minutes, 0 seconds
= 40,500 total seconds
Quick unit conversion for a science assignment
The textbook says a reaction takes 2.5 hours. Your lab sheet wants the answer in seconds.
Value: 2.5
From: Hours
To: Seconds
2.5 Hours = 9,000 Seconds
Who Uses This
Figuring out exactly how many working days sit between a kickoff and a deadline.
Converting between seconds, milliseconds, and days when debugging timestamp logic.
Adding up hours across multiple sessions to calculate billable time for invoices.
Converting time units for physics and chemistry homework without pulling out a calculator.
Common Mistakes
The calculator will still work, but you'll get a negative duration that might confuse you. Double-check the order — start date should come first chronologically.
The unit converter treats one month as exactly 30 days and one year as 365 days. That's a standard approximation. If you need precision around specific months (say, February to April), use the "Duration Between" tab with actual dates instead.
If you only pick dates and leave times at 00:00, you'll get a result that's off by hours. Set both the date and time for an accurate calculation — especially for things like flight durations or shift lengths.
Technical Details
- Processing: 100% client-side — nothing leaves your browser
- Browser Support: Chrome, Firefox, Safari, Edge
- Precision: Down to the second for date differences; up to 6 decimal places for unit conversions
- Month/Year Approximation: 1 month = 30 days, 1 year = 365 days (converter only)
Frequently Asked Questions
How do I calculate the number of days between two dates?
Go to the "Duration Between" tab, enter your start date and end date, then hit Calculate. You'll get the result broken down into years, months, days, hours, minutes, and seconds — plus a total in each unit.
Does the duration calculator account for leap years?
Yes. The "Duration Between" mode uses actual calendar dates, so leap years with 366 days are handled automatically. You don't need to think about it — the math adjusts on its own.
Can I add multiple time durations together?
Absolutely. Switch to the "Add / Subtract" tab. Add as many duration rows as you need (days, hours, minutes, seconds each), pick "Add" mode, and click Calculate. It'll give you the combined total.
How do I convert hours to minutes or days to seconds?
Use the "Convert Units" tab. Type in your number, pick the source unit (like hours), pick the target (like minutes), and the result shows instantly. It also shows the equivalent in every other unit at the same time.
Is my date and time data stored anywhere?
No. All calculations run entirely in your browser with JavaScript. Nothing is uploaded to a server — not your dates, not your results, nothing. Close the tab and it's gone.