Excel DATEDIF function

Calculates full years, months or days between two dates. It is how you calculate age or tenure. In Spanish Excel it is called SIFECHA.

Syntax

English Excel

=DATEDIF(start_date, end_date, unit)

Spanish Excel (Mexico)

=SIFECHA(fecha_inicial, fecha_final, unidad)

Spanish Excel (Spain, Latin America)

=SIFECHA(fecha_inicial; fecha_final; unidad)

ArgumentWhat it is
start_dateThe earlier date.
end_dateThe later date.
unit"Y" years, "M" months, "D" days; "YM" and "MD" for the remainder.

Example

DATEDIF(start, end, "Y") gives the full years between two dates; "M" gives months and "D" days. Excel does not suggest it as you type, but it works. For today’s date you would use TODAY(); here we use a fixed cutoff date.

=DATEDIF(B2,$F$1,"Y")

Common mistake

Excel does not suggest it as you type, but it works. If the start date is after the end date it returns #NUM!.

About Ads

This site uses Google AdSense to display ads. These ads help us keep WebHerramientas completely free. Ads are managed by Google and meet strict security and privacy standards.

Advertising
Loading ad...

Ads help us keep WebHerramientas free for everyone

Practice DATEDIF

Type the formula in the sheet and check it instantly. Spanish or English function names both work. See all lessons

Age and tenure with DATEDIF

DATEDIF(start, end, "Y") gives the full years between two dates; "M" gives months and "D" days. Excel does not suggest it as you type, but it works. For today’s date you would use TODAY(); here we use a fixed cutoff date.

Example=DATEDIF(B2,$F$1,"Y")SIFECHA = DATEDIF

In C2, calculate each employee’s full years of service as of the cutoff date in F1.

C2
ABCDEFG
1EmployeeStart dateYearsCutoff date12/31/2026
2Marisol03/16/2015
3Fernando12/31/2021
4Gabriela08/01/2019
5Hugo02/10/2026
6Daniela01/07/2008
7

Tip: while typing, click a cell or drag across several to insert their reference.

Frequently asked questions

What is DATEDIF called in Spanish?
In Spanish Excel it is SIFECHA. The formula =DATEDIF(B2,$F$1,"Y") is written =SIFECHA(B2;$F$1;"Y") (or with commas in Mexico).
Why does DATEDIF use semicolons in some Excel versions?
It depends on regional settings. Where the comma is the decimal mark (Spain, much of South America), Excel separates arguments with semicolons. English Excel and Mexican Spanish Excel use commas.
What is the most common DATEDIF mistake?
Excel does not suggest it as you type, but it works. If the start date is after the end date it returns #NUM!.