Days Between Dates Calculator

Count calendar days between two dates, with an option to include the end date.

Date Range

By default, this counts full calendar day boundaries and excludes the end date.

Result

Total days30
Full weeks4
Remaining days2
Signed resultNo

Pick a start date and an end date. The calculator returns the calendar days between them, the count in full weeks, and the leftover days. Every day inside the span counts: weekdays, weekends, and public holidays alike. That is the contrast with the business days calculator, which removes Saturdays, Sundays, and holidays from the same window. Toggle "Include end date" to count both endpoints when a billing period or notice window owes its closing day. Reverse the inputs and the count flips negative, so the sign tells you direction. The math runs in UTC, which means the result never shifts because of your time zone.

Common use cases

  • Counting nights on a lease. A tenant moves in 2026-04-27 and the lease ends 2026-04-30. Leave "Include end date" off and the calculator returns 3 nights stayed, which is what most leases bill. Switch the toggle on and the count becomes 4, the inclusive day count many landlords quote in marketing.
  • Sizing a project window. A statement of work commits to delivery within 60 calendar days from a kickoff date. Enter kickoff as start, scroll the end date until the count hits 60, and read the deadline straight off the calendar. To shift forward by an exact number of days instead, use the date add or subtract calculator.
  • Pricing a long-term car rental. A rental that picks up 2026-06-01 and returns 2026-08-31 covers the back half of summer. Include the end date and the calculator returns 92 days, the figure that multiplies against the daily rate. Without the toggle the count is 91, the difference being whether the return day itself is billed.
  • Counting days until an anniversary. Pick today as start and a milestone date as end. The result tells you how many days remain. For ongoing 'days since' or 'days until' counts that recompute as the wall clock advances, pin one endpoint to today and refresh the page.
  • Reconciling two dated documents. A contract dated 2024-02-01 names a renewal date 2024-03-01. The calculator returns 29 days because 2024 is a leap year. The same span starting 2025-02-01 returns 28 days, which is the easiest way to see leap-year handling in the result rather than trusting it.

How it works

The calculator parses both inputs as plain YYYY-MM-DD values and asks date-fns for the difference in calendar days, ignoring any time of day. The result is signed: positive when the end is after the start, negative when the inputs are reversed, zero when they match. The "Include end date" toggle adds one to the magnitude in either direction, so reversing the inputs always flips the sign and keeps the absolute count consistent.

  1. Enter the start date. Pick the earlier endpoint in YYYY-MM-DD form. The browser date picker writes the value for you; manual entry follows the same ISO 8601 layout.
  2. Enter the end date. Pick the later endpoint. Either input can sit before the other in the calendar; the calculator handles reversed pairs by returning a negative count.
  3. Decide whether to include the end date. Leave the toggle off when the end date is the moment the clock stops, like a deadline at midnight. Switch it on when the end date itself counts, like the last billable day of a rental.
  4. Read the four result rows. Total days is the signed count. Full weeks is the integer quotient of the absolute count divided by seven. Remaining days is the remainder. Signed result flags negative spans for direction-aware downstream math.

Worked examples

Standard 30-day span

Enter start 2026-04-01, end 2026-05-01, leave "Include end date" off.

Result: The calculator returns 30 total days, 4 full weeks, 2 remaining days, signed result No.

A full month from April 1 to May 1 is 30 calendar days because April has 30 days and May 1 is the boundary that the toggle skips.

Lease ending Apr 30 with toggle on

Enter start 2026-04-27, end 2026-04-30, switch "Include end date" on.

Result: The calculator returns 4 total days. With the toggle off the count is 3.

The gap between the two readings is exactly the night-versus-day question landlords and tenants negotiate. Match the toggle to which side of that count the contract uses.

February span across a leap year

Enter start 2024-02-01, end 2024-03-01, leave the toggle off.

Result: The calculator returns 29 total days, 4 full weeks, 1 remaining day. The same span starting 2025-02-01 returns 28.

February 2024 has 29 days because 2024 is divisible by 4 and not by 100. Leap-year handling falls out of the underlying calendar walk; you do not toggle anything.

Reversed inputs return a negative count

Enter start 2026-05-01, end 2026-04-01, leave the toggle off.

