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

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

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: