Formula syntax & functions

Notion formulas can operate on various properties and functions. Here, you'll find a list of them ➗

Looking for Notion formula basics? Check out this article →
If you have a formula that doesn't seem to work, learn about common formula errors and how to troubleshoot them in this article →

Know what you want your formula to do, but not sure how to build it? You can use Notion AI to create and edit formulas. Learn more here →
Notion formulas can operate using various properties and functions. Here, you'll find a list of them!
Formulas support almost all property types. Note that formula types are different from property types.
Property Types | Examples | Formula Type |
---|---|---|
Title |
| Text |
Text |
| Text |
Select |
| Text |
Multi-Select |
| Text (list) |
Checkbox |
| Boolean |
Email, URL, Phone Number |
| Text |
Unique ID |
| Text |
Created By, |
| Person |
Person |
| Person (list) |
Date, |
| Date |
Number |
| Number |
Relation |
| Page (list) |
Rollup |
| Number, date, or list of any type. Depends on rollup configuration. |
Built-ins are specific symbols and values that are built into the language to help designate a calculation.
Built-in | Example |
---|---|
Math operators: |
|
Boolean values: |
|
Comparison operators: |
|
Logical operators: |
|
Ternary operator: |
|
Notion formulas support the following functions.
Name | Description | Example |
---|---|---|
if | Returns the first value if the condition is true; otherwise, returns the second value. |
|
ifs | Returns the value that corresponds to the first true condition. This can be used as an alternative to multiple nested if() statements. |
|
empty | Returns true if the value is empty. 0, “”, and [] are considered empty. |
|
length | Returns the length of the text or list value. |
|
substring | Returns the substring of the text from the start index (inclusive) to the end index (optional and exclusive). |
|
contains | Returns true if the search string is present in the value. |
|
test | Returns true if the value matches the regular expression and false otherwise. |
|
match | Returns all matches of the regular expression as a list. |
|
replace | Replaces the first match of the regular expression with the replacement value. |
|
replaceAll | Replaces all matches of the regular expression with the replacement value. |
|
lower | Converts the text to lowercase. |
|
upper | Converts the text to uppercase. |
|
repeat | Repeats the text a given number of times. |
|
link | Creates a hyperlink from the label text and the URL. |
|
style | Adds styles and colors to the text. Valid formatting styles: |
|
unstyle | Removes formatting styles from the text. If no styles are specified, all styles are removed. |
|
format | Returns the value formatted as text. |
|
add | Returns the sum of two numbers. |
|
subtract | Returns the difference of two numbers. |
|
multiply | Returns the product of two numbers. |
|
mod | Returns the first number modulo the second number. |
|
pow | Returns the result of a base number raised to an exponent power. |
|
divide | Returns the quotient of two numbers. |
|
min | Returns the smallest number of the arguments. |
|
max | Returns the largest number of the arguments. |
|
sum | Returns the sum of its arguments. |
|
median | Returns the middle value of its arguments. |
|
mean | Returns the arithmetic average of its arguments. |
|
abs | Returns the absolute value of the number. |
|
round | Returns the value of a number rounded to the nearest integer. Supports one or two arguments. In the two-argument case, the first represents the value and the second represents the number of decimal places to round to. |
|
ceil | Returns the smallest integer greater than or equal to the number. |
|
floor | Returns the largest integer less than or equal to the number. |
|
sqrt | Returns the positive square root of the number. |
|
cbrt | Returns the cube root of the number. |
|
exp | Returns e^x, where x is the argument, and e is Euler's number (2.718…), the base of the natural logarithm. |
|
ln | Returns the natural logarithm of the number. |
|
log10 | Returns the base 10 logarithm of the number. |
|
log2 | Returns the base 2 logarithm of the number. |
|