You want a Notion formula that automatically calculates a person’s age from their birthdate. Without a formula, you must manually update ages each year or rely on external scripts. Notion’s formula property can compute age using date functions like dateBetween and now. This article explains how to build a reliable age formula that handles leap years and future dates.
Key Takeaways: Building a Birthdate-to-Age Formula in Notion
- dateBetween(prop(“Birthdate”), now(), “years”): Returns the number of full years between the birthdate and today. This is the core of the age calculation.
- Adjusting for birthdays not yet passed this year: Use an
ifstatement to subtract one year when the current date is before the birthday in the current year. - Property type must be Date: The birthdate field must be a Date property, not a text or number field, for the formula to work.
How Notion’s dateBetween Function Works for Age Calculation
Notion’s formula language includes the dateBetween function, which calculates the difference between two dates in a specified unit (years, months, days, etc.). To compute age, you pass the birthdate and the current date (now()) to dateBetween with the unit "years". This returns the number of full calendar years between the two dates. The function counts only complete years, so a person born on December 31, 2000, who is evaluated on January 1, 2024, would return 23 (not 24) because the birthday has not yet occurred in 2024.
The now() function in Notion returns the current date and time. When used in a formula, it updates dynamically each time the database is opened or refreshed. This means the calculated age stays current without manual updates. However, now() is a volatile function, so it may cause the formula to recalculate more often than non-volatile functions. This is acceptable for most use cases.
A common mistake is to use dateBetween with now() and assume it always returns the correct age. The function does account for the month and day, but only when the birthdate is in the past. If the birthdate is in the future, dateBetween returns a negative number. You must handle that edge case. Also, dateBetween uses the system time zone of your Notion workspace, so ages may vary slightly for users in different time zones if the birthdate is near midnight.
Prerequisites for the Age Formula
Before writing the formula, ensure your database has a Date property named Birthdate (or any name you prefer). The property type must be Date, not Text or Number. If you use a text field, the formula will not parse the date. Also, note that Notion formulas cannot modify other properties — they only display computed values. The age will appear in a Formula property column and cannot be edited directly.
Steps to Write the Age Formula in Notion
Follow these steps to create a formula that calculates age from a birthdate property. The formula accounts for whether the birthday has already occurred this year, and it returns a whole number (integer).
- Add a Date property for the birthdate
If you do not already have one, click the + button in the database header. Select Date as the property type. Name it Birthdate. Enter birthdates for your records. - Add a Formula property
Click the + button again. Select Formula as the property type. Name it Age. - Open the formula editor
Click the Age property header, then click Edit property. In the formula field, you will write the expression. - Write the base formula
Paste or type the following formula:dateBetween(now(), prop("Birthdate"), "years")
This returns the number of full years from the birthdate to today. Test it — you should see an integer age for each row with a birthdate. - Handle future birthdates (optional but recommended)
If a birthdate is in the future, the base formula returns a negative number. To show 0 or a custom message, wrap the formula in anifstatement:if(prop("Birthdate") > now(), 0, dateBetween(now(), prop("Birthdate"), "years"))
This returns 0 for future dates and the correct age for past dates. - Test with a sample birthdate
Enter a birthdate like 1990-03-15. The formula should return the age based on today’s date. Check that the age increments correctly when you change the system date (Notion does not allow manual date overrides; you can add a test row with a known past date).
Advanced: Age with Months or Days
If you need to display age in years and months, use a more complex formula. The following expression computes full years and remaining months, returning text like “30 years, 4 months”:
let(
years, dateBetween(now(), prop("Birthdate"), "years"),
months, dateBetween(now(), prop("Birthdate"), "months") - years 12,
years + " years, " + months + " months"
)
This formula uses let to store intermediate values. It calculates the total months between the two dates, then subtracts the months already accounted for by full years. The result is a string, not a number.
Common Mistakes and How to Avoid Them
Formula Returns a Negative Number
A negative age means the birthdate is in the future. The base dateBetween formula does not handle this. Use the if statement shown in Step 5 to return 0 or a blank value. Alternatively, you can return an empty string: if(prop("Birthdate") > now(), "", dateBetween(now(), prop("Birthdate"), "years")).
Formula Shows an Error (Red Text)
A red error message usually indicates a syntax mistake. Check that property names are spelled exactly as they appear in the database (case-sensitive). Ensure you used straight quotes, not curly quotes. If the error persists, remove spaces around parentheses. The formula dateBetween(now(), prop("Birthdate"), "years") should work. If the property is named differently, update the reference inside prop().
Age Does Not Update Automatically
Notion formulas that use now() recalculate when the database is loaded or when any property changes. If the age appears stuck, close and reopen the database page. The formula does not run continuously, but it updates on each page visit. For live dashboards, the age will refresh when you refresh the browser.
Birthdate Property Is Not a Date Type
If you entered birthdates in a Text or Number property, the formula will not work. Change the property type to Date. To do this, open the property settings, click Type, and select Date. Notion will attempt to parse existing text into dates, but it may fail for ambiguous formats. Re-enter the dates in YYYY-MM-DD format for best results.
Notion Date Functions for Age Calculation Compared
| Function | What It Returns | Best Use Case |
|---|---|---|
| dateBetween(now(), prop(“Birthdate”), “years”) | Integer number of full years | Simple age in whole years |
| dateBetween(now(), prop(“Birthdate”), “months”) | Integer number of full months | Age in months for infants or short intervals |
| dateBetween(now(), prop(“Birthdate”), “days”) | Integer number of full days | Precise age in days (e.g., for tracking) |
| Combined formula with let() | String like “30 years, 4 months” | Display age with months for clarity |
You can now build a Notion formula that calculates age from a birthdate property. Start with the basic dateBetween expression and add the if condition to handle future dates. For more precise displays, use the let formula to include months. Remember to keep the birthdate property as a Date type. As an advanced tip, you can combine the age formula with a Rollup property to calculate average age across a group.