Skip to main content
Formulas let you create calculated properties in Bases using data from other properties. A formula property doesn’t exist in your notes’ frontmatter — it’s computed on the fly from values that do.

What formulas can do

  • Calculate values — add prices, compute totals, perform math operations.
  • Manipulate text — combine strings, change case, extract substrings.
  • Work with dates — calculate time differences, format dates, determine deadlines.
  • Apply logic — use conditional statements to display different values.
  • Process lists — filter, sort, map, or aggregate list data.

Create a formula property

1

Open the Properties menu

In your base, click Properties in the toolbar.
2

Add a formula

Click Add formula at the bottom of the menu.
3

Name and define the formula

Enter a name for the formula property and type your formula expression in the Formula field.
4

Save

Close the dialog. A green checkmark confirms the formula is valid.
Once created, a formula property works like any other property: add it to views, filter by it, sort by it, and more.

Write a formula

A formula is an expression that combines properties, operators, and functions.

Reference properties

You can reference three types of properties:
TypeSyntaxExample
Note property (frontmatter)property_name or note.property_nameprice, note.price
File propertyfile.name, file.size, file.mtimefile.mtime
Another formulaformula.formula_nameformula.price_per_unit
Examples:
price * quantity
file.name + " - " + description
formula.price_per_unit * 1.1

Operators

Arithmetic:
price + tax
price - discount
price * quantity
price / quantity
(part / whole) * 100
Comparison (return true or false):
price > 100
age < 18
status == "Done"
status != "Done"
file.mtime > now() - '7d'
Boolean:
!completed
price > 0 && quantity > 0
urgent || important

Functions

Functions perform operations on values. The available functions depend on the value type. See the full function list in Bases syntax.
CategoryExamples
Globalif(), now(), today(), date(), link(), max(), min()
Stringcontains(), replace(), split(), lower(), title()
Numberround(), ceil(), floor(), abs(), toFixed()
Dateformat(), relative(), date(), time()
Listfilter(), map(), sort(), join(), unique()

Formula examples

Set a project’s due date to 2 weeks after the start date:
start_date + "2w"
Show “Overdue” if the due date has passed and the task isn’t done:
if(due_date < now() && status != "Done", "Overdue", "")
Display a price with two decimal places and a currency symbol:
if(price, "$" + price.toFixed(2), "")
Count the number of items in a list property:
tasks.length
Combine multiple factors into a single score:
(impact * urgency) / effort
Create a full name from first and last name properties:
first_name + " " + last_name
Multiply a monthly cost by the number of months, using another formula:
monthlyUses * formula.Owned.round()

Data types

Formulas work with these data types:
TypeDescriptionExamples
StringText in quotes"hello", 'world'
NumberNumeric values42, 3.14
BooleanTrue or falsetrue, false
DateDate or datetimeCreated with date(), today(), or now()
ListOrdered collection[1, 2, 3]
ObjectKey-value pairs{"name": "value"}
The output type of a formula is determined by the data and functions used.

Reference other formulas

Formulas can reference other formula properties to build derived calculations:
// Formula: price_per_unit
price / quantity

// Formula: total_with_markup — references price_per_unit
formula.price_per_unit * 1.1
A formula cannot reference itself directly or indirectly through other formulas. Circular references will produce an error.

Build docs developers (and LLMs) love