12 Feb Everything you need to know about Notion formulas
Our Notion Course Supercharge your Productivity is currently closed for enrollment, but sign up here to be notified when we re-open.
You’ve taken the plunge. After hearing about the buzzy productivity app called Notion, you migrated from Evernote and are excited for this new chapter in note-taking. You’ve mastered the basics of Notion, have set up a GTD to-do list, and even created a Personal Wiki. And as you sit down to write your first If Statement, you expect to see a familiar Excel-like layout and it hits you: Where are the cells? Why don’t these property types align? And why do these formulas look so different?
At first glance, Notion formulas are not as intuitive as their Google Sheets counterparts. In this post we’ll list and explain the formula property type, operators, functions and share common formula examples that you can then use in your own workspaces.
Notion formulas: a reference guide
When you create a new formula, there are four options to choose from: Properties, Constants, Operators and Functions.
- Properties: These are effectively your “variables.”
- Operators: Simple calculations like arithmetic (add/subtract) and logic (true/false).
- Functions: More complex, pre-defined formulas that resemble what you’re used to seeing in Google Sheets or Microsoft Excel.
- Constants: Common constants like pi or e. (You probably won’t use these often.)
For a preview of the raw power formulas can bring to a workflow, check out this video (queued @ 32:56) where we effortlessly create a GTD review function:
Property Types (or Variables)
The first odd thing you’ll notice is that since Notion acts as a database, it doesn’t have variables, you can’t access an individual cell. This makes calculations like financial modeling and local variables (i.e. a variable that applies to just one row) very challenging. In Excel terms, this means that you can only apply formulas to an entire column (a la copy and paste down).
In front of each property, you’ll see an icon denoting its type (number, text, date). This is important because you’ll match this up with functions (which have also have these same icons) to ensure that your calculation is apples-to-apples. For example, the dateBetween function returns a number whereas the dateSubtract returns a date. This is a common source of error.
The different types of functions
If you’re using Notion as a comprehensive productivity system you’ll probably draw from a similar pool of operators and functions.
- Logic and Conditional Operators: If, and, equal, or, not
- Math: min, max, abs, round
- Date: dateAdd, dateBetween, dateSubtract, now
- String: concat, format, contains, slice
Adam Listek kindly aggregated all of Notion’s functions into this massive cheat sheet.
Common formula use cases (that you can copy!)
Basic Math (Fahrenheit to Celsius)
A very simple example on how to use Property Types as variables.
Basic Logic Operators
Using the == operator to compare two numbers and then the equal() formula for two texts (or strings).
Basic If statements
Using a basic If statement to test and show the greater of two numbers.
Nested If statement
Here’s a more advanced nested If statement to convert a text-based tag (Monthly) into a number (30). This forms the basis for a lot of Notion’s task-management capabilities and is a powerful trick to apply across your pages.
Testing if a date is overdue
Another common test (using the = operator) to see if a task is overdue.
Creating a review frequency
This formula is inspired by David Allen’s GTD, combining an if statement, the dateAdd function and now() to test if an action (i.e. calling a friend in your CRM) falls outside the review window.
Combining a number and a string
If you want descriptive text that uses the output of a formula here’s how to use the concat function to display the number of days a task has been overdue. It requires you to convert a number into text (a string) using the format function. The video shows how it can be helpful to “leg into” your formulas as the nesting can make things tricky.
Visual Progress bars
These progress bars compare two numbers (say, 1 and 100) and visually show your progress. They’re beyond the scope of this tutorial, but savvy Notioner Ben Smith has an excellent tutorial.
Still missing: The API
Notion Formulas are powerful in their own right, but a true API integration would be a game changer for formulas. And while there are some Notion integrations, may folks still pick Airtable over Notion when they need heavy duty access to automated workflows.
Download these formulas into your Notion workspace
The beauty of Notion’s block system is that you can duplicate any of these formulas and tables into your own workspace (or import them from our Template Gallery).
The next stop on our Notion tutorial is a deep-dive into Notion Databases.