Formula fields: computed from the record itself
Arithmetic, text joining, date math, IF and SWITCH, computed by the database itself so nothing drifts. The builder, the text mode, the function list.
Updated November 2026
A formula field computes its value from the record's other fields. The demo shop's Orders table has one called To collect:
{Total} * (1 - {Discount} / 100)
Every order shows the discounted amount without anyone typing it, and it is correct the instant either input changes. The database computes the value. The field is a Postgres generated column, which Postgres maintains on every write, so the stored total can't drift out of date.
The builder and the text mode
Add a field and choose Formula. A new formula opens on a set of finished examples built from this table's own fields (days between two dates, a number with tax added, two text fields joined), so the first formula you see is one about your own table. Pick one to load it as pills, or choose start from scratch for the empty editor and its field list. Both lead to the same editor, which has two modes. You can switch between them without losing anything.
- The builder is the default. You compose the expression as pills: fields, functions, operators, values. A "Reads as" line shows the grammar being written while you build, and turns into plain English once the formula is complete, such as the days from Check-in to Check-out or if Paid is checked, "paid"; otherwise "unpaid". A ladder of
IFs reads as the table you would have drawn on paper, one line per rung, where it would otherwise be one long sentence. Beneath it the editor works the formula through your table's first record, step by step, so you see an answer from your own data before the field exists. - Edit as text is a plain expression box for typing and pasting. Reference fields as
{Field Name}. A one-word name works without the braces. Completion opens on any word you type. It inserts a field with its braces and a function with its parenthesis. Mistakes are marked at the exact spot, and the nearest existing names are offered as one-click repairs.
In both modes the type of the result (number, text, date, date and time, or yes/no) is inferred from the expression and shown as you work. You never pick a type yourself.
Shown as
Under the expression is one line, Shown as. It sets how the result is displayed, and for most fields it reads Plain and you never need to change it.
A number result can be shown as a currency (with your own symbol, before or after), a percent, or a duration in h:mm. Those come alongside the decimal places, thousands separators and the choice of 1,234.56 or 1.234,56 that every number formula has. A date result picks its date format there, and a date and time result picks its time format beside it.
A text result can be shown as select chips. These are the same colored pills a single select uses, on a value your formula worked out.
IF({Nights} > 7, "Long stay", IF({Nights} > 2, "Short stay", "One night"))
Switch that formula to chips and the three values are already in the list, in the order the formula produces them. You color them and drag them, and you never type them. That order is the order the field sorts and groups in, which is the advantage chips have over colored text: sorted alphabetically, Small, Medium, Large reads Large, Medium, Small.
Three more things about chips:
- A value the list doesn't name still shows, as a plain gray chip with its own text, and sorts after the ones that are named. Nothing you compute can disappear because nobody picked a color for it. When the formula produces a value the list doesn't name (say you added a branch after turning chips on), a line under the list names it, with an Add button. If you leave it alone it stays gray.
- Filtering offers every value. "Stay is …" gives you the values to pick from, so you don't have to spell them into a box. It offers everything the formula can produce, including a value you added to the formula after the list was made, or left off the list to keep it gray. A color rule picks from the same set. "Contains" keeps its box, because there you are typing part of a value.
- It changes nothing about the value. The field, the stored text and what the API returns are identical with chips and without. Coloring or reordering the list is a settings change and touches no records at all, so it's instant on a table of any size.
If your formula doesn't work out to a fixed set of values (it joins text together, or one branch returns a field), there's nothing to read the list from. The editor says so and leaves the list to you. The chips still work, and only the pre-filling is missing.
A ladder of IFs, as a table
A formula that picks between several outcomes gets written as IFs inside IFs, which is the hardest kind of formula to read. When yours is one, the editor offers Edit as rules and shows it as what you would have drawn on paper:
when Nights is more than 7 → long stay 12
when Nights is more than 2 → short stay 31
otherwise → one night 4
Each line of the table is one field, one comparison, one value and one result. The number beside it is how many of your records come out that way. It is counted through the entire ladder, so a later rule never claims the records an earlier one already took. You can add and remove lines, and Edit as a formula goes back to the pills with everything carried across.
Edit as rules is only offered when the rules table can show the formula in full. A condition using AND, an expression on either side, or a computed result needs more than four dropdowns to express, so for a formula like that you use the builder.
Before you save it
While you build, a line under the editor says what the formula would do to every record in the table: how many get a value, how many come out empty, and how many different values it produces. That last number is the one to read. The most common way a formula goes wrong is a comparison that never matches, such as testing a status against "yes" when the choice is spelled Yes. The result looks perfectly reasonable in the grid while being identical in every record. 1 different value across twelve thousand records shows you that at a glance.
Open it and you get the spread of values and records from your own table, including the empty ones, which is usually where the mistake is. Nothing is created to work this out: no column, no field, and no lock on the table. It also reads the records in your trash, because saving the field will look at those too.

