What is a Notion Formula?
In a Notion database, you can add a formula property that lets you run calculations and functions based on the data in other properties.
What Can a Formula Be Used For?
Notion formulas are a powerful way of aggregating data, allowing you to pull in information from related pages and other properties. This means the possibilities are endless, especially when coupled with Notion's selection of view types — display your formula results in a simple table all the way through to an interactive chart.
The Formula Editor
Notion's formula editor has been drastically improved with the release of Formulas 2.0. For a rundown of its features, see The Editor section.
Data Types
Notion formulas are able to accept and output many different types of data. Read more about them in the Data Types section.
- String: commonly referred to as simply "text", these are your standard letters, numbers, symbols, and whitespace characters.
- Number: your regular garden variety numbers, used for calculations.
- Boolean: commonly referred to as "true/false" or "checkboxes", think of them as a checked (
true
) or unchecked (false
) box. - Date: a date data type represents a single moment in time.
- List: lists are a new addition to Notion formulas, and are commonly referred to as "arrays" in other programming languages. They can consist of all the other data types, including other lists!
- Person: a person represents a Notion user, like those found in Person properties.
- Page: a related page, like those found in Relation properties.
Formula Elements
This refers to the functions, operators, and other items that are available within a formula to manipulate the data above.
- Functions: A function is a set of statements that performs a task or calculates a value. They allow you to manipulate different types of data in Notion, from text and numbers to lists and pages.
- Operators: Operators are single or double characters that represent simplified versions of their function alternatives.
- Booleans: Boolean values are simply the
true
and false
values. - Variables: Variables are built-in values related to an item in a list.
Dot Syntax
Notion's 2.0 formula language includes two syntaxes for writing formulas — the original way from v1.0, and a new dot variation.
It really comes down to personal preference, but keep in mind the following functions do not have a dot syntax alternative as they all return a constant value.
Companion Resource
To view the Notion-based companion pages for this resource, visit notion.cool/formulas — these will also be linked from their related pages here too!