Notion formulas can perform calculations on your existing database properties and help give you better understanding of your data.
To start writing a formula, add a formula property to your Notion database:
•••menu on your database
+ Add a property
Editand begin writing your formula
Writing a formula
We've recently updated our formula language! Your existing formulas will be automatically migrated for this update and should behave the same.
For more information, check out our guide:
Notion’s formula syntax might look familiar if you’ve done any programming before! You’ll choose functions (which accomplish different tasks) and inputs (data to manipulate). An output (the result) will be computed and displayed in the new formula property for every row in your database.
For example, in this formula:
dateSubtract(prop("Date"), 14, "days")
The function is
dateSubtract()takes in a date, number, and then a unit text, which can be
The inputs are
"days"(unit of time).
The output will be a date representing 14 days before your
Notion’s formula editor contains several helper features to assist in writing formulas.
The editor automatically provides suggestions of functions or properties based on what's in your formula.
You can navigate this suggestions panel with
downarrows and use
Enterto accept a suggestion.
Long formulas will wrap once you’ve exceeded the width of the editor, but you can also use
Enterto create a new line!
To navigate between lines, you can use
alt/option + up/down.
If you open the formula editor from a database row, you'll see a live preview of the result of the formula for that row.
Note that the result preview will not display line breaks, which can be added using
"\n"in the formula, e.g.
"Hello" + "\n" + "World"
The editor will display errors and highlight the erroneous code, so you can better identify the source of issues.
Formulas can manipulate and return different data types. Other property types are supported but their data type will be converted.
Can be displayed using the formatting options of the Formula property (e.g. as a percentage, currency, or with a ring or bar).
Displays as a date with time (like August 29, 2023 1:33 PM) and can be reformatted to text using the
Dates can be date ranges, which can be constructed using the
Dates cannot store seconds or milliseconds.
You can use
email()to retrieve data off any People types.
Displays as people’s names with their photos.
Displays as a filled or unfilled checkbox.
Represents Notion pages, like relations.
You can retrieve the properties of a given Notion page by using
Displays as a rich page link with the page's icon.
Lists (a.k.a. “arrays”)
Lists can hold items of any type, including more lists.
You can use list functions like
map()to manipulate lists.
List items display comma-separated for texts, numbers, and dates. For people, checkboxes, and pages, they display space-separated.