Date Difference Calculator
Pick a start date and an end date. The calculator counts the days between them, splits the count into whole weeks and days, and gives the calendar distance in years, months and days. Choose whether the end date itself is counted.
Answer
Days between
290days
41 weeks and 3 days · 9 months, 17 days.
- weeks and days
- 41 w 3 d
- calendar distance
- 9 months, 17 days
- hours
- 6,960
Check the work
Every line comes from the same calculation as the answer.
days = end − start (+ 1 if the end date is counted)
| days | 18 October 2026 − 1 January 2026 | 290 |
|---|---|---|
| weeks | ⌊ 290 ÷ 7 ⌋, remainder | 41 w 3 d |
| calendar | 1 January 2026 + 9 months, 17 days | 18 October 2026 |
How it works
Counting days by hand goes wrong at month ends, because months have 28 to 31 days and leap years add a 29th of February. The calculator counts actual calendar days, so a span across February in a leap year is one day longer than the same span in an ordinary year.
There are two common ways to count. The difference between two dates leaves out the start day, the way “how many days from Monday to Friday” gives 4. Counting both dates, as a hotel stay or an inclusive deadline often does, adds one. The calculator shows both conventions and lets you choose.
The years, months and days breakdown steps forward from the start date a whole year, then whole months, then the remaining days. When a month is shorter than the start day — counting a month from 31 January — the step lands on the last day of that month.
Formula
days = end − start (+ 1 if the end date is counted); weeks = ⌊days ÷ 7⌋
Each date is converted to a day number on one continuous calendar, and the difference is the number of days between them. Whole weeks are the day count divided by seven, rounded down.
Worked examples
- Try these numbers
1 January to 18 October 2026
- January to September add up to 273 days, so 1 October is day 273 after 1 January.
- 18 October is 17 days later: 290 days.
- 290 ÷ 7 = 41 whole weeks and 3 days.
290 days — 41 weeks and 3 days, or 9 months and 17 days.
- Try these numbers
The same period counting both dates
- The difference is 290 days.
- Counting the end date as well adds one: 291 days.
- 291 ÷ 7 = 41 weeks and 4 days.
291 days counting both 1 January and 18 October.
- Try these numbers
February in a leap year
- 2024 is a leap year, so February has 29 days.
- From 1 February to 1 March is 29 days.
- That is exactly 1 month, or 4 weeks and 1 day.
29 days — one day more than the same dates in 2026.
Inputs and results
- Start date
- The first date of the period.
- End date
- The last date, on or after the start date.
- Count the end date
- Whether the end date is counted as a day of the period, adding one day.
- Days
- Calendar days between the dates, plus one when the end date is counted.
- Weeks and days
- The day count split into whole weeks and leftover days.
- Years, months and days
- Whole years, then whole months, then days, stepping forward from the start date.
When to use it
- Counting the days until an event, a deadline or a holiday.
- Working out how long a project, a contract or a pregnancy has run so far, in weeks and days.
- Checking an inclusive count where both the first and last day matter, such as a booking or a notice period.
Common mistakes
- Expecting the count to include both dates when it does not: switch to counting the end date if your situation counts both days.
- Swapping the dates. The end date must be on or after the start date.
- Reading 9 months and 17 days as 9.17 months; months and days are separate units.
What it does not do
- It counts whole calendar days and ignores times of day and time zones.
- It does not exclude weekends or public holidays, so it is not a business-day counter.
- It does not apply any legal rule for how a deadline is counted; check the rule that governs your case.
Method and assumptions
Both dates are mapped to day numbers in the Gregorian calendar, including leap years (every fourth year, except century years not divisible by 400). Their difference is the elapsed day count; counting the end date adds one.
The calendar breakdown adds whole years to the start date while the result stays on or before the end date, then whole months, and counts the days that remain. Day numbers that do not exist in a shorter month are moved to that month’s last day.
Assumptions
- Dates are whole calendar days with no time of day.
- The Gregorian calendar applies to every date entered.
Edge cases
- The same date for start and end gives 0 days, or 1 day when the end date is counted.
- An end date before the start date is refused with a message on the end date.
- A span starting on 31 January counts one month as ending on the last day of February.
Sources and corrections
This calculator uses an elementary formula, so it needs no outside data source. The method, the rounding rules and how a reported error is corrected are set out in the site standards.
Result looks wrong?
Send the inputs you used and the answer you expected. Every report is checked against the formula and its tests, and confirmed errors are corrected in public.