Formula Fields are read-only fields that compute their value from other fields — at runtime, every time the record is read. They're the workhorse of Salesforce data modeling: derived columns that stay in sync without triggers or flow.
- Open Setup → Object Manager → [object] → Fields & Relationships
Object Manager → object → Fields & Relationships → New.
- Pick Formula
From the field type list. Then pick the Return Type: Text / Number / Currency / Date / DateTime / Checkbox / Percent.
- Set Field Label and Field Name
Label is the UI name; Name is the API (auto-derived). Will be appended with __c.
- Build the formula in the editor
The right-hand panel has Insert Field, Insert Operator, Insert Function. Use them — manual typing is where typos and case-sensitivity errors come from.
- Pick Blank Field Handling
Treat blank fields as zero (numerics) or as blanks. Zero is usually right for math; Blanks for IF/CASE logic.
- Configure Field Visibility (FLS)
Set who can see the field. Formula fields default to all profiles having Read access.
- Add to Page Layouts → Save
The final step adds the field to the layouts you tick. Forget this and the field exists but no one sees it.
Text / Number / Currency / Date / DateTime / Checkbox / Percent. Locked after Save — to change, recreate.
The expression. Up to 3,900 characters in source, 5,000 bytes compiled.
As Zero (math) or As Blanks (logic). Affects null behavior.
For numerics: number of decimal places, thousand separators.
Description is admin-only; Help Text shows the ? icon next to the field for users.
- Formula fields are always read-only. To make a writable derived field, use a regular field plus an automation (Flow before-save) to populate it.
- Cross-object formulas (referencing parent record fields via lookup) are limited to 10 levels of depth and 15 unique referenced objects. Hit either limit and Save fails.
- Formula fields recompute on every read, so heavy formulas slow down list views and reports. SUM aggregates across millions of rows in a report run the formula millions of times — keep them simple.