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)
| Argument | What it is |
|---|---|
| start_date | The earlier date. |
| end_date | The 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.
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.
In C2, calculate each employee’s full years of service as of the cutoff date in F1.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Employee | Start date | Years | Cutoff date | 12/31/2026 | ||
| 2 | Marisol | 03/16/2015 | |||||
| 3 | Fernando | 12/31/2021 | |||||
| 4 | Gabriela | 08/01/2019 | |||||
| 5 | Hugo | 02/10/2026 | |||||
| 6 | Daniela | 01/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!.