How to Calculate the Number of Days Between Two Dates

Updated September 12, 2026

Just need the tool?Date Difference →

Subtract March 1 from March 8 and you get 7. But if you're counting how many days you'll be in a country on a visa — where the day you arrive and the day you leave both count — the answer is 8. Same two dates, two correct answers, and the gap between them is where most date math quietly goes wrong.

Inclusive vs exclusive: do you count both endpoints?

Plain subtraction is exclusive counting. It measures the gaps between days, not the days themselves. March 1 to March 8 is 7 nights, 7 sleeps, 7 gaps — exactly what a hotel bills you for when you check in on the 1st and out on the 8th, and exactly how per-day interest accrues.

Inclusive counting adds one, because it treats both the first and last day as full days you're counting. A museum exhibit that runs "March 1 through March 8" is open 8 days. A poster that says "on display for 8 days" and a receipt that says "7 nights" can describe the identical stay.

This is the single biggest source of off-by-one errors, and it hides inside ordinary wording: "within 7 days," "you have 30 days," "5 days notice." Does the clock start today or tomorrow? Legal and lease language usually settles it explicitly — "beginning the day after service," or "not counting the day of delivery" — and when it doesn't, contracts and courts fall back on their own default rules. Arithmetic can't tell you which convention applies; only the text can. So decide which question you're asking first: how far apart are these dates (subtract) or how many days total (subtract, then add one).

Calendar days vs business days

"Your refund will post in 10 business days" is not 10 days on the calendar. Business days skip weekends, and usually skip public holidays too.

Work a real one. You start the clock on Monday, June 2, 2025, and count that Monday as business day 1. Day 5 is Friday the 6th. The weekend doesn't count, so day 6 is Monday the 9th, and day 10 lands on Friday, June 13. That span — June 2 through June 13 — is 12 calendar days: your 10 business days plus one weekend. A public holiday inside the window pushes the finish out another day.

The trap is mixing the two. If a vendor promises "shipped in 3 business days" and you assume 3 calendar days, you'll think they're late when they're on time. When a deadline matters, confirm which kind of day you're counting, and remember that "business day" isn't universal — it depends on the country's holiday calendar, and sometimes on the specific company's.

Leap years: the extra day hiding in February

Count from February 15 to March 1 and the answer depends on the year. In 2024 it's 15 days; in 2023 it's 14. Same two calendar dates, one day apart, entirely because 2024 had a February 29 and 2023 didn't.

The rule: a year is a leap year if it's divisible by 4 — except century years, which must be divisible by 400. So 2000 was a leap year, 1900 was not, and 2100 won't be. February gets a 29th day in leap years, and any span that crosses late February inherits it. That's why a "90-day" plan starting in January can finish on slightly different dates from one year to the next. Most date tools apply this silently; the mistakes come from counting by hand and forgetting whether the year you're in carries the extra day.

Time zones can move the boundary

Dates don't have time zones, but the moments you compare do — and at midnight, one instant belongs to two different calendar dates depending on where you're standing.

Say a form is due "by December 31" on a New York deadline. You submit at 10 PM on the 31st from California. In your time zone it's still the 31st; in New York it's already 1 AM on January 1. You're a day late by the only clock that counts. The same thing bites when you compute the difference between two timestamps and one is stored in UTC while the other is local — the calculation subtracts the underlying instants, and near midnight the calendar dates can disagree by one.

For everyday counting between two plain dates, you can ignore all of this. It matters at a hard cutoff tied to a specific place and time — a filing deadline, a subscription that renews at midnight UTC, an auction close.

What people actually use this for

The common cases are all versions of the same question:

For most of these you just want a fast, honest count between two dates you type in. That's what the Date Difference tool does: it runs entirely in your browser, with nothing uploaded to our server and no sign-up — which matters more than it sounds when the dates are a medical appointment, a court date, or a resignation you haven't announced yet. It returns the plain subtraction; add one yourself when you need both endpoints counted.

When a day-counter isn't the right tool

A generic calculator is the wrong instrument in a few specific spots, and pretending otherwise is how people miss deadlines.

The reliable habit: write down which two dates you mean, decide whether you're counting the gap or the days, and name the kind of day — calendar or business. Get those three things straight and the arithmetic is trivial. Skip them and no tool can save you from the off-by-one.

Do it now — free and private

The tool runs entirely in your browser: nothing you add is uploaded, and there is no sign-up.

Date Difference →

Related tools

Age CalculatorTime Zone ConverterLoan Calculator