If you just want the number, type both dates into the days between dates calculator. The rest of this guide shows how the number is worked out, so you can check it by hand or build it in a spreadsheet.

Formuladays between = later date − earlier date(+1 if both the start and end dates count)

Count the rest of the start month, then whole months, then the last days

Dates do not subtract like plain numbers because months have different lengths. The reliable by-hand method is to walk forward in three parts: the days left in the start month, every whole month in between, and the days into the final month.

Worked example: 14 March to 2 September 2026

Start Saturday 14 March 2026, end Wednesday 2 September 2026.

  1. Days left in March (31 − 14)17
  2. April30
  3. May31
  4. June30
  5. July31
  6. August31
  7. Days into September2
  8. Days between (17 + 30 + 31 + 30 + 31 + 31 + 2)172

You can sanity-check it another way: 172 days is 24 weeks and 4 days (24 × 7 = 168, plus 4). Because the start is a Saturday, 4 days after a whole number of weeks lands on a Wednesday, which is what 2 September 2026 is.

Add one day only when both the start and the end day count

The plain subtraction answers “how many days have passed from one date to the other”. Monday to Tuesday is 1 day, because only one midnight is crossed. That is the right answer for how far apart two dates are, and for most deadlines worded as “within 30 days of”.

Some situations count both ends instead: a hotel booked from 14 March to 2 September covers 173 calendar days if you count every day you can be there, including the first and the last. Count that way and add 1.

The most common mistake

Counting both ends by accident. If a rule says “30 days from 1 June”, day 1 is 2 June and day 30 is 1 July. Check whether your rule, contract or form counts the first day, and tick “include the end date” in the calculator only when it should.

Use these formulas in Excel and Google Sheets

Both programs store a date as a serial number that counts days, so subtracting two dates already gives a number of days. Put the earlier date in A1 and the later one in B1:

What you want Formula Result for the example
Days between =B1-A1 172
Days between, same thing =DAYS(B1,A1) 172
Days between, both ends counted =B1-A1+1 173
Days between with DATEDIF =DATEDIF(A1,B1,"d") 172

Three things catch people out:

  • DAYS takes the end date first. =DAYS(B1,A1) is right and =DAYS(A1,B1) gives −172.
  • The result cell can show a date. If you see something like “20 Jun 1900”, change the cell format to Number or General.
  • DATEDIF errors when the start is after the end. It is also the one that can return whole months and years with the "m" and "y" units.

If your dates arrive as text (for example “2026-03-14” pasted from another system), wrap them in DATEVALUE first or the subtraction returns an error.

Leap years change February, so check ranges that cross it

Every fourth year February has 29 days, which shifts any count that spans it. From 28 February to 1 March is 1 day in 2027 and 2 days in 2028, because 2028 is a leap year. A full year from 1 January 2026 to 1 January 2027 is 365 days, while the same span for 2028 is 366.

By hand, this means you must use the real length of February for the year you are in, not a flat 28.

Express the answer in weeks, months or business days when days are not enough

Days are the base unit, and other units come from them:

  • Weeks: divide by 7. 172 days is 24 weeks and 4 days.
  • Months and days: count whole months from the start date, then the days left over. 14 March to 2 September 2026 is 5 months and 19 days (14 March to 14 August, then 19 more days). Months are not a fixed length, so the same number of days can be a different month count in a different year.
  • Business days: only Monday to Friday count, and public holidays are removed. The same 172-day span has 122 weekdays and 50 weekend days. The business days calculator removes public holidays for you; the next guide explains what counts.

To move in the other direction, from a date and a number of days to the date you land on, use add or subtract days from a date.