How do you calculate the number of days between two dates?

To calculate the exact number of days between two dates, subtract the start date from the end date to find the elapsed duration, or add one day if your rule includes both the start and end dates. For dates within the same month, subtract the earlier day number from the later day number. When dates span multiple months or years, count the remaining days in the starting month, add the full days of every intervening month (accounting for 28, 29, 30, or 31 days), and add the days elapsed in the final month.

If you want to skip manual calendar arithmetic, you can count total calendar days, weeks, weekdays, and weekends immediately using the Days Between Dates Calculator. When your deadline depends only on working days, use the Business Days Calculator or add and subtract calendar periods with the Date Calculator.

Inclusive vs. exclusive day counting: why results often differ by one day

Before counting days on a calendar or in a spreadsheet, confirm whether your situation requires exclusive (elapsed) counting or inclusive counting. Most disagreements over contract deadlines, travel bookings, and project schedules happen because two people use different boundary rules.

Exclusive (elapsed) counting: Measures the difference between two dates (End Date − Start Date). It includes the end date (or the nights between dates) but not both boundary dates. From March 10 to March 15 is 15 − 10 = 5 days. Hotel stays, loan interest periods, and standard spreadsheet subtraction use this method.

Inclusive counting: Counts both the first day and the last day as full calendar days ((End Date − Start Date) + 1). If a leave request or event pass runs from March 10 through March 15 inclusive, the total duration is (15 − 10) + 1 = 6 days.

Strictly interior counting: Counts only the full days strictly inside the boundaries ((End Date − Start Date) − 1). Between March 10 and March 15, only March 11, 12, 13, and 14 sit strictly inside the window, giving 4 days.

Counting method / Formula / Illustrative example (May 4 to May 12) / Common real-world use
Counting methodFormulaIllustrative example (May 4 to May 12)Common real-world use
Elapsed / exclusiveEnd Date − Start Date12 − 4 = 8 daysHotel nights, notice periods, standard date math
Inclusive (both ends)(End Date − Start Date) + 1(12 − 4) + 1 = 9 daysVacation leave days, festival schedules, equipment rental
Strictly interior(End Date − Start Date) − 1(12 − 4) − 1 = 7 daysFull clear days required between two legal notices

Step-by-step manual method across different months

When counting days manually across multiple months, never assume a standard 30-day month. Under the international Gregorian calendar notation summarized by NASA's ISO 8601 Date and Time Reference, month lengths vary between 28 and 31 days:

31 days: January, March, May, July, August, October, December

30 days: April, June, September, November

28 or 29 days: February (28 days in a common year; 29 days in a leap year)

Worked example: Counting from January 20, 2026 to March 15, 2026

Suppose you need to calculate the elapsed calendar days from January 20, 2026 to March 15, 2026:

Count the remaining days in the starting month: January has 31 days. Subtract the start day from the month length: 31 − 20 = 11 days remaining in January.

Add full intervening months: 2026 is not divisible by 4, so it is a common year and February has 28 days.

Add the days in the ending month: Up to March 15 adds 15 days.

Sum the segments: 11 + 28 + 15 = 54 elapsed days (or 55 days if both January 20 and March 15 are counted inclusively).

You can verify this exact span in the Days Between Dates Calculator, which also breaks the 54-day period into 7 weeks and 5 days.

How leap years affect multi-year date calculations

A Gregorian leap year adds one extra day—February 29—whenever the year number meets the official astronomical and civil calendar rule documented by the U.S. Naval Observatory:

The year is evenly divisible by 4 (such as 2024 or 2028).

Exception: If the year is evenly divisible by 100 (such as 1900 or 2100), it is not a leap year unless it is also evenly divisible by 400 (such as 2000 or 2400).

When calculating days across years, check whether February 29 falls inside your date range. A one-year period from March 1, 2023 to March 1, 2024 contains 366 elapsed days because it crosses February 29, 2024. A one-year period from March 1, 2025 to March 1, 2026 contains 365 elapsed days. If you are calculating a person's exact age in completed years, months, and days rather than raw day counts, use the Age Calculator.

Calculating days between dates in Excel and Google Sheets

Spreadsheets store calendar dates as sequential serial numbers, which makes date subtraction straightforward across both Microsoft Excel and Google Sheets. According to Microsoft's Date and Time Functions Reference and NETWORKDAYS documentation, you have three reliable options assuming your start date is in cell A2 and your end date is in cell B2:

Direct subtraction (=B2-A2): Returns the exact elapsed calendar days between the two cells. Ensure the result cell is formatted as a Number or General, not as a Date.

The DAYS function (=DAYS(B2, A2)): Note that DAYS places the end date first and the start date second. For inclusive counting, use =DAYS(B2, A2)+1.

Working days only (=NETWORKDAYS(A2, B2)): Counts Monday-through-Friday workdays inclusively between A2 and B2, and accepts an optional third argument referencing a range of public holiday dates to exclude.

Common mistakes to avoid

Confusing MM/DD/YYYY and DD/MM/YYYY formats: In the United States, 04/07/2026 means April 7, 2026. In the United Kingdom and much of Canada, 04/07/2026 is read as 4 July 2026—a difference of 88 days. Writing the month name out (7 April 2026) or using the ISO format (2026-04-07) prevents ambiguity.

Using fixed 30-day months for calendar periods: Multiplying months by 30 undercounts a six-month span by two to four days. As noted on the CorelyUp Unit Converter, fixed-duration time conversion works for seconds through weeks, whereas calendar months and years require date-aware calculation.

Ignoring time zones and Daylight Saving Time (DST): Calendar day counts compare calendar dates, not 24-hour blocks. When clocks spring forward or fall back for Daylight Saving Time, one calendar day is 23 or 25 hours long.

Checklist before finalizing a deadline calculation

Confirm whether the rule specifies calendar days, business days, or working days.

Check whether the start date, end date, or both are included in the count.

Verify whether public holidays apply to the jurisdiction governing the deadline.

Write dates in an unambiguous format (YYYY-MM-DD or 15 March 2026) before entering them into a calculator or spreadsheet.