๐งฎ Lesson 4.1: Formulas 2.0: Thinking in Formulas
"Formula" sounds like math class, but a Notion formula is just a small instruction that looks at a row and gives back one value โ a word, a number, a yes/no. In this lesson we go slowly, one idea at a time, until formulas feel less like coding and more like writing a sentence Notion can read.
๐ What You'll Learn
By the end of this lesson, you will be able to:
- Understand the core idea: a formula is an expression that returns one value
- Name Notion's formula data types (text, number, boolean, date, list, person)
- Reference other properties with
prop("Name") - Read and write the dot / function style like
prop("Done").if(...) - Use if / ifs,
format(), and a few everyday functions (length,contains,dateBetween,now,empty)
โฑ๏ธ Estimated Time: 60 minutes
๐ฏ Project: Add one friendly formula to your Tasks database โ an "Overdue?" flag or a plain-English status label computed from the Due date.
In This Lesson
What a Formula Really Is
A formula in Notion is a property type, like text or date. But instead of you typing a value, you write a little instruction and Notion computes the value for every row โ freshly, every time something changes. That's the whole idea:
A formula is an expression that looks at the current row and returns exactly one value.
"Expression" just means "something that works out to a value." 2 + 2 is an expression (it
returns 4). "Hello " + "world" is an expression (it returns "Hello
world"). And prop("Due") < now() is an expression that returns true or
false depending on whether the row's Due date is in the past. Everything you write in a Notion
formula is one big expression that boils down to a single answer.
Due = Oct 10
Done = false"] --> B["๐งฎ Formula
prop('Due') is before now()
and Done is false"] B --> C["โ ๏ธ Returns: Overdue"] C --> D["๐ Shown in your
table & used in views"]
๐ง Mindset
If code makes you nervous, breathe. You are not becoming a programmer today. A formula is a sentence that ends in an answer, and we'll build them one small piece at a time. You'll copy far more formulas than you'll ever write from scratch โ and that's not cheating, it's exactly how everyone uses them. Understanding the shape is the goal; memorizing is not.
๐ก "Formulas 2.0"
Notion rebuilt its formula engine into what's called Formulas 2.0. The big wins: one unified way to write things (the dot style you'll meet below), the ability to work with lists of values (great with relations), nicer date handling, and inline autocomplete that shows you what each function does as you type. If you find an old tutorial with a different style, it's probably from Formulas 1.0 โ the ideas here are the current ones.
Data Types: The Kinds of Values
Every value in a formula is one of a few types. Knowing the type matters because functions expect certain types โ you can't add two dates the way you add two numbers. The everyday types:
| Type | What it is | Examples |
|---|---|---|
| Text (string) | Letters and words, in quotes | "Overdue", "Hello" |
| Number | Any number | 3, 0.5, -12 |
| Boolean | A yes/no (checkbox) value | true, false |
| Date | A moment in time | now(), a Due property |
| List (array) | Several values together | a relation's related rows |
| Person | A Notion user | an Assignee property |
The formula editor tells you the type of your result at the bottom as you type โ a quiet, friendly way to catch mistakes. If you expected a number and it says "Text," something upstream is the wrong type.
โ ๏ธ The most common beginner error
Mixing types. "5" + 5 is text-plus-number and Notion complains. Wrap a number as text
with format() when you want to glue it onto words: "You have " +
format(prop("Count")) + " tasks". When a formula shows a red error, 9 times out of 10 it's a
type mismatch โ check what type each piece is.
Referring to Properties with prop()
A formula becomes useful the moment it can look at the row's other properties. You do that with
prop() โ you pass it the property's name, exactly as spelled, in quotes:
prop("Due") โ this row's Due date
prop("Done") โ this row's Done checkbox (true/false)
prop("Task") โ this row's Task title (text)
prop("Priority") โ this row's Priority value
Think of prop("Name") as "the value in this row's Name column." Because a formula
runs per row, prop("Due") means a different date on every row โ always the current row's.
๐ก Let the editor do the typing
You rarely type prop("...") by hand. Start typing the property name and Notion's
autocomplete offers it โ pick it and the correct prop("Due") is inserted for you, spelled
right. This also means renaming a property later won't silently break your formula, because Notion
tracks the reference.
The Dot / Function Style
Formulas 2.0 lets you apply a function in two equivalent ways. Meet them both โ you'll see each in tutorials, and they do exactly the same thing:
// classic style: function(thing)
length(prop("Task"))
// dot style: thing.function()
prop("Task").length()
Read the dot style left to right, like a little pipeline: "take the Task, then get its length." It shines when you want to do several steps in a row, because you can chain them:
prop("Task").lower().contains("email")
// take Task โ make it lowercase โ does it contain "email"? โ true/false
Both styles produce the same value; use whichever reads more clearly to you. Many people prefer the dot style for chains and the classic style for one-off calls. There's no wrong choice.
Operators are the tiny built-in functions you already know from math and logic:
| Operator | Meaning | Example |
|---|---|---|
+ - * / | Arithmetic (and + joins text) | prop("Hours") * 60 |
== != | Equals / not equals | prop("Status") == "Done" |
< > <= >= | Comparisons (great for dates & numbers) | prop("Due") < now() |
and or not | Combine booleans | prop("Done") == false and prop("Due") < now() |
Making Decisions with if
The single most useful formula tool is if. It picks between two answers based on a
condition. Read it as: if (this is true) then (give this) else (give that).
if(prop("Done"), "โ
Complete", "โณ In progress")
// condition if true if false
So a row whose Done checkbox is ticked shows "โ Complete"; every other row shows "โณ In progress". Here's the everyday hero of this lesson โ a friendly overdue flag:
if(prop("Done"),
"Done",
if(prop("Due") < now(), "โ ๏ธ Overdue", "๐ข On track"))
That reads: if it's done, say "Done"; otherwise, if the due date is in the past say "โ ๏ธ Overdue", else
"๐ข On track". Notice we nested one if inside another to handle three outcomes.
When you have many outcomes, nesting ifs gets hard to read. ifs is the
cleaner tool โ a list of condition/answer pairs, with a final fallback:
ifs(
prop("Score") >= 90, "A",
prop("Score") >= 80, "B",
prop("Score") >= 70, "C",
"Keep going" // the fallback if nothing above matched
)
โ Read conditions as sentences
Before you trust a formula, say it out loud: "If Done, show Done; otherwise if Due is before now, show Overdue; otherwise On track." If the sentence matches what you want, the formula is right. This habit catches almost every logic slip.
A Few Functions Worth Knowing
You'll build 90% of your formulas from a small handful of functions. Here are the ones to meet today โ just enough to be dangerous, no memorizing required:
| Function | What it does | Tiny example |
|---|---|---|
if(cond, a, b) | Pick a or b based on a condition | if(prop("Done"), "โ
", "โฌ") |
format(x) | Turn any value into text | format(prop("Count")) |
length(text) | How many characters in some text | prop("Task").length() |
contains(text, "x") | Does the text include "x"? (true/false) | prop("Task").contains("call") |
now() / today() | The current date-time / start of today | prop("Due") < now() |
dateBetween(a, b, "days") | How many days/months between two dates | dateBetween(prop("Due"), now(), "days") |
formatDate(date, "MMM D") | Show a date your way | formatDate(prop("Due"), "MMM D") |
empty(x) | Is the value blank? (true/false) | if(empty(prop("Due")), "No date", "Has date") |
A friendly "days until due" using two of them together:
if(empty(prop("Due")),
"No due date",
format(dateBetween(prop("Due"), now(), "days")) + " days left")
If there's no Due date, say so; otherwise compute the day gap and glue it onto the words " days left"
(using format() so the number can join the text).
๐ Going Further (optional)
Not for today โ just so you know it exists. Formulas 2.0 can work with lists (the
related rows from a relation) using map, filter, and find, and
you can name intermediate values with let() to keep long formulas readable. That's the
deep end, and we'll wade in gently next lesson (4.2) with copy-paste recipes. If it looks like a lot,
it is โ and you can build a great workspace without ever touching it.
๐ฏ Project: Your First Formula
Let's add one genuinely useful formula to your Tasks database. Pick whichever appeals โ an Overdue? flag or a friendly status label โ and build it. The formula property is available on the Free plan; no add-on required.
๐๏ธ Add a computed column
Objective: A new formula property on Tasks that reads the Due date (and Done) and shows a helpful label automatically.
Instructions (about 20 minutes):
- (3 min) Open your Tasks database. Confirm it has a Due date property and a Done checkbox (add either if missing). Give a couple of rows past-due and future dates so you can see the formula react.
- (2 min) Add a new property; choose type Formula. Name it "Status label" (or "Overdue?").
- (8 min) Click Edit formula and type the recipe below. Use autocomplete to insert
prop("Due")andnow()rather than typing them by hand. - (4 min) Watch the result column: past-due unfinished rows should read "โ ๏ธ Overdue", finished rows "Done", the rest "๐ข On track".
- (3 min) Tweak one row's Due date and Done checkbox and watch the label update live. That instant recompute is the whole point.
๐ก Hint โ two ready-to-paste recipes
// Option A โ friendly status label
if(prop("Done"),
"Done",
if(empty(prop("Due")),
"No date",
if(prop("Due") < now(), "โ ๏ธ Overdue", "๐ข On track")))
// Option B โ simple Overdue? (shows a warning or nothing)
if(prop("Done"), "",
if(prop("Due") < now(), "โ ๏ธ Overdue", ""))
If the editor shows a red error, check that your property names match exactly (formulas are picky about spelling) and that you closed every parenthesis.
โ Project Completion Checklist
- Your Tasks database has a new Formula property
- The formula references at least one other property with
prop("...") - It uses an
ifto choose between at least two labels - Overdue, on-track, and done rows show different, sensible labels
- Editing a Due date or Done checkbox updates the label instantly
๐ฏ Quick Quiz
Question 1: A Notion formula always returnsโฆ
Question 2: How do you refer to this row's "Due" date inside a formula?
Best Practices for Formulas
โ Do's
- Build in small steps. Get one piece working, check the result, then add the next.
- Use autocomplete for
prop(). It spells names correctly and survives renames. - Read the result type at the bottom of the editor to catch type mismatches early.
- Copy and adapt. Starting from a working formula beats writing from a blank editor.
โ Don'ts
- Don't mix types. Wrap numbers with
format()before joining them to text. - Don't cram everything into one giant nested
ifโ reach forifswhen there are many cases. - Don't try to memorize functions. Understand the shape; look the rest up.
๐ Learning Journal
Keep a learning journal โ for this course, the best place is inside your own Notion. After each lesson, take a few minutes to write down:
- Key concepts you learned
- Techniques that clicked for you
- Questions or confusion points to revisit
- Ideas you want to try
- Your progress and feelings about learning this
โ๏ธ This lesson's prompt: Did "a formula is just a sentence that ends in an answer" change how the idea felt? Write the plain-English sentence for one label you'd love to compute in your own workspace โ then note which prop() and which function you think it would need.
๐ Lesson Summary
๐ Key Takeaways
- A formula is an expression that returns exactly one value per row, recomputed live.
- Values have types: text, number, boolean, date, list, person โ mixing them is the #1 error.
prop("Name")reads another property on the current row; let autocomplete insert it.- The classic
fn(x)and dotx.fn()styles are equivalent; dot style chains nicely. ifchooses between two answers;ifshandles many cases cleanly.- A tiny toolkit โ
if,format,now,dateBetween,empty,containsโ covers most everyday formulas.
๐ What You've Accomplished
You wrote a formula that reads your data and returns a helpful, always-current label โ and you understood why it works, not just where to paste it. That mental model (expression โ one value) is the key that unlocks every formula you'll ever meet.
โ Common Questions at This Stage
Do I need to know how to code to use formulas?
No. Formulas borrow a few coding ideas (functions, if/else), but you'll copy and adapt far more than you write from scratch. If you can read a sentence and swap in your own property names, you can use Notion formulas.
My formula shows a red error โ what do I do?
Read the error text, then check three things: property names spelled exactly (use autocomplete),
every parenthesis closed, and no type mismatch (numbers wrapped with format() before
joining text). Build back up one piece at a time until the error clears.
Are formulas a paid feature?
No โ the formula property is available on the Free plan. Notion AI (which can help write formulas for you) is a separate paid add-on, but the formulas themselves cost nothing to create or use.
๐ญ Looking Ahead
Next up is the fun part: Practical Formula Patterns โ a cookbook of copy-paste recipes for progress bars, days-until-due, auto status labels, conditional ๐ด๐ก๐ข indicators, and more. Bring the formula you built today; you'll add a couple of these recipes to it.
โ Before the Next Lesson
- Keep your new formula property โ we'll build recipes onto the same database
- If you did the Projects + Tasks relation, make sure your "% complete" rollup still works (we'll turn it into a progress bar)
- Write your Learning Journal entry for this lesson
๐ Additional Resources
๐ Encouragement for the Journey
You just wrote code โ a little, friendly kind โ and made Notion think for you. If that felt like a stretch, remember: every formula you'll ever need is the same shape you learned today. Copy boldly, read out loud, and let the editor help. You've got this. ๐งฎ