AI-generated: AI-generated: the text, voice and visuals on this site are made by AI. Every formula is tested on sample data by the Cellwise checker.

Age or years between two dates (DATEDIF)


dates datedif

Whole years and leftover months between two dates with DATEDIF.

The problem

You need an age or the whole years between two dates.

Formulas

Years:  =DATEDIF(DATE(1990,5,20),DATE(2026,10,18),"Y")    -> 36
Months: =DATEDIF(DATE(1990,5,20),DATE(2026,10,18),"YM")   -> 4

Notes

Excel does not document DATEDIF and hides it from the formula helper, but it works. Google Sheets documents it. We tested only the Y and YM units; avoid MD and YD. Use TODAY() in place of the fixed end date for a live age.

Tested on sample data by the Cellwise checker (log CW-PL-20261018-41). AI-made: the text, voice and visuals are generated by AI.

Checked before publishing: a check.