FormulaCraft

How to calculate employee tenure in Excel and Google Sheets

Excel & Google Sheets
=DATEDIF(A2,IF(B2="",TODAY(),B2),"Y")&" yr "&DATEDIF(A2,IF(B2="",TODAY(),B2),"YM")&" mo"

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 hire date in column A and the end date (or leave blank for current employees) in column B.
  2. 2In C2 enter: =DATEDIF(A2,IF(B2="",TODAY(),B2),"Y")&" yr "&DATEDIF(A2,IF(B2="",TODAY(),B2),"YM")&" mo"
  3. 3The IF inside each DATEDIF uses TODAY() for active employees and the actual end date for former ones.
  4. 4For a decimal years-only result use: =YEARFRAC(A2,IF(B2="",TODAY(),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

How do I calculate tenure for employees who have left?

Enter their termination date in column B. The IF(B2="",TODAY(),B2) portion will use that date instead of TODAY().

Can I show only full years?

Yes — use =DATEDIF(A2,TODAY(),"Y") to return only the count of complete years.

Formulas used

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

Last reviewed: