Days Between Two Dates: Exact Count | AgeGapCalc

The number of days between two dates is the total of calendar days from the earlier date up to, but not including or including, the later date depending on your need.

Our date duration tool returns the total days and weeks between any two dates, useful for deadlines, trips, and projects.

Counting Total Days

The tool converts each date to its day number on the calendar and subtracts the earlier from the later, giving a single figure for the whole span.

From 2024-01-01 to 2024-02-01 there are 31 days, because January has 31 days.

Including or Excluding the End Date

Whether the last day counts depends on the question. A hotel stay excludes the checkout day; a rental period often includes it. The difference is exactly one day, so it is worth stating which convention you need.

Leap Years and Month Lengths

Because the count runs on the real calendar, month lengths and leap days need no special handling; they are already baked into the day numbers.

A Quick Sanity Check

For any span, dividing the day total by seven gives the whole weeks with a remainder of days, which is an easy way to test a suspicious result.

If the figure looks far too large, the most common cause is a mistyped year rather than a fault in the arithmetic.

Common Counting Mistakes

Counting both the start and the end date as full days inflates every total by exactly one. The convention has to be chosen before the number is used for anything.

Another frequent slip is reading four weeks as one month. A calendar month is 28 to 31 days, so converting back and forth without a calendar slowly introduces drift.

Open the Date Duration Calculator to measure any span.

Open the Date Duration Calculator →

Frequently Asked Questions

Does the count include both dates?

Our tool reports the total calendar days between the two dates; subtract one if you need the nights or exclusive count.

How do I get weeks too?

The result also shows full weeks and leftover days, e.g. 10 weeks and 3 days.

Are leap years included?

Yes. Any February 29 inside the span is counted.

Can I use any two dates?

Yes. Project start to end, holiday to holiday, or any pair you choose.

Why not just divide by 30?

Dividing by 30 ignores real month lengths and drift; calendar subtraction is exact.

Is it private?

Yes. Everything runs in your browser; no dates leave your device.

How do I count only weekdays?

Start from the total day count, then remove Saturdays and Sundays. If holidays must come out too, check which ones fall inside the span before subtracting.

Can the answer ever be negative?

Not here. The tool always measures from the earlier date to the later one, so the result is a positive number of days.

Is this the same as subtracting two timestamps?

For whole dates it is. Timestamps also carry hours and minutes, while this tool works in whole days, which is what most date questions actually need.

Sources

Further Reading

About the Author

AgeGapCalc Team

A small independent team building free, private, browser-based age and date calculators. This article was compiled from public calendar references, listed in the Sources section above and reflects the team’s own method and experience. All figures are computed with calendar-based date arithmetic; nothing is uploaded.