How to calculate days between two dates
Choose a start date and an end date. The calculator converts both date-only values to UTC calendar-day numbers and subtracts the earlier from the later. This gives an exact day count without local time-of-day effects.
Does the calculator include the end date?
Not by default. January 1 to January 2 is one elapsed day. Enable Include end date to count the final calendar date as well, making the result two days.
Calendar days vs elapsed days
Elapsed days count the daily boundaries between the selected dates. Calendar-day counting can be inclusive when the end-date option is enabled. Weekends and holidays are included; use a future business-days calculator when those must be excluded.
How leap years affect date calculations
A leap year contains February 29. February 28 to March 1 spans two days in 2024, a leap year, but only one day in 2025. The calculator validates February 29 and uses actual calendar lengths.
Years, months, and days between dates
The calendar result counts complete calendar months from the earlier date, respecting month-end clamping and leap years, then counts remaining days. Twelve complete months are displayed as one year.
Worked examples
| Start | End | Total days |
|---|---|---|
| 2026-01-01 | 2026-01-02 | 1 |
| 2026-01-01 | 2026-01-31 | 30 |
| 2024-02-28 | 2024-03-01 | 2 |
| 2025-02-28 | 2025-03-01 | 1 |
| 2025-01-01 | 2026-01-01 | 365 |
| 2024-01-01 | 2025-01-01 | 366 |
Frequently asked questions
How many days are between two dates?
Select a start date and end date to see the elapsed calendar days. By default, the end date is not included.
Does the calculator include the start and end date?
The normal result counts elapsed days and excludes the end date. Enable Include end date to add one day to the interval.
How do leap years affect the result?
Leap years add February 29, so intervals that cross that date contain one extra day compared with equivalent non-leap-year intervals.
How do I calculate weeks between two dates?
Divide the total number of days by seven. This calculator shows complete weeks plus the remaining days.
Why can date calculations be wrong around daylight saving time?
Local timestamps can represent a calendar day as 23 or 25 hours during clock changes. This calculator uses UTC-normalized date-only values, avoiding that error.
Can I calculate dates in reverse order?
Yes. If the end date is earlier, the calculator displays the absolute difference and clearly notes that the entered order was reversed.
How is the years-months-days result calculated?
The calculator advances through complete calendar months using actual month lengths, then counts remaining days. Complete groups of 12 months are shown as years.