How to Calculate Age in Google Sheets: 5 Methods (2026)

The short answer to how to calculate age in Google Sheets is one formula: =DATEDIF(A2, TODAY(), “Y”), where A2 holds the date of birth. It returns the number of completed years — for example, someone born on 15 June 1990 is 36 years old on 7 November 2026, and the formula gives 36. The age updates itself every day, because TODAY() always returns the current date. This guide shows how to calculate age in Google Sheets step by step: DATEDIF whole years, the years-months-days breakdown, YEARFRAC, ages as of a date, ARRAYFORMULA for a whole column, the 29 February case, and #NUM! and #VALUE! fixes.

how to calculate age in Google Sheets

How to Calculate Age in Google Sheets in Whole Years

The first thing to know about how to calculate age in Google Sheets is that the best tool for the job, DATEDIF, is undocumented. It does not appear in the formula autocomplete list, so you have to type the whole name yourself — but it works, and Google’s official function list documents it. DATEDIF stands for “date difference”: it measures the gap between two dates in whatever unit you ask for.

The syntax is short:

=DATEDIF(start_date, end_date, unit)

The start date is the date of birth, the end date is usually TODAY(), and the unit is a code in quotes. The unit codes that matter for age are:

UnitWhat it returns
“Y”Complete years between the two dates
“M”Complete months between the two dates
“D”Total days between the two dates
“YM”Complete months since the last birthday
“YD”Days since the last birthday, ignoring years
“MD”Days since the last month anniversary

For whole years the formula is =DATEDIF(A2, TODAY(), “Y”). The “Y” counts completed years only: a person whose birthday is next month is still the lower age, even if it is only a week away. DATEDIF never rounds up.

Three worked examples, all as of 7 November 2026:

Date of birthFormulaResult
15 June 1990=DATEDIF(A2, TODAY(), “Y”)36
3 March 1988=DATEDIF(A2, TODAY(), “Y”)38
20 December 1990=DATEDIF(A2, TODAY(), “Y”)35

The third row is the trap that catches people. Subtracting the years — =YEAR(TODAY()) – YEAR(A2) — gives 36 for someone born on 20 December 1990, because 2026 minus 1990 is 36. But that person does not turn 36 until 20 December 2026, so on 7 November 2026 they are still 35. The YEAR-subtraction shortcut ignores the month and day entirely, so it is wrong for anyone whose birthday has not happened yet this year. DATEDIF gets it right; YEAR subtraction does not.

TODAY() recalculates whenever the sheet opens, so ages stay current; to freeze an age for a report, copy the column and Paste special > Values only.

How to Calculate Age in Google Sheets in Years, Months and Days

Whole years suit most lists, but sometimes you need the full breakdown — 36 years, 4 months and 23 days, not just 36. That takes three DATEDIF calls, one per part, all reading the same birth date:

=DATEDIF(A2, TODAY(), “Y”) — completed years

=DATEDIF(A2, TODAY(), “YM”) — months since the last birthday

=DATEDIF(A2, TODAY(), “MD”) — days since the last month anniversary

For someone born on 15 June 1990, as of 7 November 2026, those three calls return 36, 4 and 23: 36 years, 4 months and 23 days. The total days lived is 13,294 — =DATEDIF(A2, TODAY(), “D”) — and the total complete months is 436, which is 36 × 12 + 4.

To show the whole thing in one cell, join the three parts with &:

=DATEDIF(A2, TODAY(), “Y”) & ” years, ” & DATEDIF(A2, TODAY(), “YM”) & ” months, ” & DATEDIF(A2, TODAY(), “MD”) & ” days”

That returns the text “36 years, 4 months, 23 days”. Keep in mind the result is text, not a number, so you cannot sort or add it up afterwards — keep a plain-number age column alongside it if you need to sort.

One caution about the “MD” unit: it has a known quirk in both Excel and Sheets, and around month-end dates it can come out a day off. If a days figure looks wrong, cross-check it against the total-days figure from =DATEDIF(A2, TODAY(), “D”). The MD values in this article are verified against the day counts: 13,294 days for the first example, 11,091 for the second.

The YEARFRAC Shortcut

If DATEDIF feels fiddly, YEARFRAC is the shortcut most people reach for when they work out how to calculate age in Google Sheets. YEARFRAC returns the fraction of a year between two dates as a decimal number, so you wrap it in INT to drop the fraction and keep the whole years:

=INT(YEARFRAC(A2, TODAY()))

For 15 June 1990, YEARFRAC returns about 36.40 as of 7 November 2026, and INT cuts that to 36. The raw decimal is the person’s age in decimal years — the same figure our decimal age calculator shows — so use =YEARFRAC(A2, TODAY()) on its own if you want it unrounded.

YEARFRAC takes an optional third argument, the day-count basis, and the default (0) uses the US 30/360 method. That can put the answer a day or two out, so for ages always pass 1, the actual/actual basis, which counts real calendar days:

=INT(YEARFRAC(A2, TODAY(), 1))

DATEDIF is the better default: exact, and it breaks age into years, months and days. YEARFRAC wins when you want the decimal age, or a formula you can remember without looking up unit codes.

