Formula

A formula is a calculation the database runs automatically from values in other fields - similar to a spreadsheet, except in a database app you write the formula once on the entity and it then applies to every record in it, instead of to every cell separately.

A formula can work with values on the same record (price excluding VAT × VAT rate = price including VAT) or with values from related records through a relation - for example, a job's margin can be calculated from the invoiced amount minus hours worked times the hourly rate, even though those figures live on other entities.

The advantage over a spreadsheet is that a formula stays valid even after a new record is added - it doesn't need to be copied down to the next row, and there's no risk that one sheet keeps a stale formula while another has already been fixed.

Related: Reporting via view columns and formulas, The agency that knows what it actually earned on every job, What is an aggregation (rollup).

Describe what you want to build without code.

Apexloop builds a custom app for you