Formulyo

Excel + Google Sheets · DATEDIF

Excel's hidden formula

Counts full years, months or days between two dates. It's not in the menu, but it works.

The formula

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

What each part means

Example

TODAY: NOV 2, 2026

Before
ABC
1EmployeeStart dateYears
2Laura2019-03-15
3João2022-11-20
4Priya2025-01-07
5Tom2010-06-01
After
ABC
1EmployeeStart dateYears
2Laura2019-03-157
3João2022-11-203
4Priya2025-01-071
5Tom2010-06-0116

Step by step

  1. Click cell C2.
  2. Type the formula: =DATEDIF(B2, TODAY(), "y")
  3. Press Enter.
  4. Drag the small square in the bottom-right corner of the cell down to copy it to the other rows.

Where it works

The same formula in other languages

Get 1 formula a day, free

Plus a free weekly planner template for Excel and Google Sheets. Unsubscribe in 1 click.

✓ Done! Check your inbox to confirm.

Want ready-made templates? See the Formulyo pack →

Keep learning