How to Calculate Age in Google Sheets as of a Specific Date

So far every formula has used TODAY(), which means “age right now”. But forms, school applications and records often ask for the age on a particular date — the age on 31 December, on the first day of school, or on the day someone applied for a job. The fix is simple: replace TODAY() with the date you want.

Type the date with the DATE function:

=DATEDIF(A2, DATE(2025, 12, 31), “Y”)

Or put the reference date in its own cell — say D1 — and point at it:

=DATEDIF(A2, $D$1, “Y”)

The dollar signs lock the reference to D1, so you can copy the formula down a whole column and every row still reads the same as-of date. Change D1 once, and every age in the sheet updates.

Worked example: someone born on 20 August 1995 was 30 years, 4 months and 11 days old on 31 December 2025 — 11,091 days in total. The three-part version is =DATEDIF(A2, DATE(2025, 12, 31), “Y”) for 30, “YM” for 4 and “MD” for 11. The same trick answers “how old was I when…” questions — put the event date in D1 and read off the age. Our chronological age examples post works the same idea through school cutoffs, sports age groups and legal birthdays.

A Whole Column at Once with ARRAYFORMULA

Typing a formula in every row works, but it breaks the moment someone adds a new row and forgets to copy the formula down. ARRAYFORMULA fixes that: one formula in the top cell of the column calculates the age for every row, including rows added later.

If the birth dates are in B2:B, put this in C2:

=ARRAYFORMULA(IF(LEN(B2:B), DATEDIF(B2:B, TODAY(), “Y”), “”))

The IF(LEN(…)) part keeps blank rows blank, and DATEDIF inside ARRAYFORMULA handles a whole range at once. New birth dates pasted into column B get their ages instantly, with nothing to drag down.

The same pattern combines with the as-of-date trick from the previous section — the combination no competing guide puts together. With the reference date in D1, one formula ages the whole list as of that date:

=ARRAYFORMULA(IF(LEN(B2:B), DATEDIF(B2:B, $D$1, “Y”), “”))

That single formula is the fastest way to handle a whole list when you work out how to calculate age in Google Sheets: a class register, an employee list or a customer file, all aged as of one chosen date, with new rows filling themselves in.

The 29 February Problem

The leap-day quirk is the part most guides to how to calculate age in Google Sheets skip entirely — and it is the one that produces wrong answers. Someone born on 29 February has no birthday in three years out of four, so Sheets has to decide when their age ticks over.

In Google Sheets, DATEDIF treats the anniversary of a 29 February birthday as 1 March in non-leap years. Take someone born on 29 February 2000:

As of dateDATEDIF “Y” resultWhy
28 February 202625The anniversary (1 March) has not arrived yet
1 March 202626The anniversary has arrived
7 November 202626 years, 8 months, 6 days8 months and 6 days past 1 March 2026

So on 28 February 2026 that person is still 25 in Sheets, and turns 26 on 1 March. If your organisation counts 29 February birthdays on 28 February instead, the formula will disagree by one day around the birthday, every non-leap year — there is no setting to change it. The legal side is a separate question, and it varies by country: our leap year birthday age post covers the 28 February versus 1 March rule by jurisdiction, including when leaplings legally turn 18 and 21.

Fixing the Errors: #NUM!, #VALUE! and Text Dates

Most errors you meet while learning how to calculate age in Google Sheets come from the dates, not the formula. There are only three common ones, and each has a clear fix:

ErrorCauseFix
#NUM!The birth date is after the end date — a future birth date, or the dates are the wrong way roundCheck the date, or guard it: =IF(A2 > TODAY(), “Check date”, DATEDIF(A2, TODAY(), “Y”))
#VALUE!The “date” is actually text — Sheets cannot calculate with itConvert it: =DATEDIF(DATEVALUE(A2), TODAY(), “Y”)
#VALUE! (blank rows)DATEDIF has nothing to calculateWrap it: =IF(A2 = “”, “”, DATEDIF(A2, TODAY(), “Y”))

The text-date problem is the most common, and it is easy to miss: a date that looks right can still be text. Dates pasted from a website or PDF often arrive as text, as do dates typed in a format the sheet’s locale does not expect — 04/05/2026 means 4 May in a UK-locale sheet and April 5 in a US-locale sheet. The tell-tale sign is alignment: real dates sit on the right of the cell, text on the left. Select the column and use Format > Number > Date; if the values stay left-aligned, they are text, and DATEVALUE converts them — provided the text matches a format Sheets recognises. If DATEVALUE still fails, rebuild the date with =DATE(year, month, day).

For a sheet other people will edit, wrap the whole thing in IFERROR so one bad row never breaks the column:

=IFERROR(DATEDIF(A2, TODAY(), “Y”), “Check date”)

That returns the age when the date is valid and the words “Check date” when it is not. The weakest competing guide covers only the future-date check and the Format menu; it never mentions DATEVALUE, the locale trap, or IFERROR, which is why bad dates keep breaking people’s sheets.

Copy-Paste Template

