Date Difference Calculator
Days, weeks, months and business days between two dates.
Reviewed by the Calculation Machine team · Updated 24 October 2026 · How we check our maths
Your values
ⓘ Live results
- Total days
- 358
- Weeks and days
- 51 weeks, 1 days
- Whole months
- 11
- Years and months
- 0 years, 11 months
- Working days
- 257
- Hours
- 8,592
Quick answer
The number of days between two dates is the later date minus the earlier one, counting calendar days and leap days but not counting the start date. From January 1 to December 25, 2026 is 358 days, or 51 weeks and 1 day. If you want both the first and last day included, as for a trip or a hotel stay, add one.
What the Date Difference calculator does
Enter a start date and an end date in YYYY-MM-DD format. The calculator returns the total number of days, the same span in weeks and days, the number of whole calendar months, years and months, the number of working days (Monday to Friday) and the equivalent in hours. You can enter the dates in either order.
People use it to count down to an event, check how long a contract, notice period or warranty has run, work out the length of a trip, or measure the gap between two invoices. For someone's exact age use the age calculator; to find the date a set number of days from today, use the date add or subtract calculator.
Working days here exclude weekends only. Public holidays vary by country and state, so subtract them yourself, or use the business days calculator when holidays matter, for example for legal deadlines or payroll.
The formula
Days = end date − start date (in whole days) Weeks = floor(days ÷ 7), remainder days = days mod 7 Whole months = (year₂ − year₁) × 12 + (month₂ − month₁), minus 1 if day₂ < day₁ Hours = days × 24
| Symbol | Meaning | Unit |
|---|---|---|
| start date, end date | The two calendar dates, in either order | YYYY-MM-DD |
| days | Calendar days elapsed, excluding the start date and including the end date | days |
| whole months | Complete calendar months, counted by date rather than by dividing by 30 | months |
Dates follow the Gregorian calendar and the ISO 8601 date format. Leap years (every year divisible by 4, except century years not divisible by 400) are handled automatically, so February 2024 and 2028 have 29 days. Times of day and daylight saving changes are ignored, so the hours figure is simply days × 24. The working-days count includes both the start and end date if they fall on weekdays. This page also replaces the former trip length calculator.
Worked examples
Length of a two-week vacation
Flying out on Friday, July 3, 2026 and returning Friday, July 17, 2026.
Inputs
- Start date2026-07-03 YYYY-MM-DD
- End date2026-07-17 YYYY-MM-DD
Result
- Total days14
- Weeks and days2 weeks, 0 days
- Whole months0
- Years and months0 years, 0 months
- Working days11
- Hours336
The result is 14 days, which is the number of nights away; counting both travel days, the trip covers 15 calendar days. Of the 11 weekdays, July 3 is the US federal Independence Day holiday in 2026 because July 4 falls on a Saturday, so you would book 10 days of leave in the US.
Leap-year February
The gap from February 1 to March 1, 2024.
Inputs
- Start date2024-02-01 YYYY-MM-DD
- End date2024-03-01 YYYY-MM-DD
Result
- Total days29
- Weeks and days4 weeks, 1 days
- Whole months1
- Years and months0 years, 1 months
- Working days22
- Hours696
29 days because 2024 is a leap year; the same dates in 2026 give 28. It counts as exactly one whole calendar month either way.
Time at a job
Someone started work on September 15, 2023 and checks their tenure on October 24, 2026.
Inputs
- Start date2023-09-15 YYYY-MM-DD
- End date2026-10-24 YYYY-MM-DD
Result
- Total days1,135
- Weeks and days162 weeks, 1 days
- Whole months37
- Years and months3 years, 1 months
- Working days811
- Hours27,240
3 years and 1 month, or 1,135 days. Benefits that vest at 3 years have already passed; check whether your employer counts from the hire date or the first full month.
Inclusive or exclusive: which count do you need
The day total here is exclusive of the start date, which is the standard way to measure elapsed time: from Monday to Tuesday is 1 day. Some situations count differently:
- Trips and hotel stays: the result equals the number of nights. Add 1 to get the number of calendar days you are away.
- Events, rentals charged per day and leave: usually inclusive. A rental from the 1st to the 5th is often billed as 5 days.
- Legal and notice periods: rules differ by jurisdiction and contract; many exclude the day of the triggering event and include the last day. Check the wording before relying on a count.
- Pregnancy and medical intervals: measured in completed weeks and days from a defined start date, which the weeks figure gives directly.
Days in each month
Calendar months are uneven, which is why "one month" is not a fixed number of days and why 30 days from January 31 lands in early March.
| Days | Months |
|---|---|
| 31 | January, March, May, July, August, October, December |
| 30 | April, June, September, November |
| 28 | February in common years |
| 29 | February in leap years (2024, 2028, 2032…) |
How whole months are counted
Whole months are counted by the calendar: a month is complete when the end date reaches the same day number as the start date. March 1 to March 31 is 30 days but 0 whole months, while March 31 to April 30 is also counted as 0 because April has no 31st. If you need an average-month figure for billing, divide total days by 30.44, the mean length of a Gregorian month.
How to use the Date Difference Calculator
- 1Enter the start date as YYYY-MM-DD, for example 2026-01-01.
- 2Enter the end date in the same format; the order does not matter.
- 3Read the total days (start date not counted) and add 1 if you need both dates included.
- 4Use the working-days figure for weekday counts, then subtract any public holidays in the period.
Frequently asked questions
How many days are there between two dates?
Subtract the earlier date from the later one. This calculator counts every calendar day after the start date up to and including the end date, so June 1 to June 30 is 29 days.
Does the calculator include the end date?
It includes the end date but not the start date. To count both, add one day to the result.
How many weeks are between two dates?
Divide the day count by 7. The calculator shows whole weeks plus the remaining days, for example 358 days is 51 weeks and 1 day.
How many days are in a year?
365 in a common year and 366 in a leap year. The average Gregorian year is 365.2425 days.
Are public holidays excluded from working days?
No. Only Saturdays and Sundays are excluded, because holidays depend on your country and region. Subtract them manually or use a business days calculator that lets you choose them.
References
- ISO 8601: Date and time format — International Organization for Standardization (ISO)
- Federal holidays — US Office of Personnel Management
About this calculator
- Built and reviewed by the Calculation Machine team · How we build and test calculators
- Last reviewed: October 24, 2026
- Report an error