Days Between Dates Calculator
Count the number of calendar days between two dates, with the difference always shown as a positive value.
What this calculator counts
Give it a start date and an end date and it returns the number of calendar days between them. With the defaults — 1 January 2026 to 17 November 2026 — the result is 320 days. The two dates are treated as midnight-to-midnight calendar days, leap years are included automatically, and the answer is always positive regardless of which date you put first.
How the day count is computed
Both dates are converted to timestamps, subtracted, and divided by the number of milliseconds in 24 hours. The absolute value forces a positive result, so entering the dates in either order gives the same number. Because the inputs carry no time of day, the count is a clean calendar-day difference: 1 January to 2 January is 1 day, and 1 January to 1 January is 0 days.
Exclusive endpoints, inclusive spans
The result measures the gap between the two dates, excluding both endpoints. If you are counting a trip that departs 1 January and returns 8 January, the gap is 7 days but the trip occupies 8 calendar days — add 1 when you need the inclusive count. Hotel stays, rental periods and event days almost always need that +1; deadlines and “days remaining” questions usually do not.
Worked example with the default dates
From 1 January 2026 to 17 November 2026: 2026 is a common year, so February contributes 28 days. The monthly sum is 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 = 304 days to the end of October, plus 17 days into November gives 321 as the day-of-year of 17 November. Subtracting the starting day leaves 320 days, exactly what the calculator reports. A leap year would raise the same span to 321 days because of 29 February.
The result also survives a reversal: entering 17 November 2026 as the start and 1 January 2026 as the end still returns 320, because the subtraction is wrapped in an absolute value before the division.
Reference spans at a glance
| Period | Days | Note |
|---|---|---|
| 1 week | 7 | Exactly, always |
| 1 fortnight | 14 | Exactly, always |
| 1 month (average) | 30.44 | Actual months run 28 to 31 |
| 1 common year | 365 | 2026, 2027, 2028… all 365 except leap years |
| 1 leap year | 366 | 2028 is the next one after 2026 |
| 1 decade | 3,652 or 3,653 | Two or three leap days inside the span |
The average month matters for back-of-envelope work: 12 months average 365.2425 ÷ 12 = 30.44 days, which is why 30-day estimates drift several days over long spans. The calculator never averages — it counts the real calendar, including every 28-day February and 31-day July.
What changes the count
- Leap years: any span covering 29 February gains one day, so the same start and end dates differ across a leap year versus a common year
- Century rules: 2000 was a leap year but 2100 will not be, because years divisible by 100 are leap only when divisible by 400
- Endpoint convention: the raw result excludes both endpoint days; an inclusive count needs +1
- Timezones: the count uses local calendar days, so a span is stable within your timezone but can differ by a day on devices set to another zone near midnight
Common mistakes when counting days between dates
- Multiplying months by 30 — the true default span here is 320 days across 10.5 months, not 315, because four of those months have 31 days
- Forgetting the +1 for inclusive counts — a 320-day difference covers 321 calendar days including both endpoints
- Assuming order matters — the absolute value makes swapped dates return the same 320
- Estimating a year as exactly 52 weeks — 365 ÷ 7 = 52.14, so a year is one weekday longer than 52 weeks (two longer in a leap year)
Counting across a year boundary
Spans that cross 31 December work the same way; the calendar arithmetic just keeps counting. From 17 November 2026 to 17 November 2027 the gap is 365 days, and from 17 November 2027 to 17 November 2028 it is 366 because 2028 contains a leap day. Anniversaries measured this way land on the same date each year but not always on the same day count.
For a richer breakdown that splits the gap into years, months and days, use the Date Difference Calculator. To convert the day count into weeks, the Weeks Between Dates Calculator divides the same span by 7 with the remainder shown separately.
Frequently asked questions
How many days are between 1 January 2026 and 17 November 2026?
320 days. The day-of-year of 17 November in a common year is 321, and subtracting the first day leaves 320. Swapping the two dates gives the same result.
Does the count include the start or end date?
It reports the gap between the dates, excluding both endpoints. For an inclusive count of a trip or stay, add 1 — a 320-day gap spans 321 calendar days.
Does it account for leap years?
Yes. Any span containing 29 February automatically gains a day. From 17 November 2026 to 17 November 2028 is 731 days: 365 for 2027 plus 366 for leap-year 2028.
Can I count days in the past as well as the future?
Yes. The result is always positive, so past and future spans are treated identically and the order of entry does not change the answer.
How many days are in each month?
January, March, May, July, August, October and December have 31; April, June, September and November have 30; February has 28, or 29 in a leap year such as 2028.
Why is the average month 30.44 days?
A Gregorian year averages 365.2425 days, and 365.2425 ÷ 12 = 30.44. Using 30 days per month in estimates loses about 5 days per year, which is why the 320-day default span beats a 10.5 × 30 guess.
How do I convert the day count to weeks?
Divide by 7 and keep the remainder. The 320-day default span is 45 weeks and 5 days, since 45 × 7 = 315 and 320 − 315 = 5.
What happens if the end date is before the start date?
Nothing breaks: the subtraction is made absolute, so the tool returns the same positive count either way. There is no negative result and no separate past mode.
How many days are in 2026?
365, because 2026 is not a leap year. The next leap year is 2028 with 366 days, and 2100 will be a common year despite being a century, since it is not divisible by 400.
Method and sources
- Gregorian calendar day arithmetic.