Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
Full Formula Field entry
How-to guide

How to set up Formula Field in Salesforce

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.

By Dipojjal Chakrabarti · Editor, Salesforce DictionaryLast updated Apr 20, 2026

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.

  1. Open Setup → Object Manager → [object] → Fields & Relationships

    Object Manager → object → Fields & Relationships → New.

  2. Pick Formula

    From the field type list. Then pick the Return Type: Text / Number / Currency / Date / DateTime / Checkbox / Percent.

  3. Set Field Label and Field Name

    Label is the UI name; Name is the API (auto-derived). Will be appended with __c.

  4. 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.

  5. Pick Blank Field Handling

    Treat blank fields as zero (numerics) or as blanks. Zero is usually right for math; Blanks for IF/CASE logic.

  6. Configure Field Visibility (FLS)

    Set who can see the field. Formula fields default to all profiles having Read access.

  7. 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.

Key options
Return Typeremember

Text / Number / Currency / Date / DateTime / Checkbox / Percent. Locked after Save — to change, recreate.

Formularemember

The expression. Up to 3,900 characters in source, 5,000 bytes compiled.

Treat Blank Fieldsremember

As Zero (math) or As Blanks (logic). Affects null behavior.

Display Formatremember

For numerics: number of decimal places, thousand separators.

Description, Help Textremember

Description is admin-only; Help Text shows the ? icon next to the field for users.

Gotchas
  • 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.

See the full Formula Field entry

Formula Field includes the definition, worked example, deep dive, related terms, and a quiz.