Intro to formulas

In a Notion database, you can add a formula property that lets you run all kinds of calculations and functions based on other properties. You can use formulas to manipulate existing data and arrive at many other helpful values 🔮
Notion formulas can perform helpful calculations using your existing database properties, built-ins, and functions.
Let’s look at a few different ways to use formulas. If you’re ready to get started building your own, jump to our instructions on creating a formula below →
Example 1: Project management
In this example, we’ll use three formulas to track the progress of projects.

You can explore and play with the formula setups for this example by duplicating this page to your workspace!
Goal | Property name | Formula | Functions and built-ins used |
---|---|---|---|
Set a project’s due date as two weeks after its start date | Due date |
|
|
Mark a project as overdue if the due date has passed and its status is not Mark a project as overdue in bold, red letters if the due date has passed and its status is not | Overdue? |
|
|
Show the number of overdue tasks associated with a project | Tasks remaining |
|
|

Example 2: Project brainstorming
In this example, we’ll use two formulas to brainstorm project ideas, calculate a priority score for each of them, and count the number of upvotes each project receives.
Goal | Property name | Formula |
---|---|---|
Based off of the scores for Reach, Impact, Confidence, and Effort (RICE), calculate a prioritization score | Score (RICE) |
|
When someone clicks the upvote button, count them toward the number of total votes and add their name to the database page | Total votes |
|


(Advanced) Example 3: Task management automation
In this example, we’ll use some formulas in a database automation (another kind of database property) to make it easier to manage projects and tasks as they’re completed by marking a parent task as Done
when all its subtasks are Done
.
Database automations have triggers and actions that are taken based on those triggers. Formulas allow you to define variables that you can then use in your actions.

You can explore and play with the formula setups for this example by duplicating this page to your workspace!
Goal | How to build it | Functions and built-ins used |
---|---|---|
Every time a task is set to | Trigger: When status set to | - |
Define the parent task by finding the first page related to the task that triggered the automation | Action 1: Define Formula: |
Applying the |
If the parent task has subtasks, verify whether all its subtasks have a status of | Action 2: Define Formula: | The ternary operator
|
If all subtasks are | Action 3: Edit Formula: | Again, the ternary operator is used here to see if all subtasks are done. If they are, the automation will set the parent task’s status as |


More formula inspiration
This Notion template calculates the time between two dates with a formula property.
This Notion template uses a formula to count upvotes for different ideas.
You can find even more example formulas here →
In Notion, you can use formulas in a few different ways:
As a database property, which is what this article primarily covers.
In a button action.
In a database button action.
In a database automation action.
To create a formula database property:
Select
•••
at the top of a database →Properties
→New property
.Select
Formula
.Give your property a name if you’d like.
Select
Edit formula
.
Once you’ve created a formula in a database or button, you’ll be able to build and edit that formula in the formula editor, which looks like this:

The field at the top is where you enter and edit your formula. As you write your formula at the top of the editor, the editor will let you know what’s missing, or what the formula expects in order to return a value to you.
The panel on the left side of the edit shows the elements that you can use in the formula — in other words, the properties, built-ins, and functions that are available to you.
The panel on the right side defines formula elements as you hover over them in the left panel. It also gives you examples of how you might use those elements and how they should be structured.
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.

Having trouble with your formula? Learn about common formula errors and how to troubleshoot them in this article →
Formulas can be created using a combination of:
Properties.
Built-ins, or operators and booleans that are used to set up a specific calculation. Some examples include
+
(add),false
, andor
.Functions, or actions that the formula can take to return a certain output. Some examples include
replace
,sum
, andsort
.
A full list of the built-ins and functions that are available in formulas is available here →