Result: The calculator returns -30 total days and flags signed result Yes. Switching the toggle on changes the count to -31, growing the magnitude.

The sign tells you the end is earlier than the start. Swap the two inputs to read a positive number; the absolute value is the same.

Six-year span across multiple leap days

Enter start 2020-01-01, end 2026-01-01, leave the toggle off.

Result: The calculator returns 2192 total days, 313 full weeks, 1 remaining day.

The window covers leap days in 2020 and 2024, which is why the count exceeds 6 times 365. Six 365-day years would total 2190; the two extra days are the leap years.

Edge cases & gotchas

  • The "Include end date" toggle shifts the magnitude by one. Off, the calculator counts day boundaries between the two dates. On, it adds one to the absolute count in either direction. For 2026-04-01 to 2026-05-01 that is 30 versus 31; for 2026-05-01 to 2026-04-01 that is -30 versus -31. The toggle never shrinks the span.
  • Same start and end date. A zero-length window returns 0 total days with the toggle off and 1 with the toggle on. The "1" is the inclusive count of a single calendar day. Use it when a contract reads "the day of" rather than "from the day of".
  • Daylight saving does not change the count. Every calendar day counts as one day even when the local clock skips an hour or repeats one. The calculator parses YYYY-MM-DD values directly and never converts through a wall-clock zone, so a span that crosses a DST boundary returns the same total as the same span in a fixed-offset zone. For zone-aware arithmetic, the time difference calculator is the right tool.
  • Time-of-day input is ignored. The HTML date input only carries a date, not a time. Even if you paste an ISO timestamp like 2026-04-27T18:30, the calculator reads the date portion and treats both endpoints as midnight UTC. A 23-hour gap that crosses midnight still counts as 1 day; an hour gap inside a single day still counts as 0.

Frequently asked questions about Days Between Dates Calculator

How is "days between" different from "days since"?

"Days between" is symmetric: it counts the gap between two dates you both supply. "Days since" or "days until" pins one endpoint to today and recomputes as the wall clock advances. This calculator does the first; pin start or end to today to mimic the second.

Does it follow ISO 8601?

Inputs are read as YYYY-MM-DD per ISO 8601, and the calculator runs in UTC. ISO 8601 itself does not define an "include end date" rule, so the toggle is a calculator convention designed to match how billing periods and rental windows count their boundaries.

Why does my count differ by one from another tool?

The "Include end date" toggle is the usual cause. Some tools default to inclusive counts and some to exclusive; check both readings and match whichever the contract uses. A second cause is one tool passing a local timestamp through a non-UTC zone, which can cross a midnight boundary; this calculator avoids that by parsing date-only.

How are leap years handled?

Automatically, by walking the calendar. February 2024, 2028, and 2032 each contribute 29 days inside a span that crosses February. The rule is divisibility by 4, with a centennial exception for years divisible by 100 but not 400.

Can the result be negative?

Yes. Entering an end date earlier than the start returns a negative total-days value and flips the signed-result flag to Yes. Use the sign to track direction in spreadsheets that bill backward from a closing date, or swap the inputs to read a positive number.

What if I want working days instead of calendar days?

Calendar days count every day; working days subtract weekends and holidays. The two answers can differ by a third of the span on a long window. For working-day counts use the dedicated business-days tool linked above.

Does the day of the week affect the count?

No. Every calendar day is one day regardless of weekday. To break the count into ISO weeks, divide the absolute total-days value by 7 or read the full-weeks row in the result. The remaining-days row carries the leftover.

Glossary

Calendar day
A 24-hour period bounded by midnight to midnight on the local civil calendar. The calculator counts each day equally, regardless of weekday, holiday, or DST clock change.
Include end date
A toggle that adds one to the absolute count, making the span inclusive of both endpoints. Off treats the end as a boundary; on counts it.
Signed result
A flag that turns Yes when the total-days value is negative. Negative spans happen when the end date sits earlier than the start date.
Full weeks
The integer quotient of the absolute total-days value divided by seven. The remaining-days row holds the leftover.
Leap day
February 29, present only in years divisible by 4 (and not by 100, unless also by 400). A span that contains February 29 is one day longer than the same span in a non-leap year.

Related Time Tools