How to Calculate Age in Google Sheets from a Date of Birth: DATEDIF, Years-Months-Days and Next Birthday (2026)
Member lists, class rosters, patient sign-ups and HR sheets often need an age, and subtracting years gets it wrong for anyone whose birthday hasn’t come yet this year. Google Sheets has a function for it: DATEDIF, which Google describes as calculating “the number of days, months, or years between two dates”. This guide shows the age in whole years, years-months-days, the age on a specific date, why YEARFRAC is a weaker choice, one formula for a whole column, dates of birth stored as text, the next birthday, and the errors you are most likely to see.
The short answer
- Age today:
=DATEDIF(B2, TODAY(), "Y")with the date of birth in B2. - Years, months and days: use the units
"Y","YM"and"MD"(Step 3). - Age on a set date: replace TODAY() with the date, such as
DATE(2026, 9, 1). - #NUM!: the date of birth is later than the end date.
The example
A list with names in column A and dates of birth in column B, rows 2 to 8, and the as-of date 12/2/2026 in I1. Columns C to F are filled in by the formulas below.
| Row | A: Name | B: Date of birth | C: Age | D: Years, months, days | E: Next birthday | F: Days until |
|---|---|---|---|---|---|---|
| 2 | Ava Martin | 3/14/1990 | 36 | 36 years, 8 months, 18 days | 3/14/2027 | 102 |
| 3 | Ben Ortiz | 12/2/2000 | 26 | 26 years, 0 months, 0 days | 12/2/2027 | 365 |
| 4 | Chloe Park | 12/3/1985 | 40 | 40 years, 11 months, 29 days | 12/3/2026 | 1 |
| 5 | Dev Shah | 7/9/2012 | 14 | 14 years, 4 months, 23 days | 7/9/2027 | 219 |
| 6 | Emma Lee | (not known yet) | (empty) | (empty) | (empty) | (empty) |
| 7 | Finn Novak | 9/20/2026 | 0 | 0 years, 2 months, 12 days | 9/20/2027 | 292 |
| 8 | Grace Kim | 5/20/1958 | 68 | 68 years, 6 months, 12 days | 5/20/2027 | 169 |
Step 1: put the as-of date in one cell
In H1 type As of and in I1 enter:
=TODAY()
Google’s TODAY help says TODAY “will always represent the current date the last time the spreadsheet was recalculated”, so every age moves forward on its own. For an age on a fixed day, such as a report date or an enrollment cutoff, type that date in I1 instead. The results in this guide use 12/2/2026 in I1, so you can check them in your own sheet.
Step 2: age in whole years with DATEDIF
In C2 enter this and fill it down to C8:
=IF(B2="", "", DATEDIF(B2, $I$1, "Y"))
The "Y" unit counts whole years only. Google’s help adds that “Months and years are only counted if they are equal to or go past the "day."” That is exactly how ages work:
- Ben Ortiz (born 12/2/2000) is 26, because I1 is his birthday.
- Chloe Park (born 12/3/1985) is still 40: she turns 41 tomorrow.
- Finn Novak (born 9/20/2026) is 0.
The IF(B2="", "", …) part keeps row 6 empty until Emma Lee’s date of birth is known. Without it, DATEDIF treats the empty cell as 0, the date 12/30/1899, and returns 126.
Step 3: years, months and days
Google’s help defines "YM" as “the number of whole months between start_date and end_date after subtracting whole years” and "MD" as “the number of days between start_date and end_date after subtracting whole months”. Join the three parts with &. In D2 enter this and fill it down:
=IF(B2="", "", DATEDIF(B2, $I$1, "Y")&" years, "&DATEDIF(B2, $I$1, "YM")&" months, "&DATEDIF(B2, $I$1, "MD")&" days")
Ava Martin (born 3/14/1990) shows 36 years, 8 months, 18 days, and Chloe Park shows 40 years, 11 months, 29 days.
Every DATEDIF unit for one person
For Ava Martin (3/14/1990 in B2, 12/2/2026 in I1), =DATEDIF(B2, $I$1, "M") returns 440 and =DATEDIF(B2, $I$1, "D") returns 13412. All six units:
| Unit | What it counts | Result for Ava |
|---|---|---|
"Y" | Whole years | 36 |
"M" | Whole months | 440 |
"D" | Days | 13412 |
"YM" | Whole months after subtracting whole years | 8 |
"MD" | Days after subtracting whole months | 18 |
"YD" | Days since the last birthday | 263 |
Age on a specific date
For an age on a cutoff date, such as the start of a school year or a sports season, put the date in place of $I$1 with DATE:
=DATEDIF(B2, DATE(2026, 9, 1), "Y")
For Ava it returns 36. Ben Ortiz returns 25 on September 1, 2026, because he turns 26 on 12/2/2026. Finn Novak returns #NUM!, because he was born after that date.
YEARFRAC: age with a fraction, and why it’s not the best choice
YEARFRAC “Returns the number of years, including fractional years, between two dates using a specified day count convention.” Its third argument matters. Google’s help says the default, 0, is “US (NASD) 30/360”, which assumes 30-day months and 360-day years, and that for “non-financial settings, option 1, Actual/Actual, is most likely the correct choice.” For Grace Kim in row 8:
=YEARFRAC(B8, $I$1, 1)returns about 68.54.=YEARFRAC(B8, $I$1)(the default) returns about 68.53.
To get whole years from YEARFRAC, people often wrap it in INT, which rounds down to an integer. That can be a year short on a birthday: for Ben Ortiz on his 26th birthday,
=INT(YEARFRAC(B3, $I$1, 1))
returns 25, while DATEDIF returns 26. Rounding instead of INT is worse: =ROUND(YEARFRAC(B4, $I$1, 1), 0) returns 41 for Chloe Park, who is still 40. Use YEARFRAC when you want a decimal age, and DATEDIF for the age in whole years.
Step 4: the next birthday and the days until it
Add the next age in whole years to the date of birth with EDATE, which “returns a date a specified number of months before or after another date”. In E2 enter this and fill it down:
=IF(B2="", "", EDATE(B2, 12*(DATEDIF(B2, $I$1, "Y")+1)))
Then count the days in F2 and fill it down:
=IF(B2="", "", E2-$I$1)
Ava’s next birthday is 3/14/2027, 102 days away; Chloe Park’s is tomorrow, 1 day away. On a birthday itself the formula moves on to next year, so Ben Ortiz shows 12/2/2027 and 365. To spot birthdays that fall on the as-of date, use the "YD" unit, which Google’s help suggests for “How many days has it been since my last birthday”:
=DATEDIF(B3, $I$1, "YD")
It returns 0 for Ben. For someone born on February 29, EDATE uses February 28 in years that are not leap years: 2/29/2004 gives a next birthday of 2/28/2027, 88 days after 12/2/2026.
If F shows a date such as 4/11/1900 instead of 102, the cell has a date format: choose Format › Number › Number (it then shows 102.00). For more countdown formulas see days until a date, and for a list of upcoming birthdays with email reminders see the birthday and work anniversary reminders guide.
Step 5: one formula for the whole column
Instead of filling C2 down, clear C2:C8 and put this in C2 only (see Google’s ARRAYFORMULA help):
=ARRAYFORMULA(IF(B2:B="", "", DATEDIF(B2:B, $I$1, "Y")))
It returns the same ages, 36, 26, 40, 14, (empty), 0 and 68, leaves empty rows empty and covers people you add later. If a cell below C2 already holds something, the formula can’t expand and C2 shows #REF!; clear that cell.
Dates of birth stored as text
Imported or pasted lists sometimes hold dates of birth as text that only looks like a date. Check with ISNUMBER: a real date is a number underneath, so =ISNUMBER(B2) returns TRUE for Ava’s date, and FALSE for text. To try it, type '3/14/1990 (with a leading apostrophe) in B10: it is stored as text and ISNUMBER(B10) returns FALSE.
DATEVALUE converts the text into a date value. =DATEVALUE(B10) returns 32946, the date 3/14/1990 as a number (choose Format › Number › Date to show it as a date), and the age works on the converted value:
=DATEDIF(DATEVALUE(B10), $I$1, "Y")
It returns 36. Google’s DATEVALUE help adds that “Understood formats may depend on region and language settings.” In a spreadsheet set to the United States locale, day-first text such as 14/03/1990 is not understood and returns #VALUE!, while the ISO form 1990-03-14 converts to the same 32946. DATEDIF on text-typed dates follows the same pattern: Sheets converted the text 3/14/1990 by itself and still returned 36, but day-first text such as 14/03/1990 gave #VALUE!. So a text date doesn’t always break the age, which makes the ISNUMBER check the reliable way to find it. The locale is under File › Settings (Google’s locale help); change it to match how the dates were written before you convert them.
Common problems
- #NUM! The start date is later than the end date: a birth date in the future (such as 3/14/2090 instead of 3/14/1990) or an age on a date before the person was born.
- The age shows as a date such as 2/4/1900. The cell has a date format, so 36 is shown as a date. Google’s DATEDIF help says to “Change the format of the cell to Number”: choose Format › Number › Number.
- An empty date of birth shows an age such as 126. DATEDIF treats the empty cell as 0 and counts from 12/30/1899 (126 years with 12/2/2026 in I1). Wrap the formula in
IF(B2="", "", …)as in Step 2. - A date typed straight into the formula gives the wrong age.
=DATEDIF(3/14/1990, $I$1, "Y")returns 126 with 12/2/2026 in I1, because 3/14/1990 without quotes is a division, not a date. Put the date in quotes, as in Google’s sampleDATEDIF("7/16/1969", "7/24/1969", "Y"):=DATEDIF("3/14/1990", $I$1, "Y")returns 36. - The age is a year too high or too low with YEARFRAC. Use DATEDIF with
"Y"for whole years (see the YEARFRAC section).
FAQ
How do I calculate age from a date of birth in Google Sheets?
Use DATEDIF with the "Y" unit: with the date of birth in B2, =DATEDIF(B2, TODAY(), "Y") returns the age in whole years today. Google’s DATEDIF help says "Y" returns “the number of whole years between start_date and end_date”. For 3/14/1990 it returns 36 on 12/2/2026.
How do I show age in years, months and days?
Join three DATEDIF results: =IF(B2="", "", DATEDIF(B2, $I$1, "Y")&" years, "&DATEDIF(B2, $I$1, "YM")&" months, "&DATEDIF(B2, $I$1, "MD")&" days"). With 3/14/1990 in B2 and 12/2/2026 in I1 it shows 36 years, 8 months, 18 days.
How do I calculate age on a specific date?
Put that date in place of TODAY(): =DATEDIF(B2, DATE(2026, 9, 1), "Y") returns the age on September 1, 2026, which is 25 for someone born on 12/2/2000 (they turn 26 on 12/2/2026).
Why does DATEDIF return #NUM!?
The date of birth is later than the end date. DATEDIF needs the earlier date first, so a typo such as 2090 instead of 1990, or an age on a date before the person was born, gives #NUM!.
Should I use YEARFRAC or DATEDIF for age?
Use DATEDIF for whole years. YEARFRAC returns years with a fraction and its default day count is 30/360, a financial convention. Even with basis 1 (Actual/Actual), =INT(YEARFRAC(B3, $I$1, 1)) returns 25 for someone born on 12/2/2000 on their 26th birthday, 12/2/2026, while DATEDIF returns 26.
Why does my age formula show a date like 2/4/1900?
The cell has a date format, so the age 36 is shown as the date 36 days after December 30, 1899. Select the cell and choose Format › Number › Number. Google’s DATEDIF help describes the same symptom and fix.
See SheetReminders
Related guides
- How to Count the Days Until a Date in Google Sheets: Days Left, Overdue, Business Days and a Countdown That Updates Itself (2026)
- How to Get Birthday and Work Anniversary Reminders from Google Sheets (2026)
- How to Add Months or Years to a Date in Google Sheets: EDATE, End-of-Month Dates and Renewal Dates (2026)
- How to Add Business Days to a Date in Google Sheets: WORKDAY Due Dates That Skip Weekends and Holidays (2026)
- How to Send Automatic Email Reminders Based on a Date in Google Sheets (2026)
- Employee Onboarding Checklist in Google Sheets: Tasks Due from Each New Hire’s Start Date and Email Reminders to Task Owners (2026)