Google Sheets Formula for Age: Calculate Birthdate to Today
In this article
To calculate a person's age in Google Sheets, use the DATEDIF function with the birthdate and today's date. This returns the exact number of full years between two dates, ignoring partial years. No add-ons or manual math are needed — just a date in a cell and a simple formula.
What You'll Need
- A Google Sheets document with access to edit
- A column containing valid birthdates in a recognized date format (e.g., 1985-06-15 or June 15, 1985)
- Access to the internet to use Google Sheets online (not supported offline without sync)
Step-by-Step
- Open your Google Sheets document and ensure the birthdates are entered in a single column, such as column B. Each cell should contain only a date — no text, symbols, or extra spaces. For example, cell B2 might contain
1990-03-22. - Click on the cell where you want the calculated age to appear, such as C2. This will be your output cell.
- Type the formula:
=DATEDIF(B2,TODAY(),"Y"). Make sure the cell reference (B2) matches the location of the birthdate you’re calculating for. - Press Enter. The cell will now display the person’s age as a whole number — for example, 34 if born in 1990 and today is 2024.
- To apply this formula to multiple rows, click on the cell with the formula (C2), then hover over the bottom-right corner until the cursor turns into a small cross (+). Click and drag down to fill the formula into cells C3, C4, etc. Google Sheets will automatically adjust the row reference (B3, B4, etc.).
- Verify the results by checking a few entries manually. For example, if someone was born on January 1, 2000, and today is March 15, 2024, the formula should return 24, not 25, because they haven’t reached their 25th birthday yet.
- If your birthdates are in a different column, adjust the formula accordingly. For example, if birthdates are in column A, use
=DATEDIF(A2,TODAY(),"Y").
Common Mistakes
- Using
TODAY()incorrectly — don’t put it in quotes or add extra parentheses. It must be written asTODAY()with no spaces inside. - Typing the date manually inside the formula instead of referencing a cell. Never write
=DATEDIF("1990-03-22",TODAY(),"Y")— this is error-prone and won’t update automatically if the date changes. - Using the wrong unit code.
"Y"gives full years. If you use"M", it returns months;"D"returns days. Using the wrong letter gives misleading results. - Entering text instead of a date. If a cell contains "March 15, 1985" as plain text (not formatted as a date), the formula will return an error. Check that the cell is formatted as a date by selecting it and choosing Format > Number > Date from the menu.
- Forgetting to drag the formula down. After entering it once, the formula only applies to one row. You must drag or copy it to other rows to calculate all ages.
Tips
- Use
=DATEDIF(B2,TODAY(),"Y")for standard age calculations. It’s the most reliable and widely supported method in Google Sheets. - If you want to show both years and months, use two formulas:
=DATEDIF(B2,TODAY(),"Y")for years and=DATEDIF(B2,TODAY(),"YM")for months since the last birthday. Combine them with=DATEDIF(B2,TODAY(),"Y")&" years, "&DATEDIF(B2,TODAY(),"YM")&" months"to display "34 years, 2 months". - Format the birthdate column as Date (Format > Number > Date) to prevent input errors. This ensures Google Sheets interprets the entry as a date, not text.
- Use conditional formatting to highlight ages over 65 or under 18. Select the age column, click Format > Conditional formatting, then set rules like "Greater than 65" and choose a color.
- For birthdays that haven’t occurred yet this year, DATEDIF automatically handles leap years and varying month lengths — no extra code needed.
- Always test the formula with a known date. For example, if someone was born today, the formula should return 0. If it returns 1, you likely have a date format or time zone issue.
Troubleshooting
- Error: #VALUE! — This means the birthdate cell isn’t a valid date. Check that it’s formatted as a date and contains no letters or symbols. Try retyping the date manually in the cell.
- Error: #NUM! — This occurs when the birthdate is later than today’s date. Double-check that the birthdate is not in the future. If it’s intentional (e.g., for a projected age), use a fixed future date instead of TODAY().
- Formula returns 0 when it shouldn’t — Verify the date format. If the date is written as "15/03/1990" but your region uses MM/DD/YYYY, Google Sheets may interpret it as March 15, 1990, or as an invalid date. Adjust the regional settings in File > Settings > Locale if needed.
- Formula doesn’t update — Make sure automatic calculation is enabled: go to File > Settings > Calculation and confirm "On change" is selected. If you’re using a mobile device, try pulling down to refresh the sheet.
- Age is off by one year — This usually means the birthdate is entered as midnight on the day before the actual birthday. Check for hidden time values. Select the date cell, then Format > Number > Date time to see if a time is included. If so, use
=DATEDIF(INT(B2),TODAY(),"Y")to remove any time component. - Formula works for some rows but not others — Check for inconsistent data. One cell may contain text like "N/A" or "Unknown". Filter the column to find and correct non-date entries.
Frequently Asked Questions
Can I calculate age without using TODAY()?
Yes. Replace TODAY() with a specific date, like=DATEDIF(B2,"2025-01-01","Y") to calculate age as of January 1, 2025. This is useful for historical or projected age calculations.
Does this work with dates from other countries?
Yes, as long as Google Sheets recognizes the format. Dates like 15/06/1990 (DD/MM/YYYY) work if your sheet’s locale is set to a region that uses that format. If not, use ISO format (YYYY-MM-DD) to avoid ambiguity.What if the birthdate cell is blank?
If the cell is empty, the formula returns 0. To avoid that, wrap it in an IF statement:=IF(B2="","",DATEDIF(B2,TODAY(),"Y")) to leave the result blank when no birthdate is given.
Can I calculate age in months or days instead of years?
Yes. Use=DATEDIF(B2,TODAY(),"M") for full months or =DATEDIF(B2,TODAY(),"D") for total days. For months since the last birthday, use "YM".