How to count the days between two dates

Plain arithmetic, the rules that trip people up, and worked examples you can check by hand.

Last reviewed on May 7, 2026.

Working out how many days separate two dates sounds like a single subtraction, and most of the time it is. But three things make it surprisingly easy to be off by one or two: leap years, whether you count both endpoints, and time zones. This page walks through the simple cases first, then the cases that throw people, then a small checklist you can use whenever an automated calculator and your gut disagree.

If you just want the answer, the CountDay home page has a calculator that takes any date and tells you how many days remain. If you want to know why the number is what it is, keep reading.

The simple case: same year, same month

When both dates fall in the same month, you subtract the day numbers. From March 4 to March 18, the count is 18 − 4 = 14. That's it. Calendars don't get involved.

The only judgment call is whether the answer is 14 or 15 — see the section on inclusive endpoints further down.

Crossing months in the same year

For dates in different months but the same year, count the days remaining in the start month, then add the days in any whole months in between, then add the day-of-month of the end date. From April 25 to July 9:

The trick that catches people is the start-month step. From April 25 to the end of April, the count is 5 (the 26th, 27th, 28th, 29th, and 30th), not 6. April 25 itself is the day you're counting from, not a day in between.

Crossing years

Across years, you do the same thing — but you need to remember which years are leap years. A year is a leap year if it is divisible by 4, except that years divisible by 100 are not leap years unless they are also divisible by 400. So 2000 was a leap year, 2100 will not be, and 2400 will be. For most practical countdowns the only thing this means is that February in some years has 29 days instead of 28. Miss that, and you'll be off by exactly one day.

If your countdown spans the end of February in a leap year, double-check.

Worked example: from a wedding deposit to the wedding

Suppose a deposit is paid on October 12, 2026 and the wedding is on June 14, 2027. How many days?

If you typed the same dates into the homepage calculator, you should get 245. If you got 244 or 246, the most likely cause is that one of the two tools is treating endpoints differently — see the next section.

Inclusive vs exclusive endpoints

This is the single biggest source of disagreement between two date calculators. Three reasonable conventions exist:

None of these is wrong. They answer different questions. When you ask a calculator for a number, decide which of the three you want before you read the result.

Time zones and the silent off-by-one

Most countdown calculations are done in the device's local time zone. If you're in New York counting down to a New Year's Eve party in Tokyo, the moment Tokyo's clock crosses midnight is still the afternoon of December 31 in New York — so a New York calculator will say "0 days" while a Tokyo calculator says "today." Neither is wrong; they're answering from different reference frames.

For most personal countdowns this never matters. For travel itineraries that span time zones, set both endpoints in the same zone (most often the destination's) before you do the math.

Common mistakes

A quick verification checklist

When to trust the calculator

For everyday personal use — counting down to a birthday, a wedding, a vacation — the homepage calculator and the per-date pages are reliable. They handle leap years correctly, recalculate on every page load, and use the device's local time zone consistently. The places where you should slow down are international travel, contracts that count business days versus calendar days, and any context where being off by one day has a real consequence.

If you'd like to see this in action, pick any date and watch the math: days until New Year's Day, Christmas, or July 4. Each page shows the count plus the historical events that fell on that date. For longer-range planning that uses the same arithmetic, see the wedding planning guide and the vacation checklist.