What the language covers
The language is small, and a formula is checked before anything is saved:
Arithmetic:
+ - * /, parentheses, and&to join anything into text.Comparisons and logic:
IF(condition, then, else)with= != > >= < <=, combined withAND,OR,NOT. Nesting is fine, andSWITCH(value, case, result, …, default)reads better than a ladder of IFs. An empty cell counts as"", so{Status} = ""is true for a status nobody has set yet, and{Status} != "Done"is true for it too.BLANK()tests an empty cell as well. Theelseis optional.IF({Video}, "ready")leaves the cell empty when there's no video, which is what you want when you're building a label out of several conditions and most of them won't apply. A field on its own is a condition too, and asks whether it is filled in.IF({Video Link}, "here", "not yet")says whatIF({Video Link} != "", …)says, and reads the way you would say it out loud. A number counts zero as empty alongside blank, soIF({Discount}, …)means there is a discount. Where the difference between zero and blank is important,= 0and= BLANK()still tell the two apart.Yes/no: a formula can read a checkbox, and a formula can return one.
{Nights} > 3orAND({Paid}, NOT({Refunded}))makes a field that shows as a checkbox and filters like one. A checkbox used on its own as a condition asks whether it is checked, and an empty one counts as no.TRUE,FALSE,XOR,REGEX_MATCH,IS_AFTER,IS_BEFOREandIS_SAMEall answer yes/no.Text:
UPPER,LOWER,PROPER,TRIM,LEN,LEFT,RIGHT,MID,REPLACE,REPT,SPLIT,SUBSTITUTE,FIND,SEARCH(likeFIND, ignoring capitals),T,CONCATENATE,TEXTJOIN.TEXTJOIN(", ", …)skips the empties, so a blank never leaves a stray separator behind. That makes it the function to use for a list of the things that apply:TEXTJOIN(", ", IF({YouTube}, "YouTube"), IF({Facebook}, "Facebook"), IF({TikTok}, "TikTok"))You write one line per candidate and no false results, and an episode on two of them reads YouTube, Facebook.
FINDandSEARCHtake an optional third number that says where to start looking, soFIND("-", {Ref}, 5)skips the first four characters.Text you type yourself: anything in double quotes.
\nstarts a new line,\ta tab, and\"puts a quote inside the text, soCONCATENATE({Street}, "\n", {City})writes an address over two lines. A line break typed inside the quotes works too and means the same thing.Multi-select: a multi-select cell holds several choices, so it comes into a formula as a list.
ARRAYJOIN({Tags}, ", ")writes it out.ARRAYUNIQUEdrops repeats, keeping the first of each.ARRAYCOMPACTdrops the empty entries.ARRAYSLICE({Tags}, 1, 2)takes a part of it, andARRAYLENGTH({Tags})counts them. A formula has to end in something a cell can hold, so join the list before you finish. A list can't be compared directly with=, because it would quietly mean "the same choices in the same order".Patterns:
REGEX_EXTRACTandREGEX_REPLACE, for pulling a reference out of a note or stripping what shouldn't be there. Patterns are the database's own flavor, which has no back-references or look-ahead.Numbers:
ABS,SIGN,ROUND,ROUNDUP,ROUNDDOWN,INT,CEILING,FLOOR,EVEN,ODD,MOD,POWER,SQRT,EXP,LN,LOG,PI,VALUE,MIN,MAX,SUM,AVERAGE,COUNT,COUNTA,COUNTALL, and trigonometry (SIN,COS,TAN,ASIN,ACOS,ATAN,ATAN2,DEGREES,RADIANS).CEILINGandFLOORtake an optional step, soCEILING({Price}, 25)rounds up to the next 25.Dates:
TODAY,TONOW,FROMNOW,YEAR,MONTH,DAY,WEEKDAY,WEEKNUM(both take an optional"Sunday"or"Monday"to say where a week starts, and use Sunday if you don't give one),DATESTR,DATEADDandDATETIME_DIFF(units: minutes, hours, days, weeks, months, years). Plain date math works too:{Check-out} - {Check-in}is a number of days, and{Placed} + 3is a date.Times, to the minute:
NOW()is this moment, to the second, and a date-and-time field keeps its time inside a formula.DATETIME_DIFF({Check-in}, NOW(), "minutes")counts the minutes until check-in,DATEADD({Check-in}, -2, "hours")is two hours before it, andIF(NOW() >= {Publish at}, "due", "scheduled")changes at that exact moment. Two dates with times compare to the second. A date with a time beside a plain date compares days, soNOW() > {Due}means today is past the due date. Counting in days or longer counts calendar days (check-in Monday afternoon to check-out Thursday morning is 3), while minutes and hours count the time in between. Joined into text, a time reads like2026-07-21 14:45on this database's clock, andDATETIME_FORMATwrites any other shape.Working days:
WORKDAY({Ordered}, 5)is the date five working days later, andWORKDAY_DIFF({Start}, {End})counts the working days between two dates, both ends included. Both skip this database's weekend and its holidays, which are set beside its time zone. The weekend can be Friday and Saturday, Saturday and Sunday, one day, or none. A holiday can be one day or several, like a four-day Eid, and one that falls on the weekend isn't counted twice. Change the weekend or the holidays and every formula that uses them is recomputed. Both also take an optional list of extra days off, written into the formula as dates separated by commas, the way Airtable writes it:WORKDAY({Ordered}, 5, "2026-04-10, 2026-04-13"). Those are skipped on top of the database's holidays. The list has to be typed out in the formula, so it can't come from a field.Writing a date out:
DATETIME_FORMAT({Check-in}, "DD/MM/YYYY")writes a date in the shape you want, fromYYYY YY MM M DD D HH H mm m ss s. Anything in[square brackets]prints as itself. Month and day names aren't among the pieces, because a name has a language and Tabla doesn't have a language setting yet.Time of day:
HOUR,MINUTE,SECOND,TIMESTRandSET_TIMEZONEread the time of a date and time, meaning a date-and-time field,NOW(), or a time worked out with hours or minutes. A plain date has no time to read, and these functions say so instead of answering as if it were midnight.The record:
RECORD_ID,CREATED_TIMEandLAST_MODIFIED_TIME(when the record was created and last changed, to the second).
A long formula can be written as named steps, one per line, the result last:
nights = DATETIME_DIFF({Check-out}, {Check-in}, "days")
subtotal = nights * {Rate per night}
subtotal + subtotal * 0.14
Coming from Airtable? Most formulas can be pasted in as they are. 78 of the 84 functions listed in Airtable's own formula field reference are here, under the same names. The six that aren't are ARRAYFLATTEN (nothing here makes a nested list), ERROR and ISERROR (a Tabla formula can't produce an error cell), DATETIME_PARSE, SET_LOCALE and ENCODE_URL_COMPONENT. ARRAYJOIN needs its separator, DATETIME_DIFF its unit and DATETIME_FORMAT its format (numeric pieces only), WORKDAY and WORKDAY_DIFF take their holiday list only as dates typed into the formula, and IS_SAME no unit.
A formula can read the record's text, number, date, yes/no, single-select and multi-select fields (a select reads as its choice's name, and a deleted choice as nothing at all). It can read a linked-record field, which comes through as the names of the records it points at, joined with , (the same string the cell shows, whether those records are named by text, a number, a date or a choice), so IF({YouTube}, "on YouTube", "") asks whether anything is linked. Like a lookup, that makes the formula live: it is worked out fresh on every read. It filters and sorts like any other field, but it can't be searched unless it names the table's records (below). A link into a table whose records have no name is refused by name, and Tabla doesn't guess at one. It can read an attachment field for two things only: whether anything is attached, as in IF({Photos}, "has one", "none"), and how many, with ARRAYLENGTH({Photos}). It can't read the file names. Those are stored in a different table, and a formula is a database column that can only see its own row. Anything else asked of an attachment is refused by name, and no internal id is ever written into the cell. It can read another formula. Doing so makes this one live, worked out fresh on every read instead of stored, because a stored formula is a database column and one column can't be built from another. It can read a lookup or a rollup too. Their values are in another table, so a formula that reads one is worked out fresh on every read. It filters, sorts and gets a summary under the grid like any other formula. With Still owed as {Agreed} - {Paid}, where Paid is a rollup of payments, a view can show the accounts with Still owed above 0, biggest first. It can't be searched. A chained lookup works too, meaning one that reads through another lookup, so a value two tables away reaches the formula. A lookup across a link that allows many records holds several values. As text they join with , (the same string the cell shows), and as numbers or dates they're refused, because a joined string isn't a number. The one kind of lookup a formula can't read at all is a lookup with its own "only linked records that match" filter. Both rules apply anywhere in the chain. A formula also can't read a button, which has no value of its own, or a multi-person people field, whose entries name members, not choices. A single-person one reads as text like any other. Both IF branches must produce the same type.
Editing after creation
You can edit the expression after creation: open the field, change it, save. The result type is inferred again from the new expression, so a number formula edited into an IF that returns text becomes a text formula. Changing only how it's shown (its format, its name) never changes its type. Any formula that reads this one is recalculated to follow the edit. If one can't be (it does arithmetic on what is now text, say), the edit is refused with that formula named. If a lookup or rollup on another table depends on this field's current type, an edit that changes the type is blocked by name until that dependent is adjusted.
Writing it out. The text box indents as you go. Enter keeps the indent of the line you're on, and adds a level after an opening bracket. Tab indents, Shift+Tab takes a level back, and both work on a selected block. Typing ( or " adds the closing half, typing the closing half yourself steps over it, and backspace between an empty pair removes both. A ) typed at the start of a line jumps back to the column of the bracket it closes, and steps onto the closing half already there, so you don't end up with a second one. None of this happens inside quotes, where brackets are just characters of your text. Cmd+Enter (Ctrl+Enter) saves, and Cmd+Z undoes. While the suggestions are showing, Tab and Enter take the highlighted one instead. Ctrl+M switches Tab back to moving between controls, so you can always leave the box if you work by keyboard. The screen says so while that is on, and Ctrl+M again returns Tab to indenting. A formula you have laid out across lines opens as text next time, exactly as you left it, because the visual builder draws a chain on one line and would flatten it.
A formula field can't be converted into an ordinary field, or an ordinary field into a formula, because the column is a generated expression, not typed-in data. To keep computed values as plain data, add a plain field and paste the values in.
Blanks, days and the current moment
- Division by zero,
SQRTof a negative,LNorLOGof zero, andVALUEof text that isn't a number all produce a blank, never an error cell. So does any result too large for the database to hold. APOWERorEXPthat grows that large goes blank, and the record still saves. - Wherever a formula asks for a day (
YEAR,WEEKDAY, a difference in days), a date and time gives the day it falls on in the database's own time zone. That is the same calendar the grid and the filters use, so a day a formula derives matches what you see. Change the database time zone and every formula that depends on it,TODAY()andNOW()included, is recomputed to match. TODAY()andNOW()make a formula a live formula. It is worked out fresh on every read instead of stored, because a database-maintained column can't depend on the current moment. That is what keeps it right. There is no saved value to go stale and no overnight job to fail, so a filter on one is exact at the moment it runs, over the API as much as on screen, and an open view showing or filtering on one re-reads itself as each minute turns. A webhook whose conditions use one is checked every 30 seconds, so it fires within about half a minute of the moment, whether or not anybody has the table open. You can filter and sort on a live formula like any other field, and creating one is instant on a table of any size, because there is no column to build. A live formula can't be found by search, and the editor says so before you save. A lookup or rollup on another table can show it or add it up.- A formula that doesn't check out (a typo, a type mismatch) is refused at creation with the exact place named, and nothing is created.
A formula that names records
A formula that reads other tables can be the table's display field, the name each record goes by in link chips, search, the picker and the record panel. A contractor accounts table named by {Craft} & " / " & {Project} shows each account as "Plumber / October apartment" on every table that links to it, and {Project} & ", paid " & DATETIME_FORMAT({Paid on}, "YYYY-MM-DD") names payments. Choose Use as display field from the formula's header menu.
The name has to work out to text, and it can't use TODAY() or NOW(). Each record's name is stored and worked out again whenever something it reads is edited, so renaming a project renames every account named after it on every open screen, and a search by the name is as fast as a search of typed text. A name that reads another table's name works too (a site visit named after its contractor account), as long as the two don't read each other. That would be a loop, and it is refused when you save, with both fields named.
Everywhere else, an ordinary field
A formula field filters, sorts, groups and appears in webhook payloads like a plain field of its result type, and reads over the API under its own name:
"Total": 63,
"Discount": 10,
"To collect": 56.7
Writing to it is refused with "To collect" is a formula — it's computed automatically and can't be written to directly. The cell is read-only on screen for the same reason.
When you want a different field
A formula sees one record at a time. When the calculation has to cross a link, for the customer's total across orders or the latest delivery date across lines, you want a rollup, or a lookup for a single borrowed value. Formula, lookup or rollup explains how to choose between the three in two minutes.