Productivity guide

Notion Formulas Explained, Plus 20 Formulas You Can Copy

How Notion's formula language works today, the type rules behind most errors, and 20 formulas you can paste into your own databases, from due-date countdowns to progress pulled from related tasks.

Notion formulas are properties that calculate a value for every page in a database from that page's other properties: the days left until a deadline, an Overdue flag, a quarter label, or a project's percentage complete. You write the expression once, using functions such as if(), dateBetween() and filter(), and every row keeps itself up to date.

This guide covers how the formula editor works now, the type rules behind most error messages, and 20 formulas you can paste into your own databases. They use property names like Due, Status and Tasks, so rename those to match yours. If properties and relations still feel fuzzy, read the Notion database guide first. A formula is just one more property.

How Notion formulas work today

To add one, click the slider icon at the top of a database, then Edit properties, New property and Formula. Name it and select Edit formula. The editor has an input box at the top, a left panel listing your properties, built-ins and functions, and a right panel that explains whatever you hover over, with short examples. Open the editor from a row and it also previews that row's result as you type, which is the quickest way to test logic against a real page.

The current language arrived as Formulas 2.0 and replaced the old one. Two changes matter day to day. The editor type-checks as you write and highlights problems inside the input box, so you see a mistake before you save it. And a formula can run over several lines, with indentation and comments, which makes anything longer than one condition far easier to read.

How property references appear

Notion's intro to formulas writes references as plain names, such as Due Date or Status. Its syntax reference, older examples and most formulas shared online use the text form prop("Due Date"). Both point at a property. You can type the name or select it from the left panel, and selecting is safer: the editor is case-sensitive and only recognizes an exact match. One of Notion's own examples references a property called "Net ", trailing space included, which is exactly the kind of detail that breaks a pasted formula.

The formulas below use prop() because it copies cleanly from a web page. If one shows an error after pasting, re-select each property from the list.

Data types in Notion formulas

Every value has a type, and the type of the final result decides what the column shows. Before 2.0, formulas could only output text, numbers and checkboxes. They can now return dates, people, pages and lists too, so a relation gives you real pages to work with instead of a string of names.

TypeTypical sourcesExample
TextTitle, text, select and status values, anything in quotes"Overdue"
NumberNumber properties, arithmetic, length()prop("Price") * 12
Boolean (shows as a checkbox)Comparisons, and, or, checkbox propertiesprop("Status") == "Done"
DateDate properties, now(), today(), dateAdd()dateAdd(prop("Start"), 2, "weeks")
PersonPerson and Created by propertiesprop("Created by").name()
PageA single page taken from a relationprop("Project").first()
ListRelations, person and multi-select properties, rollupsprop("Tasks").length()

Two functions handle most conversions: format() turns any value into text, and toNumber() turns text or a checkbox into a number. For a date written as text, use parseDate("2026-12-01"). Notion's formula syntax reference lists every function with its arguments.

Notion date formulas

Most formulas worth keeping are about dates, and two functions do the heavy lifting. dateBetween(date1, date2, unit) returns the first date minus the second in whole units, so it's positive when the first date is later. dateAdd(date, amount, unit) moves a date forward, and dateSubtract() moves it back. Units are "years", "quarters", "months", "weeks", "days", "hours" and "minutes". Use today() when only the calendar day matters and now() when the time of day does.

1. Days until due

if(empty(prop("Due")), empty(), dateBetween(prop("Due"), today(), "days"))

Returns 3 for a task due in three days, 0 for today and a negative number once it's late. The empty() branch keeps undated tasks blank while the result stays a number. Notion's troubleshooting page recommends empty() over "" for blanks, because "" would make the formula return a number on some rows and text on others.

2. Overdue checkbox

!empty(prop("Due")) and prop("Due") < today() and prop("Status") != "Done"

Ticks itself for unfinished tasks whose due date has passed. Because it returns true or false, it shows as a checkbox you can filter on. A task due today isn't flagged until tomorrow, which is usually what you want.

3. A red Overdue label

if(prop("Overdue"), style("Overdue", "b", "red"), "")

Reads the checkbox formula above and turns it into bold red text, which is easier to spot on a board card. style() accepts "b", "i", "u", "s" and "c" for formatting, nine color names, and the same names with "_background" added for a highlight, such as "red_background".

4. Readable dates

formatDate(prop("Due"), "MMMM D, YYYY")

Turns a date into text like "November 24, 2026", while "MM/DD/YYYY" gives "11/24/2026". The result is text, so use it in labels and titles and keep sorting on the original date property.

5. End date from a start date and a duration

dateAdd(prop("Start"), prop("Duration"), "days")

With Start on November 24 and a Duration of 10, this returns December 4. Swap "days" for "weeks" or "months" for longer spans such as a notice period or a warranty.

6. Length of a date range

dateBetween(dateEnd(prop("Dates")), dateStart(prop("Dates")), "days") + 1

For a date property with an end date, dateStart() and dateEnd() pull the two halves apart. A trip from March 3 to March 7 returns 5, because the +1 counts both the first and last day.

7. Hours between two times