This template puts everything about how to calculate age in Google Sheets into one sheet you can reuse. Set it up once, then paste in any list of birth dates.

ColumnHeaderFormula (row 2, copy down — or use the ARRAYFORMULA version)
AName—
BDate of birth—
CAge (years)=DATEDIF(B2, TODAY(), “Y”)
DAge in full=DATEDIF(B2, TODAY(), “Y”) & ” years, ” & DATEDIF(B2, TODAY(), “YM”) & ” months, ” & DATEDIF(B2, TODAY(), “MD”) & ” days”
EAge in days=DATEDIF(B2, TODAY(), “D”)

For a sheet that fills itself in, replace the column C formula with this single formula in C2 and delete everything below it:

=ARRAYFORMULA(IF(LEN(B2:B), DATEDIF(B2:B, TODAY(), “Y”), “”))

And if you need every age as of one fixed date — a school cutoff, an application deadline — put that date in a cell, say G1, and use:

=ARRAYFORMULA(IF(LEN(B2:B), DATEDIF(B2:B, $G$1, “Y”), “”))

Check it works: paste 15 June 1990 into B2 and 3 March 1988 into B3. Column C should read 36 and 38, column D “36 years, 4 months, 23 days” and “38 years, 8 months, 4 days”, column E 13,294 and 14,128. If any number differs, check the birth dates first — they are almost always the problem.

Which Method Should You Use?

If you only need whole years, DATEDIF is the simplest answer to how to calculate age in Google Sheets. The other methods each have their place:

MethodFormulaBest forWatch out for
DATEDIF “Y”=DATEDIF(A2, TODAY(), “Y”)Whole years; exact years-months-daysUndocumented — no autocomplete
YEARFRAC + INT=INT(YEARFRAC(A2, TODAY(), 1))Decimal age; easy to rememberDefault basis 0 can be a day out — pass 1
YEAR subtraction=YEAR(TODAY()) – YEAR(A2)Quick rough estimateWrong before the birthday — up to a year out
Manual / calculatorOur chronological age calculatorOne-off ages, no spreadsheetNot for lists
Excel DATEDIFSame syntax in ExcelMoving a sheet between Excel and SheetsExcel’s MD quirk matches Sheets’ — same caution

DATEDIF uses the same syntax in Excel, so these formulas move across unchanged — our how to calculate age in Excel post covers the Excel side. For anything that is not a spreadsheet job — two dates and one answer — the age difference calculator and date duration calculator do it in one click, and the birthday countdown tells you how many days until the next birthday.

Conclusion

That is how to calculate age in Google Sheets, end to end: DATEDIF for whole years and for the full years-months-days breakdown, YEARFRAC when you want the decimal age, a reference cell when the age has to be as of a specific date, and one ARRAYFORMULA when the list is a whole column. Remember the three things that trip people up: DATEDIF is undocumented so type it in full, a 29 February birthday ticks over on 1 March in non-leap years, and a date that looks right can still be text — DATEVALUE fixes that. Set up the template once, check it against the worked examples, and your sheet will keep every age correct by itself.

Why doesn’t DATEDIF appear in the formula autocomplete?

DATEDIF is a legacy, undocumented function in Google Sheets — Google never added it to the autocomplete list or the in-sheet help, even though it works correctly. You have to type the full name, =DATEDIF(, yourself. It is documented in Google’s official function list, and it is the same function Excel has carried for years.

How do I work out someone’s age on a past or future date instead of today?

Replace TODAY() with the date you want, either typed with the DATE function — =DATEDIF(A2, DATE(2025, 12, 31), “Y”) — or held in a cell, =DATEDIF(A2, $D$1, “Y”). For example, someone born on 20 August 1995 was 30 years, 4 months and 11 days old on 31 December 2025.

Can I calculate the age for a whole column without dragging the formula down?

Yes — put this single formula in the top cell of the age column: =ARRAYFORMULA(IF(LEN(B2:B), DATEDIF(B2:B, TODAY(), “Y”), “”)). It fills every row that has a birth date, leaves blank rows blank, and ages new rows automatically when birth dates are added.

What does the #NUM! error mean in DATEDIF?

It means the start date is later than the end date — almost always a birth date typed in the future, or the two dates the wrong way round. Check the birth date, or guard the formula with =IF(A2 > TODAY(), “Check date”, DATEDIF(A2, TODAY(), “Y”)).

My birth dates look right but the formula shows #VALUE! — what is wrong?

The “dates” are text, not real dates — common with dates pasted from a website or PDF, or typed in a format your sheet’s locale does not expect. Real dates align right in the cell; text aligns left. Convert them with =DATEDIF(DATEVALUE(A2), TODAY(), “Y”), or rebuild them with =DATE(year, month, day).

How do I handle someone born on 29 February?

In Google Sheets, DATEDIF treats the anniversary of a 29 February birthday as 1 March in non-leap years. Someone born on 29 February 2000 is still 25 on 28 February 2026 and turns 26 on 1 March 2026. If your organisation counts the birthday on 28 February instead, the sheet will disagree by one day around the birthday — there is no setting to change it, so note which rule you are using.

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *