Working out how many days there are between two dates sounds like a five-second job until you try it: months have different lengths, leap years add a day, and spreadsheets count in surprising ways. Whether you are planning a project, counting down to a trip or checking a contract deadline, here are the reliable methods, from pen and paper to Excel and Google Sheets.
Decide first: inclusive or exclusive?
Subtracting January 1 from January 10 gives 9 days. If you count both the first and the last day, it is 10. Neither answer is wrong, but they answer different questions. Hotel stays usually count nights (the plain subtraction), while a holiday or a rental period often counts every calendar day it covers (inclusive). Always check which one a deadline or contract means, and say which one you used when you share the number.
By hand: the month-by-month method
Add the days left in the start month, the days of every full month in between, and the days elapsed in the end month. For March 20 to June 5, 2026: 11 days remain in March after the 20th, April adds 30, May adds 31, and June adds 5. That is 11 + 30 + 31 + 5 = 77 days. If February is in the range, remember that it has 29 days in a leap year and 28 otherwise.
In Excel and Google Sheets: simple subtraction
Spreadsheets store dates as numbers, so subtracting one date cell from another gives the days between them: =B2-A2. Format the result cell as a Number, otherwise it may show up as a date. The DAYS function does the same thing, with the end date first: =DAYS(B2,A2). If your spreadsheet is set to another language, the function names may be translated and the separator between arguments may be a semicolon instead of a comma.
Years, months and days with DATEDIF
To get the result in years, months and days, use DATEDIF, which works in both Excel and Google Sheets. =DATEDIF(A2,B2,"y") returns complete years, =DATEDIF(A2,B2,"ym") returns the months left over after those years, and =DATEDIF(A2,B2,"md") returns the remaining days. Be careful with the "md" unit: Microsoft's own documentation warns that it can return incorrect results in some cases, so double-check it against a calculator.
Counting working days only
=NETWORKDAYS(A2,B2) counts the Monday-to-Friday days between two dates and includes both the start and the end date. Add a range of holiday dates as a third argument to exclude them: =NETWORKDAYS(A2,B2,E2:E10). Weekends differ in some countries, and in that case NETWORKDAYS.INTL lets you choose which days count as the weekend.
Common mistakes to avoid
Four mistakes cause most wrong answers. First, assuming every month has 30 days. Second, forgetting leap years: February 28 to March 1 is 1 day in 2026 but 2 days in 2028. Third, dates stored as text, which a spreadsheet cannot subtract. Fourth, cells that contain a time as well as a date, which can add or remove a day depending on rounding.
You can skip the formulas altogether with our Date Difference Calculator: enter two dates and get the exact years, months, days, weeks and hours at once. If you need to know how old someone is on a given date, the Age Calculator does the same for birthdays.