What Are Notion Formulas and Why Should You Care?
Notion formulas are the secret weapon that turns a simple database into an intelligent, automated system. With formulas, you can calculate progress percentages, generate dynamic status labels, perform date math, combine text from multiple properties, and create conditional logic — all without writing a single line of traditional code.
Think of formulas as spreadsheet functions on steroids. If you have ever used Excel or Google Sheets formulas, you already understand the concept. Notion formulas take this idea and apply it to your databases, making every row capable of dynamic, context-aware calculations.
Formula Basics: Your First Formula
To create a formula in Notion, add a Formula property to any database. Click on a cell in that column, and the formula editor will open. Notion Formulas 2.0 (released in 2023) introduced a much-improved editor with multi-line support, syntax highlighting, and autocomplete.
Here is the simplest possible formula — adding two numbers:
prop("Number 1") + prop("Number 2")This formula takes the value from the "Number 1" property, adds it to the value from "Number 2", and displays the result. Every formula starts with one or more property references, then applies functions and operators to transform the data.
Commonly used property references include:
prop("Property Name")— References any property in the same database- Current date:
now()— Returns the current date and time - Pi:
pi()— Returns 3.14159... - Euler's number:
e()— Returns 2.71828...
Operators: The Building Blocks of Logic
Notion formulas support all standard operators you would expect:
| Operator | Description | Example |
|---|---|---|
+ | Addition (numbers) or concatenation (text) | 5 + 3 = 8 |
- | Subtraction | 10 - 4 = 6 |
* | Multiplication | 3 * 4 = 12 |
/ | Division | 10 / 3 = 3.333 |
% | Modulo (remainder) | 10 % 3 = 1 |
== | Equal to | 5 == 5 = true |
!= | Not equal to | 5 != 3 = true |
> < | Greater than / Less than | 5 > 3 = true |
>= <= | Greater/less than or equal | 5 >= 5 = true |
and | Logical AND | true and true = true |
or | Logical OR | true or false = true |
not | Logical NOT | not true = false |
Conditional Logic with If Statements
The if() function is the most versatile and commonly used formula function. It lets your database make decisions based on data:
if(condition, value_if_true, value_if_false)Here is a practical example — automatically labeling task priority:
if(prop("Priority") >= 4, "🔥 High Priority", "Normal")You can nest multiple if statements for more complex conditions:
if(prop("Progress") == 100, "✅ Complete", if(prop("Progress") > 0, "🔄 In Progress", "⏳ Not Started"))This formula checks progress and returns the appropriate status emoji and label. Nested ifs can go several levels deep, though if you find yourself nesting more than 3-4 levels, consider using the ifs() function instead for cleaner syntax.
Working with Text
Text manipulation is where Notion formulas become truly powerful for organizing information. Here are the most useful text functions:
concat(text1, text2, ...)— Combines multiple text strings into one. You can also use+for concatenation.format(value)— Converts any value (number, date, boolean) to text format for display.length(text)— Returns the number of characters in a text string.contains(text, search)— Returns true if the text contains the search string.replace(text, old, new)— Replaces all occurrences of a substring.slice(text, start, end)— Extracts a portion of the text.
Practical example — combining first and last name from separate properties:
prop("First Name") + " " + prop("Last Name")Date and Time Formulas
Date formulas help you calculate deadlines, track durations, and manage schedules automatically:
now()— Current date and timedateAdd(date, amount, unit)— Add time to a date ("days", "weeks", "months", "years")dateSubtract(date, amount, unit)— Subtract time from a datedateBetween(date1, date2, unit)— Calculate the difference between two datesformatDate(date, format)— Format a date as text with custom patterns
Calculate days until a deadline:
dateBetween(prop("Deadline"), now(), "days")Show "Overdue" if the deadline has passed:
if(dateBetween(prop("Deadline"), now(), "days") < 0, "⚠ Overdue", "On Track")Number Functions for Calculations
For more advanced mathematical operations, Notion provides these functions:
round(number)— Rounds to the nearest integerfloor(number)— Rounds down to the nearest integerceil(number)— Rounds up to the nearest integerabs(number)— Absolute value (removes negative sign)min(a, b, ...)— Returns the smallest valuemax(a, b, ...)— Returns the largest valuetoNumber(text)— Converts text to a number
Practical Formula Examples You Can Copy
Progress Bar
Create a visual progress bar using emoji characters:
slice("██████████", 0, floor(prop("Progress") / 10)) + slice("░░░░░░░░░░", 0, 10 - floor(prop("Progress") / 10)) + " " + format(prop("Progress")) + "%"Days Since Created
dateBetween(now(), prop("Created"), "days") + " days ago"Automatic Status Based on Multiple Conditions
ifs(prop("Progress") == 100, "✅ Done", prop("Progress") >= 50, "🟡 In Review", prop("Progress") > 0, "🔵 Started", prop("Deadline") < now(), "🔴 Overdue", "⚪ Not Started")dateBetween() rather than direct comparison operators. Direct date comparison can produce unexpected results due to timezone handling.Debugging Formulas: What to Do When Things Go Wrong
Formula errors happen. Here is how to handle the most common issues:
- Type Mismatch: You are trying to add a number to a text property. Use
format()on the number ortoNumber()on the text. - Empty Properties: If a property is empty, your formula might break. Use
if(empty(prop("X")), "default", prop("X"))to handle empty values gracefully. - Nested If Confusion: If your nested if statements are getting complex, switch to
ifs()which checks conditions in order and returns the first match. - Date Timezones:
now()uses UTC. If dates seem off by a day, this is likely the cause.
Formulas are a deep topic, but the key to mastery is practice. Start with simple formulas and gradually add complexity. Before you know it, you will be building automated systems that save you hours every week.