**article-title**

# Top 5 Notion Formulas you should master

20% of the formulas to get the 80% of the results

**article-content**

Formulas in Notion are the single highest leverage thing we can use to increase the output we get from our Notion workspaces.

But there's a little problem.

**Formulas in Notion are not the same as formulas in Excel or Google sheets.**

Yes, I'm also sad about that.

Learning a new set of formulas and syntaxis is not something everybody enjoys, so let's apply the pareto principle to Notion formulas.

I'm going to show you the 20% of the formulas you would need in Notion to get 80% of the results.

## How formulas work in Notion

Formulas in Notion just work horizontally. This mean we cannot perform actions among cells from different rows.

All calculations are made by row.

This means that if you develop a formula, that formula is going to be applied to EVERY row of the database.

`Sum`

formula is being applied to every row horizontallyWith this out of the way, let's get into the top 5 formulas to learn in Notion.

## Math operators

- +, -, *, /

These are used for simple operations. Of course they work with numbers, you already know that...

But something I use it a lot for is to sum text.

That is basically appending two strings of text together.

*Example*: Let's say that I have the rollup `Pending tasks`

that calculates the number of undone tasks I have for a particular project.

I can use a formula to make this text more visually appealing like so:

We haven't explained what that `format()`

formula is, but that's coming now, don't worry.

## format ( ) + toNumber( )

Sometimes we want to append different variables (numbers or strings of text), but we cannot append two variables when they're different.

If both are numbers, they're going to get sum (2+3=5)

If both are text, they're going to get appended ("Hello" + " World" = "Hello World")

But if there's a number and a string of text, Notion doesn't know what to do with that (2 + "tasks left" = wtf?)

`Pending tasks`

is a number property, while `"tasks left"`

is a string of text. Result = wtfSo in order to format a number into text or text into number we have the `format()`

and `toNumber()`

.

I also don't understand why `format()`

is not `toText()`

but it is what it is.

## If ()

This is the first formula in this post with a specific syntax.

### Syntax:

if(`statement`

, `output if statement is true`

, `output if statement is false`

)

For the `statement`

we're going to need some symbols to compare stuff. Those are:

- == : Equal to
- != : Not equal to
- < : Smaller than
- > : Bigger than
- β€ : Smaller than or equal to
- β₯ : Bigger than or equal to

Something I use all the time is a formula that returns a `β
Β `

when a task is completed. This allow me to then count the number of completed and not completed tasks I have.

This is how the formula is:

In Notion formulas, `true`

and `false`

are a ticked and unticked checkbox.

But what happens when you have more than one statement?

You use nested ifs π

Instead of specifying an output when the first statement is false, you can write another if.

You can do this indefinetly, you just have to remember to close all the brackets that you've opened at the end of the statement.

In this example, there are 2 `if`

statements that I need to close, so I use 2 brackets at the end of the formula.

Here I have another example where I use a nested `if`

to transform a select property where I rate my week into its number form, so I can then calculate averages and all kinds of nerdy stuff.

## Boolean operators

Sometimes we need our `if `

statement contains in fact two statements to be true at the same time.

For those situations we use the `and() `

formula.

`and () `

syntax

and ( `statement 1`

, `statement 2`

)

This formula is going to return `true`

if both statements are true, and `false`

otherwise.

Example:

- and (2+2=4, 5+5=10)
- This is going to return
`true`

because both statements are true. - and (2+2=4, 5+5=9)
- This is going to return
`false`

because 5+5 is not 9.

If we just need one statement to be true in order for this formula to return `true`

, then we need to use the `or()`

formula.

- or (2+2=4, 5+5=10)
- This is going to return
`true`

because at least one statement is true - or (2+2=4, 5+5=9)
- This is going to return
`true`

because at least one statement is true - or (2+2=3, 5+5=9)
- This is going to return
`false`

because none of the statement is true

## Datebetween ( ) + now( )

If Notion is your task manager, you're going to use these two formulas.

The `Datebetween()`

formula returns the difference in time between two different dates.

`Datebetween () `

syntax

Datebetween( `First Date`

, `Second Date`

, "`unit of comparison`

").

`Unit of comparison`

can be "years", "quarters", "months", "weeks", "days", "hours", "minutes", "seconds", or "milliseconds".

The `now()`

formula, simply returns the current time. This is not the time in which you're writing the formula, but the current time at all times. This means it's constantly being updated as the time passes.

These formulas are very useful to determine whether a date is in the past or in the future, and this is going to help us detect overdue tasks potentially.

This is the formula that I use for overdue tasks. But I also want to return more π₯Β emojis the more overdue the task is, so this is what I came up with.

As you can see, I'm also using the `and()`

formula to create ranges (i.e. if it's overdue from 1 to 3 days).

**cta-section**

**section-content**

## Apply to work together

We work on an** application basis** to ensure we only collaborate with businesses who will benefit the most from our services.