How to Calculate Days Between Dates (With Examples)
November 4, 2026 · Math
"How many days until the trip?" "How long has it been since the invoice went out?" "Is the 90-day warranty up yet?" Counting days between two dates comes up constantly — for deadlines, countdowns, contracts, pregnancies, visa stays, and school projects. It's also easy to get wrong by one (or by thirty), because of two traps: the counting convention and leap years.
This guide shows the manual method that always works, a worked example you can follow with a paper calendar, how leap years change the answer, and how online date calculators decide what to count.
The core idea: convert both dates to a day count, then subtract
Every date calculator — and every programming language — does the same thing under the hood: it converts each date into a single number of days since a fixed reference point, then subtracts. You can do the same thing by hand without any reference epoch:
+ (days in each full month between)
+ (days elapsed in the end month)
The result of this formula counts the end date but not the start date. That matches how "days until" questions work in everyday life: from today until tomorrow is 1 day, not 2.
Worked example: June 1 to August 15, 2026
Say school ends June 1, 2026 (a Monday) and a family trip starts August 15, 2026 (a Saturday). How many days are between them?
- Days remaining in June:June has 30 days, and you start counting after June 1, so 30 − 1 = 29 days
- Full month of July: 31 days
- Days into August: the trip is on the 15th, so 15 days
So the countdown reads "75 days until the trip." If you also wanted to count June 1 itself (see the convention section below), the answer would be 76.
The inclusive vs exclusive trap
This is the #1 reason two people get different answers for the same two dates. There are three common conventions:
- Exclusive of start, inclusive of end(the standard "days until" count): June 1 → August 15 = 75 days. This is what most online date calculators return.
- Fully inclusive(count both endpoints, used for hotel nights spanning stays or "calendar days occupied"): 75 + 1 = 76 days.
- Fully exclusive (count only the days strictly between): 74 days.
A useful check: the difference between two dates in the same month is just the day numbers subtracted. June 1 → June 20 is 20 − 1 = 19 days under the standard convention. If your method gives a different answer for a same-month case, it's using a different convention.
Leap years: the February problem
A year has 365 days — except when it has 366. The extra day is February 29, and it only exists in a leap year. The rule:
- Divisible by 4 → leap year (2028, 2032 are leap years)
- Except years divisible by 100 are not (2100 is not a leap year)
- Unless also divisible by 400 (2000 was a leap year)
Two examples that differ only by leap day:
- February 1, 2027 → March 1, 2027 = 28 days
- February 1, 2028 → March 1, 2028 = 29 days
Any day count that crosses February 29 of a leap year is one day longer than the same span a year earlier. 2026 and 2027 have 365 days; 2028 has 366. A whole-year span like January 1, 2027 → January 1, 2028 is exactly 365 days, while January 1, 2028 → January 1, 2029 is 366.
Days-in-each-month reference table
For the manual method you need one thing memorized (or on this table): how many days each month has.
| Month | Days | Leap year |
|---|---|---|
| January | 31 | 31 |
| February | 28 | 29 |
| March | 31 | 31 |
| April | 30 | 30 |
| May | 31 | 31 |
| June | 30 | 30 |
| July | 31 | 31 |
| August | 31 | 31 |
| September | 30 | 30 |
| October | 31 | 31 |
| November | 30 | 30 |
| December | 31 | 31 |
The classic mnemonic still works: "Thirty days hath September, April, June, and November; all the rest have thirty-one, save February alone." If you'd rather skip the memorization, our date calculator counts days between any two dates instantly — and can exclude weekends if you only care about working days.
Practical example: days until Christmas
On Wednesday, November 4, 2026, how many days are left until Christmas (December 25, 2026)?
- Days remaining in November: 30 − 4 = 26
- Days into December: 25
The 37 business days figure excludes 7 weekends but no holidays. If you're counting working days for a project deadline, remember to subtract public holidays too — see our working days guide for that method.
"Months" and "years" are not fixed numbers of days
People often convert roughly — "a month is 30 days", "a year is 52 weeks" — and then wonder why their count is off. A month is anywhere from 28 to 31 days; a year is 365 or 366. Two rules of thumb:
- For contracts and deadlines, always count actual calendar days on a real calendar, not month approximations. A "90-day" notice period can land on different dates depending which months it spans.
- For age and anniversaries, the convention is calendar arithmetic, not day counting: June 1, 2026 to August 15, 2026 is "2 months and 14 days", not "75 days". Our age calculator explains that calendar method in detail.
Common mistakes
- Off-by-one from the convention.Decide explicitly whether the start day, end day, or both count. State it when you share the number ("75 days, not counting today").
- Forgetting February 29. Spans crossing a leap day in 2028, 2032, and so on need +1 day. Spans crossing the century-boundary years 2100, 2200, 2300 need the opposite check.
- Using 30 for every month.Five months of the year have 31 days. In the June → August example, treating July as 30 days gives 74 — off by one.
- Time zones for digital deadlines."Ends January 1" is a different instant in New York and Tokyo. When it matters, specify the zone — our time zone converter shows the exact same moment in cities worldwide.
Frequently Asked Questions
Does the day count include the start date or not?
The standard convention for "days between dates" excludes the start date and includes the end date — June 1 to June 2 is 1 day. That's the convention used by most calculators (including ours) and by "days until" countdowns. Legal documents sometimes count both endpoints; if the stakes are real, confirm which rule applies before relying on the number.
How do I count days across years, like November 1 to March 1?
Split the span at December 31 and add the pieces. November 1, 2026 → March 1, 2027 is: 29 (rest of November) + 31 (December) + 31 (January) + 28 (February, 2027 is not a leap year) + 1 = 120 days. Crossing into a leap year February adds one more day.
How many days are in 2026?
365. 2026 is not a leap year (not divisible by 4). The next leap year is 2028, which has 366 days.
Why does Excel give a different answer than an online calculator?
Excel's subtraction (later date minus earlier date) uses the same exclusive-of-start convention, so the raw number should match. The differences usually come from inclusive options ("count both days"), from NETWORKDAYS including or excluding holidays, or from a date accidentally entered as text.
What about counting only business days?
Count Monday–Friday only: 2026 has 260 of them before holidays. The method (and how to subtract holidays like Thanksgiving) is in our working days guide, and the date calculator does it automatically.
Related Calculators
- Date Calculator — Days between two dates, with an option to exclude weekends
- Age Calculator — Exact age in years, months, and days using calendar arithmetic
- Time Calculator — Add or subtract hours and minutes within a single day
- Event Planning Countdown — Plan backwards from an event date
Note: Day counts in this guide use the standard convention (exclude the start date, include the end date) and the Gregorian calendar. For legal deadlines, confirm the counting rule that applies to your document.
Nelson Chung
Independent developer with 10 years of software engineering experience. Passionate about math and finance, dedicated to making complex calculations simple and accessible.
Published November 4, 2026