How to calculate the number of days between two dates
Subtracting one date from another sounds easy until the off-by-one question appears. Here is how to count the days correctly, by hand or by calculator, with the traps that catch people out.
Pick two dates to count the days and weeks between them.
Working out how many days are between two dates comes up constantly: counting down to a deadline or a holiday, working out how long an invoice is overdue, finding your exact age in days, or billing by the day. It sounds like simple subtraction, and it mostly is, but one question trips almost everyone up: do you count both the start and the end day, or just one of them? Get that straight and the rest is easy.
In short: to find the number of days between two dates, subtract the earlier date from the later one. The catch is whether you include both end dates. Counting the gap between them (not including the start day) is the usual answer, so 1 March to 15 March is 14 days. If you need to include both days, add one. A free date difference calculator does it instantly and handles leap years for you.
The simple method
At its core, the number of days between two dates is just the later date minus the earlier date. If both dates fall in the same month it is obvious: from 3 June to 20 June is 20 minus 3 = 17 days. Spreadsheets do exactly this. In Excel or Google Sheets you can type =End - Start with two date cells and it returns the number of days, because they store every date as a running day number behind the scenes.
The only real work is when the two dates sit in different months or years, because months have different lengths and leap years add a day. That is where counting by hand needs a method, which is below.
The counting trap: inclusive or exclusive?
This is the part that causes almost every wrong answer. Take 1 March to 15 March. There are two sensible-sounding answers:
- 14 days if you count the gap between the dates, which is 15 minus 1. This is the "exclusive" count, and it is what most calculators and spreadsheets give.
- 15 days if you count every day from the 1st to the 15th inclusive, counting both ends. This is the "inclusive" count.
Neither is wrong, they answer slightly different questions. Use the exclusive count (subtract, do not add one) for durations: how long until a deadline, how many days a payment is late, how long a trip lasts in nights. Use the inclusive count (subtract, then add one) when every calendar day counts as a whole day. For example, a festival that runs from the 10th to the 12th lasts 3 days, even though 12 minus 10 is only 2, because the 10th, 11th and 12th each count. The same goes for billing a full day rate for each day worked. When in doubt, decide whether the first and last day should each count as a full day, and add one only if they should.
How to calculate days between two dates manually
When the dates span several months, break the gap into three pieces: the rest of the first month, the whole months in between, and the days into the final month. Add them up.
Say you want the days from 10 January 2026 to 20 March 2026:
- Days left in January after the 10th: 31 minus 10 = 21
- All of February 2026 (not a leap year): 28
- Days into March: 20
Add them: 21 + 28 + 20 = 69 days between the two dates. That is the exclusive count. If you needed to include both the 10th and the 20th, you would add one to get 70. A quick way to sanity-check is to remember the month lengths: 31 days in January, March, May, July, August, October and December; 30 in April, June, September and November; and 28 or 29 in February.
Now one that crosses a year and a leap day, from 15 December 2027 to 10 March 2028: 16 days left in December (31 minus 15), plus 31 for January, plus 29 for February 2028 (a leap year), plus 10 into March. That is 16 + 31 + 29 + 10 = 86 days. February adds 29 here rather than 28, which is exactly the leap-year trap the next section covers.
In a spreadsheet you have shortcuts. In Excel or Google Sheets, =End - Start or =DATEDIF(Start, End, "d") gives the exclusive day count, and =NETWORKDAYS(Start, End) counts business days from Monday to Friday, including both ends by default. Every example on this page was checked against our date difference calculator.
Business days vs calendar days (excluding weekends)
Sometimes you do not want every day, only working days. A deadline of "within 10 business days" is not the same as 10 calendar days, because it skips weekends and usually public holidays. As a rule of thumb, each full week of 7 calendar days contains 5 business days.
For an exact figure, count the calendar days, subtract two for every weekend inside the range, then subtract any public holidays. Take Monday 5 January to Friday 16 January 2026: that is 11 calendar days (exclusive), and one weekend (the 10th and 11th) falls inside, so 11 minus 2 = 9 business days. Another way is weeks times 5 plus the leftover weekdays. Payment terms, shipping estimates and notice periods are often quoted in business days, so it is worth checking which one a contract means.
One caveat: the weekend is not Saturday and Sunday everywhere. In parts of the Middle East the working week runs differently and the weekend can fall on Friday and Saturday, so "business days" depends on the country. Count the actual non-working days wherever the work happens.
Leap years, the thing that breaks simple counting
A leap year adds 29 February, so any range that crosses the end of February in a leap year has one extra day. A year is a leap year if it is divisible by 4, except for whole centuries, which must be divisible by 400. So 2024 and 2028 are leap years, 2026 and 2027 are not, 1900 was not (not divisible by 400) but 2000 was. The leap-year rule keeps the calendar lined up with the solar year, which the Gregorian calendar averages at 365.2425 days (97 leap years in every 400). When counting a long span by hand, add a day whenever the range includes a 29 February. This is exactly the kind of detail a date difference calculator gets right every time, which is why it is safer than mental arithmetic for anything important.
How many days until a date?
Counting down to a future date is the same calculation with today as the start. The days until a birthday, a holiday or a launch is just that date minus today, using the exclusive count, so "3 days until Friday" on a Tuesday means Wednesday, Thursday, Friday. For a worked example, from 13 October 2026 to 25 December 2026 is 18 (the rest of October) + 30 (November) + 25 (December) = 73 days. The one thing to remember is that a countdown answer changes every day, so a calculator that uses today's date automatically saves you recounting. If you specifically want your age or an anniversary in days, that is a days-between-dates sum from the original date to today, and our age calculator turns a birth date straight into years, months and days.
Common mistakes to avoid
These are the slips that produce an answer that is off by a day or more.
| Mistake | Fix |
|---|---|
| Not knowing if you need inclusive or exclusive | Decide if both end days should count as full days, then add one only if they should |
| Forgetting 29 February in a leap year | Add a day for any leap-year end of February inside the range |
| Treating business days as calendar days | Subtract weekends and holidays, or about 2 days per week |
| Using 30 days for every month | Use the real month lengths; only April, June, September and November have 30 |
| Mixing up the earlier and later date | Always subtract the earlier date from the later one |
Frequently asked questions
How do I calculate the number of days between two dates?
Subtract the earlier date from the later one. For the plain gap (exclusive), that result is your answer, so 1 March to 15 March is 14 days. To include both the start and end day, add one.
Should I add one day or not?
Use the plain subtraction for durations like a countdown or how long a payment is overdue. Add one when every calendar day counts as a full day, such as billing per day or counting festival days.
How do I count only working days?
Count the calendar days, then subtract two for each weekend in the range and any public holidays. Roughly, each 7 calendar days contains 5 business days.
Do leap years change the count?
Yes. If the range crosses 29 February in a leap year it has one extra day. A year is a leap year if it divides by 4, except centuries, which must divide by 400.
How many days are in a year?
365 in a normal year and 366 in a leap year. The Gregorian calendar averages 365.2425 days a year (97 leap years in every 400), which is why leap years exist and why some century years are skipped.
How do I work out how many days until a date?
Subtract today's date from the future date. The result is the number of days until it, counted exclusively, so it does not include today.