round(dateBetween(prop("End"), prop("Start"), "minutes") / 60, 2)

Made for time logs. A session from 9:00 to 11:45 is 165 minutes, so this returns 2.75. Counting minutes and dividing keeps the fraction of an hour that a whole-unit "hours" count would drop.

8. Sortable week number

lets(
  d, prop("Date"),
  w, week(d),
  format(year(d)) + "-W" + if(w < 10, "0", "") + format(w)
)

week() returns the ISO week, from 1 to 53, so this produces labels like "2026-W48" that sort correctly as text. One catch: ISO weeks don't line up with calendar years. December 29, 2025 belongs to week 1 of 2026, and January 1, 2027 belongs to week 53 of 2026, so for a few days around New Year this label shows the wrong year. Check that week by hand if your reports depend on it.

9. Quarter label

"Q" + format(ceil(month(prop("Date")) / 3)) + " " + format(year(prop("Date")))

Returns "Q4 2026" for any date from October to December 2026. Useful for grouping invoices or goals when you report by calendar quarter.

10. Next billing date for a monthly subscription

lets(
  anchor, prop("First charge"),
  n, max(dateBetween(today(), anchor, "months"), 0),
  due, dateAdd(anchor, n, "months"),
  if(due < today(), dateAdd(anchor, n + 1, "months"), due)
)

Rolls the first charge date forward to the next one on or after today. A bill first charged on January 15 shows March 15 when today is February 20, and a first charge still in the future is left as it is. Change all three "months" to "years" for annual plans, and check any bill dated the 29th to 31st by hand, since short months shift those dates.

ResumeBot.coresumebot.coBuild a resume that actually gets callsA free AI resume builder with an ATS score, tailored cover letters and a job tracker. Download your PDF free, no credit card needed.Build your resume free

Notion if formulas: if(), ifs() and lets()

if(condition, valueIfTrue, valueIfFalse) covers a single yes-or-no choice. Once you have three or more outcomes, switch to ifs(). It takes pairs of condition and value, checks them in order, returns the value for the first condition that's true, and uses the last argument as the fallback. Nested if() calls do the same job, but you spend your time counting closing parentheses.

11. A due-date group label

ifs(
  prop("Status") == "Done", "Done",
  empty(prop("Due")), "No date",
  prop("Due") < today(), "Overdue",
  dateBetween(prop("Due"), today(), "days") <= 7, "Next 7 days",
  "Later"
)

Order matters. Done is checked first so finished work never reads as overdue, and the empty check comes before any date math. Filter a view to one label for a quick triage list.

12. Monthly cost from any billing cycle

ifs(
  prop("Billing") == "Monthly", prop("Price"),
  prop("Billing") == "Yearly", prop("Price") / 12,
  prop("Billing") == "Weekly", prop("Price") * 52 / 12,
  0
)

Puts every subscription on the same footing: a $120 yearly plan becomes 10 a month and a $5 weekly one about 21.67. Every branch returns a number, so you can total the column with a Sum calculation and see your real monthly spend.

13. A readable countdown with lets()

let() and lets() give a value a name so you calculate it once and reuse it. let() takes one name, its value and the expression; lets() takes as many name and value pairs as you need, then the expression.

lets(
  days, dateBetween(prop("Due"), today(), "days"),
  ifs(
    prop("Status") == "Done", "Done",
    empty(prop("Due")), "",
    days < 0, style(format(abs(days)) + if(days == -1, " day late", " days late"), "red"),
    days == 0, style("Due today", "orange"),
    days == 1, "Due tomorrow",
    "Due in " + format(days) + " days"
  )
)

Without lets(), the dateBetween() call would appear six times. Note the format() calls, which turn the number into text before it's joined to words.

Text and list formulas

Text formulas build labels and codes. List functions handle anything that holds several values, which since 2.0 includes relations, people and multi-select properties. Inside filter(), map(), some() and every(), the word current stands for the item being checked.

#FormulaWhat it does
14prop("First name") + " " + prop("Last name")Builds a full name, so a contacts database can keep first and last names separate for sorting.
15prop("Tags").join(", ")Turns multi-select tags into one line of text, handy when a button or automation needs text rather than a list.
16prop("Assignee").map(name(current)).join(", ")Lists the names of everyone in a Person property as plain text.
17prop("Tags").includes("Urgent")A checkbox that ticks when the Urgent tag is present. Use includes(), not ==, for multi-select values.
18upper(substring(prop("Client"), 0, 3)) + "-" + formatDate(prop("Date"), "YYYYMMDD")Makes a reference such as "ACM-20261124" from a Client text property set to Acme. substring() counts from 0 and stops before the end position.

This is where the current formula language pays off. A relation returns a list of pages, and current.prop() reads a property on each one. Put these two in a Projects database that has a relation called Tasks, where each task has a Status.

19. Percent of related tasks done

lets(
  tasks, prop("Tasks"),
  total, tasks.length(),
  done, tasks.filter(current.prop("Status") == "Done").length(),
  if(total == 0, 0, round(done / total * 100))
)

