FormulaCraft

How to calculate days between two dates in Excel and Google Sheets

Topic:Date arithmetic
Excel & Google Sheets
=B2-A2

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Put the earlier date in A2 and the later date in B2.
  2. 2Enter =B2-A2 and format the result as a plain number.
  3. 3For working days only (excluding weekends), use =NETWORKDAYS(A2, B2).

Tips

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

Frequently asked

Why does my date subtraction show a date instead of a number?

The result cell inherited date formatting. Change it to Number format to see the day count.

More on Date arithmetic

See all →

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: