Day Counter
Count the exact number of days between two dates — and see the same span as years/months/days and as weeks. Works for past, future, or mixed.
Total days between
365 days
- Years (calendar)
- 1
- Months (after years)
- 0
- Days (after months)
- 0
- Whole weeks
- 52
- Total weeks (decimal)
- 52.14
1y 0m 0d apart, or 52w 1d. Calendar arithmetic on the proleptic Gregorian calendar in UTC, so daylight-saving and timezone offsets do not shift the count.
How to use this calculator
Enter the start date (year, month, day) and the end date. The result updates as you type. To find days until a future date, set the start to today; to find days since a past date, set the end to today. If the end is before the start, the headline value is shown as negative — the breakdown still tells you how far apart the dates are.
How the calculation works
Both dates are anchored to 00:00 UTC and subtracted, then divided by 86,400,000 ms per day. Working in UTC means the count is unaffected by daylight saving or the user's timezone. The years/months/days breakdown borrows from the previous calendar month's actual length when needed — so 31 January to 1 March 2025 is "1 month and 1 day" (borrowing the 28 days of February), exactly as Wolfram Alpha and calculator.net report it.
Worked example
2024-02-29 to 2025-03-01: difference is 366 days (2024 was a leap year), or 1 year, 0 months, 1 day — because 29 Feb 2024 to 28 Feb 2025 is exactly one calendar year (the 29th has no equivalent in 2025), then one extra day reaches 1 March.
Frequently asked questions
Does the day counter include both the start and end day?
No — it counts the calendar gap between the two dates, not "days inclusive". 1 March to 2 March is 1 day. If you need an inclusive count (e.g. "how many days am I on holiday from the 1st to the 7th?"), add 1 to the result: 1–7 March is 6 days apart, but 7 days of holiday.
How does it handle leap years?
Leap years are handled automatically. 2024, 2028, and 2032 each have 29 February; 2100 does not (years divisible by 100 are not leap years unless also divisible by 400). The proleptic Gregorian calendar is applied uniformly, even for dates before 1582 when the Gregorian calendar was actually adopted — that is the ISO 8601 convention.
Why is "1 month" sometimes 28, 29, 30, or 31 days?
Calendar months are not all the same length, and the breakdown reflects that. If your dates straddle February it can borrow 28 or 29 days; across April it borrows 30; across December, 31. The total day count is always exact regardless — only the years/months/days view depends on which months the span covers.
What if the end date is before the start date?
The headline value is shown as negative (e.g. "-30 days") so the direction is clear. The years/months/days and weeks breakdown is shown as a magnitude — the absolute size of the gap.
Are timezones or daylight saving applied?
No. Both dates are treated as 00:00 UTC, so the day count is purely calendar-based. This avoids the classic off-by-one error where a "DST spring-forward" 23-hour day rounds to 0 days. If you actually need elapsed clock time across timezones, use a duration calculator instead.
How far back or forward can I count?
JavaScript Date objects safely handle dates from roughly 271,821 BC to 275,760 AD. For practical use (years 1 to 9999), the input fields cover the full ISO 8601 four-digit year range. The proleptic Gregorian calendar is applied throughout, which matches ISO 8601 and astronomical convention.