How to Calculate the Number of Days Between Two Dates
Subtract the earlier date from the later date — the difference is the number of days between them, not counting the start date. January 1 to January 10 is 9 days. For any pair of dates, ToolNest's free days-between-dates calculator gives the exact count in days, weeks, and months, with an optional business-days mode.
The days-between formula
The core operation is subtraction: days = end date − start date. Every correct method — mental, spreadsheet, or code — reduces to this. Worked example: March 5 to March 12. Counting forward from March 5: March 6 is day 1, March 7 is day 2, March 8 is day 3, March 9 is day 4, March 10 is day 5, March 11 is day 6, March 12 is day 7 — 7 days. The start date itself is not counted; you are measuring the gap between the dates, like measuring the distance between two fence posts rather than counting the posts. Across month boundaries the same logic holds, but hand-counting gets tedious: January 28 to February 4 means counting January 29, 30, 31 (3 days) plus February 1–4 (4 days) = 7 days. Across years, add the remaining days of the start year to the elapsed days of the end year, remembering February's length. The formula is trivial; the calendar is the hard part — which is why the Excel methods and the calculator below exist. One habit that prevents nearly every error: always write both dates down first, labeled start and end, before computing anything.
Inclusive vs exclusive: the question that causes most errors
Here is where reasonable people get different answers. Exclusive counting (the standard): January 1 to January 10 = 9 days — the start date is not counted. Inclusive counting: January 1 to January 10 = 10 days — both endpoints count. Neither is wrong; they answer different questions. 'How many days between these dates?' is exclusive (9). 'How many days from Monday through Friday?' is inclusive (5). Contracts and policies are the danger zone: a '30-day return window starting January 1' usually means you have through January 31 (inclusive of the start), while 'rent is due 30 days after January 1' means January 31 exclusive-style — and landlords, insurers, and courts have fought over exactly this. The defense is boring but bulletproof: when the count matters, state your convention in writing — '30 days, counting January 1 as day 1' — and make the other party confirm. For birthdays, anniversaries, and project timelines, exclusive counting is the default expectation: a project running March 1 to March 31 lasted 30 days, and saying '31 days' will confuse everyone reading the report.
How to count days between two dates in Excel
Spreadsheets make this a one-line job. With the start date in A2 and the end date in B2, the simplest formula is =B2−A2 — plain subtraction, because Excel stores dates as serial numbers (days since January 1, 1900). Format the result cell as a number, not a date, or Excel will display a nonsense date instead of your day count. Two dedicated functions say the same thing more explicitly: =DAYS(B2,A2) returns end minus start directly, and =DATEDIF(A2,B2,"D") returns complete days between the dates (note DATEDIF takes start first, end second — the reverse order of DAYS). DATEDIF's real power is its other units: "M" for complete months, "Y" for complete years, "MD" for days ignoring months and years — the engine behind age-in-years-months-days calculations like our manual age formula guide. Google Sheets accepts all three formulas identically. The classic spreadsheet trap: text that looks like a date ('March 5, 2026' typed as text) will not subtract — if your formula returns a #VALUE! error, the 'dates' are text, and DATEVALUE() or retyping them as real dates fixes it.
The manual method: ordinal days
When no tool is handy, convert each date to its ordinal day — its day-of-year number — and subtract. January has 31 days, February 28 (29 in leap years), March 31, April 30, May 31, June 30, July 31, August 31, September 30, October 31, November 30, December 31. Example: days between April 10 and June 3 in a non-leap year. April 10 is day 31 + 28 + 31 + 10 = 100. June 3 is day 100 + 20 (rest of April) + 31 (May) + 3 = 154. Difference: 154 − 100 = 54 days. (Check: April 11–30 is 20 days, May is 31, June 1–3 is 3; 20 + 31 + 3 = 54 ✓.) Across a year boundary, count to December 31 from the start date, then add the end date's ordinal: November 20 to February 10 means (31−20) + 31 = 42 days remaining in the year, plus 31 + 10 = 41 days into the new year, for 83 days — remembering to check whether February is the leap kind. Memorizing the month lengths is the only prerequisite; the knuckle trick (knuckles = 31 days) still works fine.
Leap years: the February trap
Every multi-month day count must survive February, so here is the rule: a year is a leap year if it is divisible by 4, except century years, which must be divisible by 400. 2024 was a leap year (÷4 ✓). 2000 was a leap year (÷400 ✓ despite being a century). 1900 was not (÷4 ✓ but ÷100 ✗ and ÷400 ✗). 2026 is not (÷4 ✗). The practical consequence: any date range crossing February in a leap year gains one day versus your intuition. January 15 to March 15 is 59 days in 2026 (16 + 28 + 15) but 60 days in 2028 (16 + 29 + 15). The most treacherous case is February 28 to March 1: 1 day in a common year, 2 days in a leap year (February 29 sits between them). Spreadsheets and the calculator handle this automatically because their date serials encode the real calendar — the trap only bites manual counting and hand-rolled code. If you ever implement this yourself, do not write your own leap-year check from memory; use the date library — every language's datetime module already encodes the ÷4/÷100/÷400 rule correctly, and Unix timestamps sidestep the calendar entirely by counting seconds.
Business days between two dates
Project plans and contracts usually mean business days — Monday through Friday, excluding public holidays. The quick estimate: multiply the total days by 5/7, then adjust. A 28-day span holds exactly 4 weeks, so 20 business days, regardless of where it starts. For odd spans, count whole weeks (× 5) plus the leftover weekdays. Example: 10 days starting Monday = 1 full week (5 business days) + 3 leftover days (Mon–Wed) = 8 business days; the same 10 days starting Friday = 5 + 2 (Mon–Tue of the next week... working it carefully: Fri, then Mon–Fri = 6, then Mon–Tue = 2, total 8 — the weekday math always depends on the start day, so draw it out). Holidays are the part no formula knows: Thanksgiving, Christmas, and local observances must be subtracted by hand, which is why contracts define business days explicitly ('excluding federal holidays'). In Excel, =NETWORKDAYS(start, end) counts business days with an optional holiday list — the function every project tracker should use. Our days-between-dates calculator includes a business-days mode that skips weekends automatically, so you can quote timelines without the weekday arithmetic.
Where this calculation actually matters
Day-counting shows up in more consequential places than most people realize. Contracts and notices: '30 days written notice' clauses, return windows, and warranty periods all hinge on the inclusive/exclusive convention — when money is involved, write the convention down. Project timelines: sprint lengths, delivery estimates, and SLA windows ('response within 2 business days') are day-difference calculations wearing business clothes. Age and tenure: exact age in years, months, and days is a day-count plus month arithmetic, as our age calculation guide shows. Finance: loan interest accrues per diem, late fees trigger after N days, and bond markets use formal day-count conventions (30/360, actual/actual) precisely because casual counting is ambiguous. Health: pregnancy is tracked as 280 days from last menstrual period; medication courses run exact day counts. Travel: visa stays ('90 days within 180') and passport validity rules ('6 months beyond travel') are day-difference problems with legal consequences. In every case the failure mode is identical: two people counting the same span two different ways. The formula is easy — agreeing on the convention is the work.
Count any date range in one click
Hand methods build understanding; the tool builds speed and kills the February trap. ToolNest's free days-between-dates calculator takes any two dates and returns the exact gap in days, weeks, and months — with a business-days mode for project math — all in your browser with no signup. Pick the dates, read the answer, and never hand-count month lengths again.
Do it in one click
Count days between any two dates — with business-days mode. Free, no signup.
Open the Free Tool →