A project with 8 tasks, 6 of them Done, returns 75. The if() guard stops a new project with no tasks from dividing by zero. To show it as a bar, open the property's settings and switch the display from a plain number to a bar or ring, with a custom divide-by value of 100 so 75 fills three quarters. Number and formula properties both have that option, plus a color.

The no-code route is a rollup. Give tasks a Completed date property and roll it up from Projects with Percent not empty to get the share of tasks with a completion date. A rollup is easier for a teammate to follow; the formula wins when "done" depends on a Status value or on more than one condition.

20. A text progress bar

lets(
  filled, round(prop("Progress") / 10),
  repeat("■", filled) + repeat("□", 10 - filled) + " " + format(prop("Progress")) + "%"
)

Reads formula 19 (named Progress here) and draws ten squares, so 75 becomes "■■■■■■■■□□ 75%" after rounding. Most people are better served by the native bar; the text version suits gallery cards, where you want the number beside the bar.

Common Notion formula errors and how to fix them

Notion's page on common formula errors covers the full list. These are the ones that catch people most often.

What you seeUsual causeFix
Trouble joining words with numbers or datesText and a number or date in the same +Convert first: "Due in " + format(prop("Days left")) + " days"
An unclear return typeif() branches return different types, such as a date and ""Return empty() for the blank branch
Blank or odd results on some rowsDate math on an empty date, or a relation with no pagesCheck with empty() first, as in formulas 1 and 11
A date comparison that errors or never matchesA date compared with text, such as prop("Due") < "2026-12-01"Use parseDate("2026-12-01")
A multi-select or relation check that failsUsing == on a listUse includes(), .first(), filter() or map()
Formula depth limit reachedFormulas reading formulas reading rollups, past 15 layersMerge formulas that do similar work

Empty values matter even more inside automations. A formula in an automation action that hits an empty date or person makes the automation pause, so wrap those in if() or run the automation on a view that excludes empty rows.

When a formula is the wrong tool

Formulas recalculate all the time, which makes them bad at remembering. A formula using now() can't record when a task was finished, because the value keeps moving. To stamp a date, use a button or database automation that writes into a real Date property. The Notion automations guide has the steps, and both tools accept formulas in their actions too. A few other jobs have a simpler built-in answer:

  • Created time and Last edited time properties already store those timestamps.
  • The ID property gives each page a unique number that can't be edited, so there's no need to build IDs from dates.
  • Rollups count, sum and average across a relation with no code at all.
  • A relative date filter such as "today" can replace an Overdue formula in a single view. Keep the formula when you want the flag on every view or reused in other formulas.

At the time of writing (November 2026), Business and Enterprise plans also have Notion AI in the formula editor: describe what you want or ask it to fix errors, then toggle Show types to see the output type. It's a fair first draft, but read what it writes before you trust it.

Templates with formulas worth studying

Duplicate a working template, open its formula properties, and change a value to see what moves.

  • Subscription and Bill Tracker: rolling billing dates calculated by formula and monthly versus annual cost comparisons, close to formulas 10 and 12.
  • Business Goal Tracker: yearly goals linked to milestones and tasks, with progress calculated from the linked milestones.
  • Task Management Board: Today, overdue and upcoming views that keep completed tasks out of the overdue list.
  • KPI and Goals Tracker: weekly results, averages and greater-than or less-than comparisons against targets.

For more, browse the habit tracker templates, which lean on percentages, and the task management collection. The habit tracker guide puts several of these patterns into a full setup.

A good first exercise: add formulas 1 and 2 to your task database and build a view filtered to Overdue. If that view earns a daily look for a week, add the group label from formula 11 and retire whatever manual checking it replaces.

Frequently asked questions

Can a Notion formula pull a value from another database?

Only through a relation. A relation returns a list of pages, so take one page with .first() and read its property, for example prop("Project").first().prop("Deadline"), or use map() to collect a value from every related page. Without a relation, a formula has no way to see another database.

Why is my Notion formula column blank on some rows?

Usually because an input on those rows is empty, such as a page with no date or a project with no related tasks. It can also be deliberate, if the formula returns empty() when data is missing. Open the formula editor from one of the blank rows and use the live preview to see which property is missing.

Can I sort or filter a database by a formula property?

Yes. A formula works in filters and sorts like other properties, with conditions that match its output type: text conditions for text, comparisons for numbers, checked or unchecked for true and false, and date conditions for dates. This is why the output type matters. A date turned into text with formatDate() sorts alphabetically rather than by date.

What is the difference between a formula and a rollup in Notion?

A rollup reads one property across a relation and applies a fixed calculation, such as Count all, Sum or Percent not empty. A formula can combine several properties, apply conditions and read related pages directly. Use a rollup when one of its built-in calculations answers your question, and a formula when you need logic.

Do formulas written before Formulas 2.0 still work?

Yes. When Notion moved to the new formula language, existing formulas were converted so their results would not change, which in some cases meant wrapping values as text. If an older formula returns text where you would expect people, dates or a list, removing that conversion gives you the richer output.

Appsupaappsupa.comFind mobile app ideas that already make moneySee what 590K+ App Store and Google Play apps earn, which niches have leaders you can beat, and what people search. $15 a month, cancel anytime.Find an app idea