To calculate the number of days between two dates, subtract the earlier date from the later date. The result gives the total number of days separating them, though you should decide whether to include the start date, end date, or both.
For example, from March 1 to March 10 is 9 days if you count only the elapsed time, but 10 days if you include both the first and last dates.
Basic Method
Use this formula:
\text{Days between dates} = \text{Later date} - \text{Earlier date}
Example
Calculate the days from January 10 to January 25.
25 - 10 = 15
There are 15 days between January 10 and January 25.
If you need to include both dates, add 1:
15 + 1 = 16
So the period from January 10 through January 25 includes 16 calendar days.
Calculate Days Between Dates in Excel
Excel makes this easy because dates are stored as serial numbers.
If the start date is in cell A2 and the end date is in cell B2, use:
=B2-A2
Make sure the result cell is formatted as a number, not a date.
Include both dates
=B2-A2+1
Example
| Start date | End date | Formula | Result |
|---|---|---|---|
| 2026-01-10 | 2026-01-25 | =B2-A2 |
15 |
| 2026-01-10 | 2026-01-25 | =B2-A2+1 |
16 |
If Excel shows a date instead of a number, change the cell format from Date to General or Number.
Calculate Days Between Dates in Google Sheets
Google Sheets uses the same approach.
=B2-A2
To include both the start and end dates:
=B2-A2+1
You can also use the DAYS function:
=DAYS(B2,A2)
This returns the number of days from the start date to the end date.
Calculate Days Between Dates Manually
For dates within the same month, subtract the day numbers.
Example: Same month
From June 5 to June 28:
28 - 5 = 23
There are 23 days between the dates.
For dates in different months, add the remaining days in the first month, the full days in each complete month between them, and the days in the final month.
Example: Different months
Calculate the days from March 20 to May 10.
- Days remaining in March after March 20:
31 - 20 = 11 - Days in April: 30
- Days in May up to May 10: 10
11 + 30 + 10 = 51
There are 51 days between March 20 and May 10.
Account for Leap Years
A leap year has 366 days instead of 365 because February has 29 days instead of 28.
A year is a leap year if:
- It is divisible by 4, and
- It is not divisible by 100, unless it is also divisible by 400.
For example:
- 2024 is a leap year.
- 1900 is not a leap year.
- 2000 is a leap year.
If your date range includes February 29, include that extra day in the total. Spreadsheet formulas and most date calculators handle leap years automatically.
Count Business Days Instead of Calendar Days
Calendar days include weekends and holidays. Business days usually count Monday through Friday and exclude weekends.
Example
From Monday, March 2 to Friday, March 13:
- Calendar days: 12
- Weekdays: 10
- Business days after excluding a holiday: depends on the holiday schedule
To calculate business days in Excel or Google Sheets, use:
=NETWORKDAYS(A2,B2)
This counts weekdays between the two dates, including both the start and end dates if they are weekdays.
To exclude holidays, list the holiday dates in another range, such as D2:D10, and use:
=NETWORKDAYS(A2,B2,D2:D10)
Calculate Age in Days
To find someone’s age in days, subtract their date of birth from today’s date.
In Excel or Google Sheets:
=TODAY()-A2
If the date of birth is in cell A2, this returns the number of days old the person is.
For example, if someone was born on January 1, 2000, and today is January 1, 2026, the calculation is:
\text{Days} = 9,497
The exact number depends on the current date and leap years.
Common Uses
Project deadlines
If a task starts on April 1 and must be finished by April 20, there are 19 days between the dates. If the deadline includes both dates, the project spans 20 calendar days.
Rental periods
For a rental from July 1 to July 7, the elapsed time is 6 days. However, many rental agreements count both the pickup and return dates, making it a 7-day rental. Check the terms of the agreement.
Event planning
If an event is on December 15 and today is October 1, calculate the days remaining to plan catering, invitations, travel, and reminders.
Interest, invoices, and due dates
Businesses often calculate payment terms, late fees, or interest based on the number of days between an invoice date and a payment date. Check whether the agreement counts calendar days or business days.
Common Mistakes to Avoid
Forgetting whether to include the end date
The biggest source of confusion is whether to count both dates.
- Elapsed days: End date minus start date
- Inclusive days: End date minus start date, plus 1
For example, from March 1 to March 31:
- Elapsed days: 30
- Inclusive days: 31
Subtracting dates in the wrong order
Always subtract the earlier date from the later date. If you reverse them, the result will be negative.
Ignoring leap years
A date range that includes February 29 has one extra day. Use a spreadsheet formula or reliable date calculator for long periods.
Mixing date formats
Enter dates consistently, such as YYYY-MM-DD, or use your spreadsheet’s date format. Text entered incorrectly may not calculate properly.
Confusing calendar days with business days
A 10-calendar-day period may contain only 8 business days, or fewer if holidays fall within it. Use NETWORKDAYS when weekends and holidays matter.
Quick Reference
| Task | Formula or method |
|---|---|
| Days between dates | Later date minus earlier date |
| Include both dates | Add 1 to the difference |
| Excel or Google Sheets | =B2-A2 |
| Include both dates in a spreadsheet | =B2-A2+1 |
| Business days | =NETWORKDAYS(A2,B2) |
| Business days excluding holidays | =NETWORKDAYS(A2,B2,holidays) |
| Age in days | =TODAY()-birth_date |
Decide first whether you need elapsed days, inclusive calendar days, or business days. Then subtract the earlier date from the later date, adjust for inclusiveness if needed, and use a spreadsheet formula for accuracy across months and leap years.