DATE & TIME Days Between Two Dates in Excel… Counting days between two dates is something I need… Excel 2003+ Google Sheets Same syntax Microsoft Excel C2 =DAYS(end_date, start_date) A B C Project Start Date Days Running 2 Website Redesign 2024-01-15 86 3 CRM Migration 2024-03-01 41 4 Security Audit 2024-02-10 60
Learning Hub Formulas Date & Time

Days Between Two Dates in Excel and Google Sheets

Date & Time 📊 Excel 2003+ ✓ Google Sheets Same syntax in both apps
Purpose
Counting days between two dates is something I need to do in almost every project-related spreadsheet I build. How long…
Counting days between two dates is something I need to do in almost every project-related spreadsheet I build. How long has this ticket been open? How many days until the contract expires? How many days did this project actually take versus the estimate? The quickest way is to simply subtract one date from the other — Excel and Google Sheets store dates as serial numbers so subtraction gives you the difference directly. The DAYS function is a slightly more readable alternative that makes the formula self-documenting. For business contexts where you only want working days and not weekends, NETWORKDAYS is the right tool. I will show all three approaches here so you can pick the right one for your situation.
Syntax
✓ Excel 2003+ ✓ Google Sheets = Same syntax
=DAYS(end_date, start_date)
DAYS is available in Excel 2013+. For older Excel versions use simple subtraction: =end_date - start_date.
Arguments
ArgumentRequiredDescription
end_date Required The later of the two dates. Can be a cell reference, a date entered with DATE(), or TODAY() for the current date. Must be greater than start_date to return a positive result.
start_date Required The earlier of the two dates. DAYS subtracts this from end_date. Note the argument order is end_date first, start_date second — the reverse of what you might expect.
How it works
Excel and Google Sheets represent dates as sequential numbers starting from January 1 1900. Each day adds one to the serial number, so January 2 1900 is 2, January 1 2024 is 45292, and so on. When you subtract an earlier date from a later date, you get the number of days between them because you are just subtracting two integers. DAYS(end_date, start_date) does exactly the same subtraction but makes it explicit which date is the end and which is the start — useful when reading the formula later. One subtlety to watch: the result of date subtraction is often automatically formatted as a date by Excel. If you see a date instead of a number in the result cell, change the cell format to General or Number and the day count will appear correctly.
Examples
1
Calculate how many days each project has been running by counting from the start date to today.
fx =DAYS(TODAY(),B2)
A B C
1 Project Start Date Days Running
2 Website Redesign 2024-01-15 =DAYS(TODAY(),B2)
3 CRM Migration 2024-03-01 41
4 Security Audit 2024-02-10 60
5 Staff Training 2024-04-05 6
6 Budget Review 2024-01-08 83
7 App Rollout 2024-03-22 19
8 Vendor Review 2024-02-28 42
9 Policy Update 2024-04-01 10
10 Office Fit-out 2024-01-22 79
11 Data Cleanup 2024-03-15 26
Row 2: 86 — The Website Redesign started on 15 January 2024. DAYS counts from that date to today giving the number of elapsed days.
The count updates automatically every day the spreadsheet is opened. Sort descending on this column to see which projects have been running longest.
2
Count working days between a start and end date for each project, excluding weekends.
fx =NETWORKDAYS(B2,C2)
A B C D
1 Project Start Date End Date Working Days
2 Website Redesign 2024-01-15 2024-04-10 =NETWORKDAYS(B2,C2)
3 CRM Migration 2024-03-01 2024-04-12 31
4 Security Audit 2024-02-10 2024-04-11 42
5 Staff Training 2024-04-01 2024-04-05 5
6 Budget Review 2024-01-08 2024-04-10 65
7 App Rollout 2024-03-22 2024-04-10 14
8 Vendor Review 2024-02-28 2024-04-09 29
9 Policy Update 2024-04-01 2024-04-10 8
10 Office Fit-out 2024-01-22 2024-04-10 57
11 Data Cleanup 2024-03-15 2024-04-10 19
Row 2: 62 — From 15 January to 10 April 2024 is 62 working days — weekends automatically excluded by NETWORKDAYS.
NETWORKDAYS counts both the start and end date as working days if they fall on weekdays. To exclude public holidays, add a named range of holiday dates as the third argument.
Common use cases
1. Calculate days until each contract expires using TODAY as the start date
=DAYS(C2,TODAY())
2. Count how long each support ticket has been open from creation date to now
=DAYS(TODAY(),B2)
3. Find the duration of each project from start date to end date
=DAYS(C2,B2)
4. Show a countdown to an event in a dashboard
=DAYS(DATE(2024,12,25),TODAY())
5. Flag orders that have been outstanding for more than 30 days
=IF(DAYS(TODAY(),C2)>30,"Overdue","")
Common errors
Result shows a date instead of a number
Excel sometimes formats the result of date arithmetic as a date. The number 45 might display as 14 February 1900 instead of 45.
Fix: Select the result cell, press Ctrl+1 to open Format Cells, and change the category from Date to Number or General.
#VALUE!
One or both of the date arguments contains text that looks like a date but is not stored as a real date value.
Fix: Check that both cells contain actual dates. Dates are right-aligned in cells. Use DATEVALUE to convert text dates to real dates.
Negative result
DAYS returns a negative number when the end_date is earlier than the start_date. This indicates the period is in the past or the arguments are reversed.
Fix: Check whether the dates are the right way round. Use ABS(DAYS(A2,B2)) if you want the absolute number of days regardless of direction.
Tips and variations
Use NETWORKDAYS when weekends should not count
If you are calculating project durations, SLA response times, or delivery windows, you usually want working days only. NETWORKDAYS(start,end) excludes Saturdays and Sundays automatically. Add a holiday list as the third argument to exclude public holidays too.
=NETWORKDAYS(B2,C2)
Combine with IF to flag overdue items automatically
Use the day count inside an IF to flag items automatically. Any project running over 90 days, any invoice more than 30 days old, any ticket open over a week — the formula can tag these without you scanning the column manually.
=IF(DAYS(TODAY(),B2)>30,"Overdue","On track")
Use TODAY() for always-current calculations
Replace a static end date with TODAY() and the formula recalculates every time the spreadsheet opens. This is essential for dashboards tracking live status. If you need a static snapshot instead, enter the date manually using DATE(year,month,day).
=DAYS(TODAY(),B2)
Excel vs Google Sheets
Excel vs Google Sheets
DAYS works identically in Excel 2013+ and Google Sheets. Simple date subtraction (=B2-A2) works in all versions of both applications going back many years. NETWORKDAYS for working days also works identically in both applications. Formulas copy between Excel and Google Sheets without changes.
Frequently asked questions
Subtract one date from the other: =B1-A1 where B1 is the later date and A1 is the earlier date. Format the result cell as a number rather than a date and Excel shows the number of days. DAYS(end_date,start_date) does the same thing in a more readable formula.
Use NETWORKDAYS instead: =NETWORKDAYS(A1,B1). This counts all days from start to end inclusive but skips Saturdays and Sundays. Add a third argument with a list of holiday dates to exclude those too: =NETWORKDAYS(A1,B1,Holidays!A:A).
When you subtract two dates in Excel, the result is also a date-type number and Excel sometimes formats it as a date rather than a plain number. Right-click the result cell, choose Format Cells, and change the format to Number or General to see the day count.
Yes — DAYS and simple subtraction both return negative numbers when the end date is earlier than the start date. This can be useful for checking whether a deadline has already passed. Wrap in ABS() if you want the magnitude regardless of direction.
Concatenate the result with text: =(B1-TODAY())&" days remaining". Note that this converts the result to text which cannot be used in further calculations. Keep the raw number in a helper column if you need it for sorting or summing.