How to calculate age in years from a birth date
✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)Get a person's age in whole years from their date of birth.
The formula
| App | Formula | Notes |
|---|---|---|
| Excel (desktop) | =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. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned 34 for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run desktop Excel.
Functions used
DATEDIF · TODAY — see full Excel, Google Sheets & LibreOffice compatibility for each.
Related recipes
- How to calculate the next birthday (or anniversary) date
- How to count business days left in the month
- How to calculate age in years and months
- How to calculate the number of days between two dates
- How to count days since a date