<aside> ⚠️ Page under construction. This page is being built primarily to train a GPT agent. Find a finished equivalent here:

Notion Formulas: The Ultimate Cheat Sheet (2022)

</aside>

Notion Formula Data Types

Notion formulas have four data types

  1. String
  2. Number
  3. Boolean (sometimes referred to as Checkbox. Returns true and false values).
  4. Date (Uses ISO 8601 format)
    1. Date objects always have a start date/time value. They can also have an end date/time value.

Summary of Notion Formula Component Syntax

The following lists display all available Notion formula constants, operators, and functions. Their exact syntax, supported data types, and argument options are displayed.

No other functions, arguments, or data types are supported.

Constants
---
e
pi
true
false

Operators
---
if
if([condition], ['then' expression], ['else' expression])

// Argument 1 must always return a Boolean value.
// Arguments 2 and 3 must have a matching type.
if(Boolean, string, string)
if(Boolean, number, number)
if(Boolean, Boolean, Boolean)
if(Boolean, date, date)

add
number + number
string + string

add(number, number)
add(string, string)

subtract
number - number
subtract(number, number)

multiply
number * number
multiply(number, number)

divide
number / number
divide(number, number)

pow
number[base] ^ number[exponent]
pow(number[base], number[exponent])

mod
number % number
mod(number, number)

unaryMinus
-number
unaryMinus(number)

unaryPlus
+string
+Boolean

unaryPlus(string)
unaryPlus(Boolean)

not
not Boolean
not(Boolean)

and
Boolean and Boolean
and(Boolean, Boolean)

or
Boolean or Boolean
or(Boolean, Boolean)

equal
string == string
number == number
Boolean == Boolean
date == date

equal(string, string)
equal(number, number)
equal(Boolean, Boolean)
equal(date, date)

unequal
string != string
number != number
Boolean != Boolean
date != date

unequal(string, string)
unequal(number, number)
unequal(Boolean, Boolean)
unequal(date, date)

larger
number > number
Boolean > Boolean
date > date

larger(number, number)
larger(Boolean, Boolean)
larger(date, date)

largerEq
number >= number
Boolean >= Boolean
date >= date

largerEq(number, number)
largerEq(Boolean, Boolean)
largerEq(date, date)

smaller
number < number
Boolean < Boolean
date < date

smaller(number, number)
smaller(Boolean, Boolean)
smaller(date, date)

smallerEq
number <= number
Boolean <= Boolean
date <= date

smallerEq(number, number)
smallerEq(Boolean, Boolean)
smallerEq(date, date)

Functions
---
concat
concat(string)
concat(string, string)
concat(string, string, ...)

join
join(string, string, string)

slice
slice(string, number, number [optional])

length
length(string)

format
format(number)
format(Boolean)
format(date)
format(string)

toNumber
toNumber(string)
toNumber(Boolean)
toNumber(date)

contains
contains(string, string)

replace
replace(string, string [regex supported], string [regex supported])

replaceAll
replaceAll(string, string [regex supported], string [regex supported])

test
test(string, string [regex supported])

empty
empty(string)
empty(number)
empty(Boolean)
empty(date)

abs
abs(number)

cbrt
cbrt(number)

ceil
ceil(number)

exp
exp(number)

floor
floor(number)

ln
ln(number)

log10
log10(number)

log2
log2(number)

max
max(number)
max(number, number)
max(number, number, ...)

min
min(number)
min(number, number)
min(number, number, ...)

round
round(number)

sign
sign(number)

sqrt
sqrt(number)

start
start(date)

end
end(date)

now
now()

timestamp
timestamp(date)

fromTimestamp
fromTimestamp(number)

dateAdd
dateAdd(date, number, string [from unit list])

dateSubtract
dateSubtract(date, number, string [from unit list])

dateBetween
dateBetween(date, date, string [from unit list])

formatDate
formatDate(date, string [must conform to token format])

minute
minute(date)

hour
hour(date)

day
day(date)

date
date(date)

month
month(date)

year
year(date)

id
id()

Notion Formula Components

Notion formulas can utilize the following components

Operators have both function syntax (e.g. divide()) and true operator syntax (e.g. /).

Important: The constants, operators, and functions listed on this page are the only ones that can be used in Notion formulas.