What it does
The calculator counts the days from a Start date to an End date. It also shows the same span in years, months and days, in weeks and days, and in hours, with the weekday of each date. The answer updates as soon as you change a date, and the sum under it shows how it was worked out.
How to use it
- The page opens with today as the Start date and the day 30 days from now as the End date.
- Change either date with the calendar, or type the year, month and day.
- Tick Include the end date if the last day should count too.
- Select Copy result to put the answer on your clipboard. The calculator remembers whether you ticked Include the end date on this device. The dates aren’t kept: each visit starts from today.
How it’s calculated
Each date is turned into a day number: the count of days from 1 January in the year 1, which is day 1. The days between two dates are the End date’s number minus the Start date’s number. With Include the end date, 1 more day is counted, so the result moves 1 further from 0. For 10 March to 9 April 2026 the sum is 739,715 − 739,685 = 30 days. Years, months and days count whole months first: as many as fit before the later date, where a month ends when the same day of the month comes round again, or on the last day of a shorter month. Twelve months make a year, and the days left over come last. Weeks and days split the same span into 7-day weeks, and hours are the days × 24. The calculator uses the Gregorian calendar for every date, extended back to the year 1, and whole days only, with no times of day, time zones or daylight saving.
Good to know
- Dates can be anything from 1 January 0001 to 31 December 9999. A date outside that range, or one that doesn’t exist, such as 29 February 2023, is marked at its field.
- From one date to the same date is 0 days, or 1 day with the end date included.
- Swapping the two dates changes only the sign of the count. The years, months, weeks and hours stay the same.
- Months have different lengths, so the same number of days can be a different number of months: 31 January to 29 February 2024 is 29 days and 1 month, while 1 March to 30 March 2024 is also 29 days but not yet a month.
- Dates before 1582, when the Gregorian calendar began, follow its rules too, so they can differ from the calendar that was in use at the time.
Privacy
Everything is calculated in your browser, on your device. Nothing you type is uploaded. The dates aren’t stored; only your choice for Include the end date is kept, in this browser’s storage, so the page can show it again.