Skip to content

Days Between Dates Calculator

Count the days between two dates, and see it in weeks and months too.

Include it when both days count, like the days of a trip or an event.

Days between

—

In weeks
—
In years, months and days
—

Good to know. Whether to count the first day, the last day or both is where most date arguments start.

How it works

In plain words

Convert each date to a day number on a single continuous calendar, then subtract. Leap years and month lengths are handled by the calendar, not by guessing 30-day months.

The formula

days = dayNumber(end) − dayNumber(start)
(+ 1 if the end date is included)

Worked example

From 1 January 2026 to 25 December 2026 is 358 days, or 51 weeks and 1 day.

Sources

Sources checked September 29, 2026. 9 automated tests check its answers on every change.

About the days between dates calculator

Counting days by hand is surprisingly error-prone. Months have different lengths, leap years add a day every four years (mostly), and it is easy to be off by one. This calculator uses the real calendar, so the answer is exact.

The "off by one" question is the most common source of confusion. By default, we count the way most people and computers do: from Monday to Wednesday is 2 days. That is the right answer for things like "how many days until" or the length of a notice period that ends on a given date.

For things where both the first and last day count, such as a hotel stay measured in days rather than nights, a festival or a course, choose "yes" to include the end date. Then Monday to Wednesday counts as 3 days.

The result is also shown in weeks and days, and in years, months and days. Months are counted as calendar months, so from 31 January to 28 February is 28 days but not quite a month.

Dates are counted in whole days, so time zones and daylight saving changes never affect the result.

Questions people ask

How many days are there between two dates?

Subtract the earlier date from the later one on a calendar. Monday to the following Monday is 7 days.

Should I include the end date?

Include it when both the first and last days count, such as the length of an event. Leave it out for "how many days until" questions.

Does it handle leap years?

Yes. It uses the real calendar, including 29 February in leap years.

What if the end date is before the start date?

The calculator swaps them and counts backwards, and tells you it did.

Put this calculator on your site

Paste this where you want it. It fits the width of the page, grows with the answer and follows your readers’ dark mode. Free, with no ads inside.

<a href="https://99solved.com/days-between-dates" data-99solved>Days Between Dates Calculator</a>
<script async src="https://99solved.com/embed.js"></script>