Back to Blog

How to Calculate Days Between Dates in Google Sheets

D
David DeSouza
Dec 1, 2025
Illustration for How to Calculate Days Between Dates in Excel

The Problem

You need to know how long a project took, or how many days until a deadline.

The Easy Way: Use SheetXAI

If you don't want to mess with formulas, the fastest way to do this is simply by asking.

With SheetXAI, you can open the sidebar and type:

Calculate the number of business days between the start date and end date.

SheetXAI will instantly write the formula or script for you and fill the cells. It handles the syntax so you can focus on the result.

The Manual Way: The Formulas You Need

To do this manually, you need to use: NETWORKDAYS (or just subtraction).

1. Subtraction

Subtracting two dates gives total days.

Syntax: =End_Date - Start_Date

  • End_Date: The later date.
  • Start_Date: The earlier date.

Example: =A2 - A1 gives 5 days.

2. NETWORKDAYS

Calculates working days (excludes weekends).

Syntax: =NETWORKDAYS(start_date, end_date)

  • start_date: The start date.
  • end_date: The end date.

Example: Returns 5 for a Mon-Fri week.

Understanding the Logic

Dates are just numbers in Google Sheets. Subtracting them works for total days. For business days, the function automatically skips Saturdays and Sundays.

The Final Formula:

=NETWORKDAYS(A2, B2)

Conclusion

Now you know the "classic" way to solve this using formulas. It's a great skill to have.

But for those times when you just want the job done without the mental math, SheetXAI is there to help.

Boost your productivity today.
Start automating your spreadsheets.

Join thousands of professionals saving hours every week. No credit card required to start.

Learn more