Airtable formula field overview
  • 19 Dec 2023
  • 3 Minutes to read
  • Dark
    Light
  • PDF

Airtable formula field overview

  • Dark
    Light
  • PDF

Article Summary

This article covers how to use the formula field to streamline your team's and organization's work.

Introduction 

Plan availability

All plan types 

Platform(s)

Web/Browser, Mac app, and Windows app 

Related reading

Adding formula fields in Airtable

Adding formula fields

NOTE

Formulas allow you to output numbers, dates, strings, and more in each record based on static or dynamic information from other cells in that same record. For example, if you have a table of product orders, you can create a field that computes the Total Cost for each record based on the Price and Quantity.

  1. Visit your Airtable homepage.

  2. Create or open your preferred base.

  3. Add or edit a field.

  4. Search for and select Formula.

NOTE

From there, you can enter the formula into the text box as you would in a spreadsheet, except you use the names of fields instead of cell ranges. A formula can comprise functions (e.g., SUM, CONCATENATE), operators (e.g., +, -, *, /, &), and other fields from the same table.

Suppose your formula will result in a numerical output. In that case, you can format the formula's result as a decimal, an integer, a currency, a percent, or a time duration. Additionally, you can adjust the precision for decimals, currencies, and percentages.

  1. Enter your formula in the space under “Formula.”

  2. Click Create field.

Using the formula editor in Airtable

Colorful Syntax highlighting

Green = Functions Purple = Fields Orange/Brown = Numbers Teal = Text/strings Black = Anything else not represented above. ex. commas, parentheses, etc.

formula_color_syntax

Parenthesis matching

formula_field_parenthesis_matching

Multiline editing with the ability to fold multiline formulas

formula_field_multiline

Error warnings when there are unbalanced parenthesis

formula_field_parenthesis_error

Error warnings when there is blankspace or miscellaneous characters between a function name and the opening parenthesis

formula_field_blankspace_error

Formulas versus other computed fields in Airtable

Formulas versus other computed fields overview

Computed fields are unique field types where field values are calculated by Airtable automatically rather than directly edited by users. These fields allow you to tally a value based on values in other fields—like formula, lookup, count, and rollup—or fields that return the same values independently of other fields in the table or user actions—like auto number or created time.

Like all field types, you can set these fields up using the field customization menu. To learn about the basic, non-computed field types, see the article Guide to the basic field types.

NOTE

Computed field types are slightly different from formulas in a spreadsheet. In a spreadsheet, you can put a formula in any cell and have it reference any other cell in the sheet. In Airtable, you configure computed fields that apply the same formula to every record in the table. As a result, these formulas reference other fields rather than other cells so that they apply to every record.

Rollup, lookup, and count fields can only be used when you have a linked record field in your table.

Related video content

FAQs

Can I create SQL queries in Airtable?

While you can't directly query a table in Airtable, a view can help accomplish something similar. 

By building a view, you can apply similar parameters to filter and present the information you'd like from your base's tables.

When building a view, you can filter records, hide unnecessary fields and group values, sort values, and add additional formula fields to manage complicated conditional logic to use in a filter.

You can join multiple tables by hard-coding joins into a table using linked record fields. With linked records in place, you can perform subqueries using lookup and rollup fields.

With your view/query—created, it is automatically saved in your table. You can easily switch between views, building new views—knowing your view/query is there for future reference.


Was this article helpful?