How to calculate age in years from a birth date
✓ Verified in LibreOffice 25.8.7.3Get a person's age in whole years from their date of birth.
The formula
| App | Formula | Notes |
|---|---|---|
| Excel | =DATEDIF(A2,TODAY(),"Y") | Use TODAY() for the current age; DATEDIF with "Y" returns completed years. |
| Google Sheets | =DATEDIF(A2,TODAY(),"Y") | Identical. |
| LibreOffice Calc | =DATEDIF(A2,TODAY(),"Y") | Identical. |
How it works
DATEDIF(start, end, "Y") returns the number of complete years between two dates. Born 1990-06-15, on 2024-06-15 the person has completed exactly 34 years. In a real sheet put the birth date in A2 and use TODAY() as the end date so the age updates automatically. (We verified with fixed dates so the result is stable.)
Verified, not just documented
We ran =DATEDIF(DATE(1990,6,15),DATE(2024,6,15),"Y") in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 34 — exactly the expected result. Every formula here is confirmed by actually executing it.