Days Between Dates Calculator
Enter a start date and an end date to calculate the difference in days, weeks, approximate months and approximate years.
Not sure? Turn your internet off and try — it still works.
How it works
The difference is calculated in calendar days between the two dates entered. If the end date is earlier than the start date, the calculator automatically swaps the order so the result is always positive — a notice shows when this happens. Approximate months and years use calendar averages (30.44 days per month and 365.25 days per year, which already accounts for leap years) and work as a quick reference, not an exact count of civil months or years. The start date is not counted: from January 1 to January 2 is 1 day, and the same date twice is 0 days. If your rule counts both the first and the last day (some contracts, bookings and deadlines do), add 1 to the result. The calculator does not know your rule, and it does not count business days, holidays or hours: it only counts calendar days. Leap years follow the Gregorian rule, as the US Naval Observatory states it: every year divisible by 4 is a leap year, except century years, which are leap years only if divisible by 400. So 1900 was not a leap year and 2000 was. In the calculator, February 28 to March 1 is 1 day in 2023 and 2 days in 2024, and January 1 to the next January 1 is 365 days in 2026 and 366 days in 2028. Dates are compared as calendar days in UTC, so daylight saving time, which makes some local days 23 or 25 hours long, does not change the result. The calendar used is the proleptic Gregorian calendar, the one the browser's JavaScript uses (ECMAScript specification): dates from before the Gregorian calendar was adopted are counted as if it had always existed. Two tables come out of the calculator's code: common periods from 7 to 366 days in whole weeks and leftover days and, for some years, whether they are leap years and how many days they have. The count is in calendar days, that is, every day of the calendar; business days and holidays are left out.
Common periods in weeks and days
| Days | Whole weeks | Leftover days |
|---|---|---|
| 7 | 1 | 0 |
| 30 | 4 | 2 |
| 60 | 8 | 4 |
| 90 | 12 | 6 |
| 100 | 14 | 2 |
| 180 | 25 | 5 |
| 365 | 52 | 1 |
| 366 | 52 | 2 |
Leap years and common years
| Year | Leap year? | Days in February | Days in the year |
|---|---|---|---|
| 2024 | Yes | 29 | 366 |
| 2025 | No | 28 | 365 |
| 2028 | Yes | 29 | 366 |
| 2100 | No | 28 | 365 |
| 2400 | Yes | 29 | 366 |
Frequently asked questions
Related tools
Age Calculator
Calculate exact age in years, months, and days from a birth date.
Calculators
Percentage Calculator
Calculate percentages: what X% of Y is, increases, discounts, and more.
Calculators
Unix Timestamp Converter
Convert a Unix timestamp to date and time, and a date back to a timestamp — in seconds or milliseconds.
Development
Click Counter
Manual tally counter with several counters and a total.
Text