Count the calendar days between two dates. The page always shows both numbers: the days between the dates (the start date is not counted) and the days that include the start date and the end date. A weeks-and-days line uses only the days-between count. Dates are calendar dates, so a leap day counts when it falls in the span. This is not a business-day or holiday counter, and it does not use a time of day.
Formula
Parse each date as year, month, and day numbers. Reject dates that are not real calendar days (do not roll 30 February into March). exclusive = absolute number of days from the start date to the end date (midnights crossed; the start date is not counted). inclusive = exclusive + 1. whole weeks = floor(exclusive / 7). leftover days = exclusive mod 7. The weeks line uses the exclusive count only. If the end date is earlier, keep the positive span and say so. No business days, holidays, or time of day.
Frequently asked questions
What is the difference between days between dates and counting both dates?
Days between (not counting the start date) is how many days you step from the start date to the end date. From 1 January to 2 January that is 1. Days counting both the start date and the end date includes each of those dates, so the same pair is 2. On one calendar day, days between is 0 and counting both is 1. When the dates are valid, counting both is the days-between count plus 1. Both numbers are always shown. There is no switch that hides one of them.
Does a leap day count?
Yes, when 29 February is a real date in that year and it falls in the span. From 28 February 2024 to 1 March 2024 is 2 days between (29 February and 1 March) and 3 days counting both (28 February, 29 February, and 1 March). In 2023, 29 February does not exist, so 28 February to 1 March is 1 day between and 2 days counting both. A full leap year from 1 January 2024 through 31 December 2024 is 365 days between and 366 days counting both. The same span in 2023 is 364 days between and 365 days counting both. 29 February 2023 is rejected rather than moved to 1 March.
What if both dates are the same day?
Days between (not counting the start date) is 0. Days counting both the start date and the end date is 1. The weeks line uses only the days-between count, so it reads 0 weeks and 0 days.
What if the end date is before the start date?
The page still shows a positive span. It does not return a negative day count. A line tells you the end date is earlier than the start date, and the labels stay the same. 1 March 2024 back to 28 February 2024 is the same 2 days between and 3 days counting both as the forward pair, plus that earlier-date note.
Are weekends, holidays, or time zones included?
No. These are calendar dates only. The count does not skip weekends, holidays, or business days, and it does not use a clock time or a time zone. Two entries on the same calendar day are the same day even if you were thinking about different hours.
How are the weeks and leftover days calculated?
Whole weeks and leftover days come from the days-between count only, not from the count that includes both dates. Nine days between dates is 1 week and 2 days. Two days between dates is 0 weeks and 2 days. The inclusive number is not divided into weeks.