Notion Database Formulas Explained: From Beginner to Advanced

Notion database formulas are powerful tools that automate calculations, filter data, and connect information across your workspace. Whether you’re tracking project deadlines, managing budgets, or building a habit tracker, formulas save hours of manual work. In this guide, you’ll learn formula syntax from basic arithmetic to advanced functions like `if()`, `dateBetween()`, and `prop()`. By the end, you’ll be able to create custom formulas that make your Notion databases smarter and more efficient.

Notion database formula editor interface showing a simple formula with properties

Photo by Jeswin Thomas on Pexels

## Getting Started with Formula Basics

Formulas in Notion live inside database columns. You write them using a simple syntax that references other properties (columns) in the same database.

### How to Add a Formula Property

1. Open your database and click the + button in the top-right corner of the table.

2. Scroll down and select Formula as the property type.

3. Click inside the formula editor to start writing.

### Basic Syntax Rules

  • Property names are enclosed in `prop(“Property Name”)` — case-sensitive.
  • Numbers are written directly: `5`, `3.14`.
  • Text is wrapped in double quotes: `”Hello”`.
  • Operators include `+`, `-`, `*`, `/`, and `%` for modulo.

> Tip: Always use the exact property name as it appears in your database. Spaces and capitalization matter.

## Level 1: Simple Calculations and Text Manipulation

Start with these beginner-friendly formulas to automate everyday tasks.

### Arithmetic Formulas

Calculate totals, averages, or differences between numeric properties:

“`

prop(“Price”) * prop(“Quantity”)

“`

This returns the total cost by multiplying two number properties.

### Combine Text with the `+` Operator

Concatenate text from multiple properties:

“`

prop(“First Name”) + ” ” + prop(“Last Name”)

“`

This creates a full name from separate first and last name fields.

### Use `format()` to Convert Numbers to Text

“`

“Total: $” + format(prop(“Price”) * prop(“Quantity”))

“`

This outputs text like “Total: $150.00”.

## Level 2: Conditional Logic with `if()` Statements

The `if()` function is the backbone of dynamic formulas. It checks a condition and returns one value if true, another if false.

### Syntax

“`

if(condition, value_if_true, value_if_false)

“`

### Example: Status Label

“`

if(prop(“Complete”) == true, “✅ Done”, “⏳ Pending”)

“`

This displays a checkmark for completed tasks and a clock for pending ones.

### Example: Priority Flag

“`

if(prop(“Due Date”) <= now(), "🔴 Overdue", "🟢 On Track")

“`

Compares a due date to the current date and flags overdue items.

### Using `and()` and `or()` for Multiple Conditions

“`

if(and(prop(“Priority”) == “High”, prop(“Status”) != “Complete”), “⚠️ Act Now”, “OK”)

“`

This triggers an alert only when both conditions are met.

Notion table showing before and after of an if() formula applied to task status

Photo by Jakub Zerdzicki on Pexels

## Level 3: Date and Time Formulas

Dates are common in project management. Notion offers powerful date functions.

### `dateBetween()` — Calculate Duration

“`

dateBetween(prop(“End Date”), prop(“Start Date”), “days”)

“`

Returns the number of days between two dates. Replace `”days”` with `”hours”`, `”weeks”`, or `”months”`.

### `now()` — Current Date and Time

“`

dateBetween(prop(“Deadline”), now(), “days”)

“`

Shows how many days remain until a deadline. Negative numbers mean overdue.

### `formatDate()` — Custom Date Display

“`

formatDate(prop(“Created”), “MMM DD, YYYY”)

“`

Outputs dates like “Mar 15, 2025”. Works with any date property.

### Checklist: Common Date Use Cases

  • Days until event: `dateBetween(prop(“Event Date”), now(), “days”)`
  • Week number: `formatDate(prop(“Date”), “W”)`
  • Is it today? `if(formatDate(prop(“Date”), “YYYY-MM-DD”) == formatDate(now(), “YYYY-MM-DD”), “Today”, “Other”)`

## Level 4: Advanced Functions and Nested Logic

Combine multiple functions to solve complex problems.

### `empty()` and `empty()` Checks

“`

if(empty(prop(“Email”)), “No email provided”, prop(“Email”))

“`

Returns a fallback message when a property is empty.

### `contains()` — Search Text

“`

if(contains(prop(“Tags”), “urgent”), “🔥 High Priority”, “Normal”)

“`

Checks if a text property includes a specific word or phrase.

### Nested `if()` Statements

“`

if(

prop(“Score”) >= 90, “A”,

if(prop(“Score”) >= 80, “B”,

if(prop(“Score”) >= 70, “C”, “F”))

)

“`

Assigns letter grades based on numeric scores. Keep nesting to a maximum of 3–4 levels for readability.

### `slice()` — Extract Part of Text

“`

slice(prop(“URL”), 1, 5)

“`

Returns characters from position 1 to 5 (0-indexed). Useful for parsing IDs or short codes.

Nested if() formula in Notion editor showing grade calculation logic

Photo by www.kaboompics.com on Pexels

## Comparison Table: Formula Functions at a Glance

Function Purpose Example
`prop()` Reference another property `prop(“Price”)`
`if()` Conditional output `if(x > 5, “Big”, “Small”)`
`dateBetween()` Days/months between dates `dateBetween(A, B, “days”)`
`now()` Current timestamp `now()`
`format()` Convert number to text `format(prop(“Total”))`
`contains()` Check if text includes substring `contains(T, “key”)`
`empty()` Check if property is blank `empty(prop(“Email”))`
`slice()` Extract substring `slice(prop(“Code”), 0, 3)`
`and()` / `or()` Combine multiple conditions `and(A > 1, B < 5)`

## Pro Tips for Formula Efficiency

  • Use `prop()` consistently — Always reference properties by their full name to avoid errors.
  • Test incrementally — Start with simple formulas, then add layers. Debug by checking output in a new column.
  • Avoid circular references — A formula cannot reference itself or create a loop between properties.
  • Leverage formula preview — Hover over a formula cell to see the computed value instantly.
  • Copy formulas across rows — Once set, formulas auto-apply to all new entries in that column.

## Common Mistakes and Fixes

  • “Invalid formula” error — Check for missing closing parentheses or misspelled property names.
  • Wrong data type — You cannot add text to a number. Use `format()` to convert numbers first.
  • Case sensitivity — `prop(“name”)` is not the same as `prop(“Name”)`. Match exactly.
  • Empty properties break logic — Use `empty()` to handle blank cells gracefully.

## Putting It All Together: Real-World Example

Build a project health dashboard with a single formula:

“`

if(

dateBetween(prop(“Deadline”), now(), “days”) < 0,

“🔴 Overdue”,

if(

and(prop(“Progress”) < 50, dateBetween(prop("Deadline"), now(), "days") < 7),

“🟡 At Risk”,

“🟢 On Track”

)

)

“`

This formula checks if a project is overdue, at risk (less than 50% progress with a week left), or on track. It combines `dateBetween()`, `and()`, and nested `if()` for a clear status indicator.

Project management dashboard in Notion with color-coded health status column

Photo by Daniil Komov on Pexels

## Conclusion and Next Steps

Notion database formulas unlock automation and clarity in your workflows. Start with simple arithmetic and text combinations, then gradually add `if()` statements and date functions. Practice with real projects—like a task tracker or budget sheet—to build confidence.

Ready to supercharge your Notion setup? Visit notionkit.tech to download premium Notion templates with pre-built formulas for project management, habit tracking, CRM, and more. Each template includes ready-to-use databases so you can skip the setup and start being productive today.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *