Employee Tenure in Years, Months, Days

Excel Formulas › HR & Payroll

All versionsDATEDIF

Show length of service precisely — “5 years, 3 months, 12 days” — from a hire date to today (or a termination date). DATEDIF with three unit codes builds each piece.


Quick formula: full tenure from hire date to today:
=DATEDIF(hire,TODAY(),"y")&" yr "&DATEDIF(hire,TODAY(),"ym")&" mo "&DATEDIF(hire,TODAY(),"md")&" d"
The "y", "ym", and "md" codes return whole years, leftover months, and leftover days.

Functions used (tap for the full reference guide):

The example

Hired March 7, 2021.

AB
1ItemValue
2Hire date2021-03-07
3Tenure5 yr 3 mo 12 d

The formula

The formula:

=DATEDIF(B2,TODAY(),"y")&" yr "&DATEDIF(B2,TODAY(),"ym")&" mo "&DATEDIF(B2,TODAY(),"md")&" d" // years, months, days

How it works

How it works:

  1. DATEDIF(hire, end, "y") returns the number of complete years.
  2. "ym" gives the leftover whole months after those years.
  3. "md" gives the leftover days after the months.
  4. Concatenate the three with labels for a readable tenure string; use a termination date in place of TODAY() for former staff.

DATEDIF is hidden but supported. It won’t appear in Excel’s function autocomplete — type it in full. The "md" unit can occasionally misbehave around month boundaries; for total years as a decimal, YEARFRAC(hire, end) is a robust alternative.

Try it: interactive demo

Live demo

Hire date.

Tenure:

Variations

Whole years only

For service awards:

=DATEDIF(hire, TODAY(), "y")

Total months

All months:

=DATEDIF(hire, TODAY(), "m")

Decimal years

Robust alternative:

=YEARFRAC(hire, TODAY())

Pitfalls & errors

Not in autocomplete. DATEDIF is undocumented — type the whole name yourself.

Order matters. The earlier date (hire) comes first; a later start than end errors.

"md" quirks. The day component can be off near month ends; prefer YEARFRAC for precise decimals.

Practice workbook

📊
Download the free Employee Tenure in Years, Months, Days practice workbook
A tenure sheet with the whole-years, total-months, and decimal-years variants, plus 4 challenges with answers. No sign-up required.

Frequently asked questions

How do I calculate employee tenure in Excel?
Use DATEDIF with three codes: =DATEDIF(hire,TODAY(),"y")&" yr "&DATEDIF(hire,TODAY(),"ym")&" mo "&DATEDIF(hire,TODAY(),"md")&" d" for years, months, and days.
How do I get whole years of service only?
Use =DATEDIF(hire, TODAY(), "y") for completed years — handy for service-award eligibility.
Why can't I find DATEDIF in Excel?
It's a hidden, undocumented function. It works but won't show in autocomplete — type the full name.

Stop fighting formulas. Learn them in a day.

This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related formulas: Calculate age · Age in years, months, days · Headcount by month

Function references: DATEDIF