Date Difference Calculator
Count the days, weeks, months, years, hours and business days between two dates and times. DST-aware, and the result link can be shared.
The interactive tool loads here when JavaScript runs.
About this toolWhat is the Date Difference Calculator?
Enter a start and an end date and time and the calculator shows the gap in several ways at once: total years, months, weeks, days, hours and minutes; a breakdown such as "4 weeks, 2 days, 0 hours"; and the number of business days (Monday to Friday) and weekend days in between.
It recalculates as soon as both fields are filled, and the dates are written into the page URL, so you can send someone a link that opens with the same calculation. The Copy button puts a plain-text summary and that link on the clipboard.
Calculations run in your browser using your local time zone. Public holidays are not known to the tool, so the business-day figure counts weekdays only.
- Total years, months, weeks, days, hours and minutes
- Calendar-aware months and years, DST-aware days
- Exact weekday and weekend counts
- Shareable URL with the start and end dates
- Plain-text copy of the full result
Updated
How to use the Date Difference Calculator
- Pick a Start Date and an End Date with the date and time pickers.
- Read the Total Duration panel for the gap in each unit; it updates automatically.
- Check the Breakdown line for weeks, days, hours, minutes and seconds combined.
- Look at Business Days for the count of weekdays between the two dates.
- Click Copy to share a text summary with a link that reopens the same dates.
Worked examples
Across a short month
Input
Start 2024-01-31 00:00, End 2024-03-01 00:00
Output
30 days, 1 month, 4 weeks 2 days, 22 business days
February 2024 has 29 days, so the span is 30 days and exactly one calendar month (31 January to the clamped 29 February, plus a day).
The spring-forward day
Input
Start 2024-03-10 00:00, End 2024-03-11 00:00 (New York)
Output
Days: 1, Hours: 23
One calendar day passed, but only 23 hours of elapsed time, because the clocks jumped forward an hour that night.
Background and insight
Days, months and years here are calendar units, not averages. From 31 January to 1 March 2024 is 30 days and one full month, not 0.99 of a 30.44-day month. Years are counted the same way, so 29 February 2024 to 28 February 2025 is still zero full years. This matches date-fns differenceInMonths and differenceInYears and how people count ages and anniversaries.
Hours and minutes are real elapsed time, and that is where daylight saving shows up. Midnight 10 March to midnight 11 March 2024 in the US Eastern zone is one calendar day but only 23 hours, because clocks skipped from 2:00 to 3:00. The total shows 1 day and 23 hours, both of which are correct answers to different questions.
The business-day count follows the usual convention: count each weekday from the start date up to, but not including, the end date. Friday to the following Monday is one business day (the Friday) and two weekend days. If you need the end date included, add one day to the end.
Common use cases
Project timelines
Count the weeks and working days left before a release or a contract end date.
Ages and anniversaries
Get whole years and months between a birth date or start date and today.
SLA and incident reviews
Measure the exact hours and minutes between an alert and its resolution.
Notice periods
Check how many business days fall between a resignation date and a last day.
Tips and limitations
- If the end date is earlier than the start date, the figures are the same size and a note tells you the order was reversed.
- Business days exclude weekends only. Subtract public holidays for your country yourself.
- For a whole-day count that ignores clock times, set both times to 00:00.
- Both dates are read in your device's time zone. To compare instants from different zones, convert them first with the Time Zone Converter.
Sources and further reading
- differenceInMonths, date-fns. Full calendar months between two dates
- Daylight Saving Time Rules, National Institute of Standards and Technology. Why a calendar day can be 23 hours long
Frequently asked questions
How many days are there between two dates?
Enter both dates and read Days under Total Duration. It counts full calendar days, so midnight to midnight across a daylight saving change still counts as one day. For a whole-day answer that ignores times, set both times to 00:00.
Does the date difference include the end date?
No. Like most date libraries and spreadsheet DATEDIF, it measures the gap, so 1 January to 2 January is one day. If you are counting days of an event where both the first and last day count, add one to the result.
How are business days counted between two dates?
Business days are Monday to Friday, counted from the start date up to but not including the end date. Friday to Monday is one business day. Public holidays are not removed, because they differ by country and region.
Why does the calculator say 1 day but 23 hours?
Because a daylight saving change happened in between. When clocks spring forward, a calendar day lasts 23 hours; in autumn it lasts 25. Days count calendar days and hours count elapsed time, so both numbers are correct.
How are months counted between dates?
Months are full calendar months, using date-fns differenceInMonths. 31 January to 1 March 2024 is one month. Older calculators divide by an average of 30.44 days, which gives different answers around short months.
Can I share a date difference with someone?
Yes. The start and end values are stored in the page URL as start and end parameters, so copying the address bar or using Copy shares a link that opens with the same dates already filled in.
Is there an in-depth guide to the Date Difference Calculator?
Yes. “Date Math for Developers: Month Ends, DST Days and Unix Time” covers the background, how it works, common pitfalls and worked examples. Read the full guide.
Related Tools You May Like
Free, in-browser tools that pair well with this one.