Days Between Dates Calculator
How many days until Thanksgiving, until your wedding, or since you started that 90-day gym challenge?
- Accurate to the exact day
- Leap years handled for you
- No spreadsheets or manual counting
Days Between Dates Calculator
Enter your numbers and press Calculate
How to use the calculator
The calculator has six numeric fields arranged in two blocks: start date (day, month, year) and end date (day, month, year).
1. Type the day (1–31), the month as a number (1 = January, 12 = December) and the year (1900–2100) of your start date. 2. Do the same for the end date. 3. The result updates instantly: you get the total days, the full weeks, and the leftover days.
Typical uses in the U.S.: checking how many days are left on a 30-day return window, counting down to the closing date on a house, or tracking the 180 days of a visa stay. If the end date is earlier than the start date, the result is negative — it means the end date is already in the past. The count is a difference: from June 11 to June 12 there is 1 day, not 2 (the start day does not count itself).
Formula and worked example
The calculator converts each date into a serial day number (days elapsed since January 1, 1970) using the civil-calendar algorithm for the Gregorian calendar, then subtracts the two numbers. The formula in plain text:
`` year' = (month <= 2) ? year - 1 : year era = floor(year' / 400) yoe = year' - era * 400 mp = month + (month > 2 ? -3 : 9) doy = floor((153 * mp + 2) / 5) + day - 1 doe = yoe * 365 + floor(yoe / 4) - floor(yoe / 100) + doy serial = era * 146097 + doe - 719468 ``
Then: total days = serial(end) − serial(start); full weeks = trunc(days / 7); leftover days = days − weeks × 7.
Worked example for November 26, 2026 (Thanksgiving): November comes after February, so year' = 2026; era = floor(2026/400) = 5; yoe = 2026 − 2000 = 26; mp = 11 − 3 = 8; doy = floor((153·8 + 2)/5) + 26 − 1 = 245 + 25 = 270; doe = 26·365 + 6 − 0 + 270 = 9766; serial = 5·146097 + 9766 − 719468 = 20783. June 11, 2026 works out to serial 20615. Difference: 20783 − 20615 = 168 days, which is exactly 24 full weeks with 0 days left over. The shifted-year trick (starting the year in March) pushes the leap day to the very end, so the formula needs no month lookup tables.
Practical examples
The table shows four real calculations made with this tool:
| Start date | End date | Total days | In weeks |
|---|---|---|---|
| Jan 1, 2026 | Jul 4, 2026 (Independence Day) | 184 | 26 weeks + 2 days |
| Jun 11, 2026 | Nov 26, 2026 (Thanksgiving) | 168 | 24 weeks exactly |
| Jul 4, 2026 | Dec 25, 2026 | 174 | 24 weeks + 6 days |
| Feb 28, 2024 | Mar 1, 2024 | 2 | 0 weeks + 2 days |
Note the last row: 2024 was a leap year, so between February 28 and March 1 there are 2 days (February 29 counts). In a common year like 2026 it would be just 1. The Thanksgiving row shows a perfect week split: 168 = 24 × 7 + 0. And if you flipped the first row (July 4 back to January 1), the result would be −184: same interval, opposite sign.
Frequently asked questions
Does the count include the start day or the end day?
The tool computes the difference between the two dates: from June 11 to June 12 there is 1 day. In other words, it counts the nights between the dates, not the calendar squares. If you need both endpoints included (say, counting billable days of a rental that charges per calendar day), add 1 to the result.
Does it account for leap years?
Yes. The algorithm uses the civil Gregorian calendar from 1900 to 2100 with the full rules: years divisible by 4 are leap years, except century years not divisible by 400. That is why between Feb 28, 2024 and Mar 1, 2024 it counts 2 days (Feb 29 exists), while in 2026 it would count only 1.
What does a negative result mean?
It means the end date comes before the start date. The absolute value is still the true distance between them: −65 days means the end date was 65 days ago relative to the start. This is handy for measuring how long ago something happened without swapping the fields.
Does it count calendar days or business days?
It counts calendar days, including Saturdays, Sundays and holidays. Many deadlines are written that way (a 30-day return window means 30 calendar days). If you need to exclude weekends — for example, for shipping estimates or court deadlines expressed in business days — use our business days calculator, built exactly for that.
About this calculator
This days-between-dates calculator gives you the exact answer instantly: enter a start date and an end date and you get the total number of days, the full weeks, and the leftover days. The math runs on the civil (Gregorian) calendar from 1900 to 2100, so leap years like 2024 and 2028 are counted correctly. Counting squares on a wall calendar is error-prone — it is remarkably easy to be off by one. Here the count is deterministic: from June 11 to November 26, 2026 there are exactly 168 days, which happens to be 24 full weeks on the dot. It also works backwards: if the end date comes before the start date, the result is negative, handy for figuring out how many days have passed since an event.