Completed years (DATEDIF "Y")
=IF(A2>B2,"Birth date after as-of date",DATEDIF(A2,B2,"Y"))A2 = birth date, B2 = as-of date (use TODAY() for today). Counts whole years only. Feb 29: DATEDIF waits until the day of month is reached, so a Feb 29 birthday gains the next year on March 1 in common years. DATEDIF returns #NUM! if the start is after the end, hence the check.
| Inputs | Result |
|---|---|
| 31 Dec 2000 → 1 Oct 2026 | 25 |
| 15 Jun 2000 → 14 Jun 2020 (day before birthday) | 19 |
| 29 Feb 2000 → 28 Feb 2023 | 22 (reaches 23 on 1 Mar 2023) |
Tested: LibreOffice Calc recalculation.