Notion Formulas
A formula property calculates a new value from other properties in the same entry. It works like a calculator built into your database. Formulas update automatically whenever the source data changes.
Why Use Formulas
Manual calculations take time and invite errors. A formula performs the same calculation instantly across every entry. This keeps numbers consistent throughout the database and removes human error from repetitive math.
Formula Result Example
| Price | Quantity | Formula: Total |
|---|---|---|
| 200 | 3 | 600 |
| 150 | 2 | 300 |
Creating a Formula Property
Add a new property and select Formula as the type. Open the formula editor to write your calculation. Reference other properties by clicking their names inside the editor rather than typing them out by hand.
Basic Formula Operations
| Operation | Symbol | Example |
|---|---|---|
| Addition | + | prop("Price") + prop("Tax") |
| Subtraction | - | prop("Total") - prop("Paid") |
| Multiplication | * | prop("Price") * prop("Quantity") |
| Division | / | prop("Total") / prop("Count") |
Formulas with Dates
Formulas can calculate the number of days between two dates. This helps track how long a task has been open. Subtracting a start date from an end date returns the duration automatically, saving anyone from counting days on a calendar.
Formulas with Conditions
The if function returns different results based on a condition. A common use marks a task as Overdue when the due date has passed. The formula checks the condition and displays text or a value accordingly.
Condition Example
| Condition | Result if True | Result if False |
|---|---|---|
| Due Date is before today | Overdue | On Track |
Combining Multiple Conditions
Nested if statements let a formula check several conditions in sequence. A task tracker might check whether a task is Done first, then Overdue, then default to On Track. This layered logic mirrors how a person would judge a task's real status by eye.
Layered Status Logic
| Check Order | Condition | Result |
|---|---|---|
| 1 | Status equals Done | Complete |
| 2 | Due Date before today | Overdue |
| 3 | Neither condition matches | On Track |
Text Formulas
Formulas are not limited to numbers. The concat function joins text from different properties into one combined string. This helps build a formatted summary line, such as combining a client's name and project title into one label.
Starting Simple
Begin with basic math formulas before trying conditions or nested functions. Test each formula on a few entries to confirm the output. Build complexity gradually as your comfort grows, checking each step before adding the next layer.
