TOPICS
Formulas allow you to create custom calculations in any table—ranging from simple math to complex logic. These calculations update automatically, based on other fields in your base.
Formula fields will feel familiar to you if you’ve spent a lot of time in Excel, Google Sheets, or other spreadsheet applications(though the technical underpinnings work slightly differently).
Level up your workflow with formulas
Formula fields use both operators (think your basic mathematical symbols like + or *) and functions (more advanced calculations, such as parsing dates and times, figuring out averages, and rounding).
The formula field supports 98 different functions and operators—and there are almost boundless possibilities for how you can use them.
Here are a few examples of how teams use formulas to create more efficient workflows:
Use numerical operators and functions to calculate remaining budget based on individual line items, using multiplication and division.
Use text operators to combine the text from multiple fields.
Use logical operators to compare field values, and auto-generate a status.
Use date and time functions to figure out how many days until a project is due.
Explore what’s possible with formulas
Let's explore three popular function-based formulas, so you can start using them in your workflow right away.
Combine text together with CONCATENATE()
The concatenate function allows you to combine multiple instances of text into a single, unique output.
If you had gathered the first and last names of survey respondents in separate fields, you could use the concatenate function to combine them.
The CONCATENATE() function is frequently used for populating the primary fields, since it allows you to easily create unique identifiers. We even use it to track production for writing each article for these guides!
Compare field values with logical operator: IF()
The IF function compares two fields, and creates an output based on what they contain.
If you’re tracking your company’s invoicing, you can set up an IF command to mark an invoice as “paid” if it has a recorded payment date. However, if no record payment date has been logged, the output would be marked as “unpaid.”
Pro tip
Rollup fields also allow you to run calculations—but based on linked records from other tables. So you can, for example, calculate the average length of time to complete a task from a different to-do tracker. Learn more about how to use the rollup field here.
Difference between two date fields with DATETIME_DIFF()
The DATETIME_DIFF function is best for when you want to compare dates tracked across multiple fields in your table.
If you need to calculate the time between when something is assigned and when it’s due, or how long you have until starting the next project, DATETIME_DIFF() can calculate that for you.
Take action: Write a formula with a function
Now that you’re familiar with using advanced formulas in Airtable, it’s your turn!
To get started, decide which function best suits your needs—do you need to make calculations based on dates? Combine text fields? Create a logic argument based on how a field is populated?
Add a new formula field, and use the function that works best for you.
About the author
Airtableis the digital operations platform that empowers people closest to the work to accelerate their most critical business processes. Across every industry, leading enterprises trust Airtable to power workflows in product operations, marketing operations, and more – all with the power of AI built-in. More than 500,000 organizations, including 60% of the Global 2000, rely on Airtable for digital operations and citizen development to help transform how work gets done.
Filed Under
Customize for your needs