Skip to main content

๐Ÿงฎ 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.

graph LR A["๐Ÿ“„ A row
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:

TypeWhat it isExamples
Text (string)Letters and words, in quotes"Overdue", "Hello"
NumberAny number3, 0.5, -12
BooleanA yes/no (checkbox) valuetrue, false
DateA moment in timenow(), a Due property
List (array)Several values togethera relation's related rows
PersonA Notion useran 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:

OperatorMeaningExample
+ - * /Arithmetic (and + joins text)prop("Hours") * 60
== !=Equals / not equalsprop("Status") == "Done"
< > <= >=Comparisons (great for dates & numbers)prop("Due") < now()
and or notCombine booleansprop("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:

FunctionWhat it doesTiny example
if(cond, a, b)Pick a or b based on a conditionif(prop("Done"), "โœ…", "โฌœ")
format(x)Turn any value into textformat(prop("Count"))
length(text)How many characters in some textprop("Task").length()
contains(text, "x")Does the text include "x"? (true/false)prop("Task").contains("call")
now() / today()The current date-time / start of todayprop("Due") < now()
dateBetween(a, b, "days")How many days/months between two datesdateBetween(prop("Due"), now(), "days")
formatDate(date, "MMM D")Show a date your wayformatDate(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):

  1. (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. (2 min) Add a new property; choose type Formula. Name it "Status label" (or "Overdue?").
  3. (8 min) Click Edit formula and type the recipe below. Use autocomplete to insert prop("Due") and now() rather than typing them by hand.
  4. (4 min) Watch the result column: past-due unfinished rows should read "โš ๏ธ Overdue", finished rows "Done", the rest "๐ŸŸข On track".
  5. (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 if to 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 for ifs when 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 dot x.fn() styles are equivalent; dot style chains nicely.
  • if chooses between two answers; ifs handles 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. ๐Ÿงฎ