How to Calculate Days Between Two Dates

Counting days between two dates sounds simple until you factor in leap years, varying month lengths, weekends, holidays, and the question of whether the first day counts. Here's how it works, plus a free calculator that handles all the edge cases.

Try it now
Open the Date Difference Calculator →
Days between two dates, plus weekday counts and the option to add or subtract from any date.

The basic calculation

To count the days between two dates, subtract the earlier date from the later one. That's the whole idea. The tricky part is that "subtracting dates" isn't as straightforward as it sounds on a calendar, because:

The reliable way to compute it is to convert both dates to a common reference — typically the number of days since a fixed date, like January 1, 1970 (the Unix epoch). Then subtract the two reference numbers. Every programming language and calculator does this internally.

For a person doing it in their head, the practical method is to count forward from the earlier date to the later one, handling month boundaries as you go. It's tedious but reliable if you're careful. A calculator does it instantly.

An example

Suppose you want to know how many days are between March 15 and July 4 of the same year.

Step Days Running total
March 15 → March 311616
April (30 days)3046
May (31 days)3177
June (30 days)30107
July 1 → July 44111

So there are 111 days between March 15 and July 4 of the same year. If a February 29 falls between the two dates, you'd add one more day for a total of 112.

Note that this count is exclusive of the start date — March 15 is not counted. If you wanted an inclusive count (both endpoints counted), it would be 113 days. That distinction matters, so let's look at it next.

Inclusive vs. exclusive counting

There are two conventions for "days between," and they produce different answers:

The practical difference is always exactly one day. Knowing which convention applies matters when you're counting days for a contract, hotel booking, or court deadline.

For example, if you check into a hotel on March 15 and check out on March 18, you've stayed 3 nights — which is the exclusive count. Inclusive counting would say 4 days, but you're not paying for four nights, so exclusive is correct for billing.

Business days vs. calendar days

A "business day" is usually defined as Monday through Friday, excluding weekends. Federal holidays in the relevant country are sometimes excluded too, but not always — the definition depends on the context.

The difference can be dramatic. From a Friday to the following Monday is:

Over a longer span — say, a month — the ratio is roughly 5 business days for every 7 calendar days. A 30-day period usually contains 22 business days, give or take a holiday or two.

Business days matter for shipping estimates, contract clauses ("within 10 business days"), banking (which counts 2–5 business days for transfers), and government deadlines.

How leap years affect the count

A leap year adds one extra day — February 29 — to the calendar. Leap years occur in years divisible by 4, except for century years that aren't divisible by 400. So:

If a date range crosses a February 29, add one day to the result. Most calculators and programming functions handle this automatically, but it's the most common source of manual counting errors.

Common use cases

The "days between two dates" calculation shows up in more contexts than people realize:

Event planning

How many days until a wedding, a vacation, a conference, or a birthday? Usually counted exclusive — "60 days to go" means 60 days from today to the event, not counting today.

Project management

Sprint durations, sprint planning, and project timelines are usually counted in business days, since teams don't work weekends. A "2-week sprint" is typically 10 business days.

Legal and compliance

Contract notice periods ("30 days' written notice"), statute of limitations windows, and court filing deadlines are almost always counted inclusive, and often business days. Getting the convention wrong can have real consequences.

Financial calculations

Interest accrual, loan durations, and bond maturity dates all depend on day counts. Bond markets even use specific day-count conventions (30/360, actual/365, actual/actual) that have precise rules.

Age and duration

"How old is this building?" "How long has this company been in business?" These are often asked as years, but sometimes need to be calculated in days for precision.

Shipping and delivery

"Arrives in 3–5 business days" is the standard estimate. If you order on a Friday, the first business day is Monday, so your package may not arrive until the following Wednesday or Thursday.

Adding and subtracting days from a date

A related but slightly different problem: given a starting date and a number of days, weeks, months, or years, what's the resulting date? This is used for scheduling (30 days from today), renewal dates (one year from now), and deadline calculations.

The arithmetic is straightforward for days and weeks. For months and years, there's a subtlety: not all months have the same number of days. If you add one month to January 31, the result is typically February 28 (or 29 in a leap year), not March 3. Different conventions handle this differently — some roll forward, some clamp to the last day of the month.

The Date Difference Calculator has a separate tab for this: pick a start date, an amount, and a unit (days, weeks, months, years), and it computes the resulting date. Useful for figuring out when a deadline falls, when a subscription renews, or how long a contract runs.

Time zones and exact durations

For most "days between" questions, time zones don't matter — you're counting calendar days, not precise durations. But if you need an exact duration in hours or minutes (say, for a flight itinerary or a legal hearing that spans time zones), the calculation gets more involved.

A flight that departs Los Angeles at 10 AM and arrives in New York at 6 PM is a 5-hour flight, not an 8-hour one, because of the 3-hour time difference. A 24-hour period in one zone may overlap with two different calendar days in another.

For calendar-day calculations, this is usually not an issue. For precise durations across time zones, use a tool that lets you specify the zone for each date.

Frequently asked questions

How do you calculate the number of days between two dates?
Convert both dates to a common reference point — typically the number of days since a fixed date like January 1, 1970 (the Unix epoch) — then subtract the earlier from the later. A date calculator handles this automatically, including leap years and varying month lengths.
Is the day of the first date counted?
There are two conventions. In the exclusive method, only the days between the two dates are counted, so the first date is not included. In the inclusive method, both the start and end dates are counted. For example, from Monday to Wednesday is 2 days exclusive or 3 days inclusive. Most calculators default to exclusive, but legal and event-planning contexts often use inclusive.
How do you count business days between two dates?
Count only Monday through Friday, skipping weekends. Holidays are not automatically excluded unless the calculator is configured for a specific country's holiday calendar. From a Friday to the following Monday is 1 business day, even though 3 calendar days pass. This is why "business days" matters for shipping, contracts, and deadlines.
How does a leap year affect day calculations?
A leap year adds one extra day, February 29. If the period between two dates includes a February 29, add one extra day to a calculation that assumes 365-day years. Most calculators handle this automatically. Leap years occur in years divisible by 4, except century years not divisible by 400 — so 2000 was a leap year, but 1900 was not.
Does the time of day matter?
For most "days between dates" questions, no — the calculation is calendar-based and ignores time. But if you need an exact duration in hours or minutes (like for contracts or travel planning), the time of day matters, as do time zones. A date difference calculator using calendar days will always produce a whole number of days.
← Back to Your Online Helper