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

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.

RowA: NameB: Date of birthC: AgeD: Years, months, daysE: Next birthdayF: Days until
2Ava Martin3/14/19903636 years, 8 months, 18 days3/14/2027102
3Ben Ortiz12/2/20002626 years, 0 months, 0 days12/2/2027365
4Chloe Park12/3/19854040 years, 11 months, 29 days12/3/20261
5Dev Shah7/9/20121414 years, 4 months, 23 days7/9/2027219
6Emma Lee(not known yet)(empty)(empty)(empty)(empty)
7Finn Novak9/20/202600 years, 2 months, 12 days9/20/2027292
8Grace Kim5/20/19586868 years, 6 months, 12 days5/20/2027169

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:

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:

UnitWhat it countsResult for Ava
"Y"Whole years36
"M"Whole months440
"D"Days13412
"YM"Whole months after subtracting whole years8
"MD"Days after subtracting whole months18
"YD"Days since the last birthday263

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:

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

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.

Want an email before each birthday arrives? SheetReminders (disclosure: we make it) is a Google Sheets add-on that watches any date column and emails the right person before it arrives. Choose who gets the email (an address column or one fixed address) and when: multiple reminders per date, like 30, 7 and 0 days before; personalized emails with {{Column name}} and {{Days left}}; a digest mode with one email per person listing everything due; and a sent log written back to the row. The ages and next-birthday dates stay with the formulas above. Your data never leaves your Google account. 14-day free trial, no credit card required. It is on the Google Workspace Marketplace.
See SheetReminders

Related guides