Roll-Up Summary vs Cross-Object Formula
Both pull data across a relationship — but one aggregates many child records upward, and the other references a single field on a parent. Choosing wrong usually means fighting the master-detail requirement.
Use a roll-up summary field when you need to aggregate many child records onto a parent — a COUNT, SUM, MIN, or MAX that Salesforce stores and recalculates. Use a cross-object formula when you need to reference a single field from a related parent record, computed live at read time. The deciding factor is usually the relationship: roll-up summaries require master-detail; cross-object formulas work over lookup or master-detail.
Aggregate vs Reference: The Core Difference
These two declarative tools are easy to confuse because both cross object boundaries, but they move data in opposite directions. A roll-up summary field lives on the parent and looks down at every related child record, collapsing them into one aggregate value. A cross-object formula lives on a child (or any record) and looks up at one related parent, pulling a single field forward.
Put simply: a roll-up answers “how many, how much, what’s the highest?” across a set of children. A cross-object formula answers “what does the related record say in this one field?” It never aggregates.
Roll-Up Summary
Aggregates Children- Sits on the parent, aggregates child records
- Functions:
COUNT,SUM,MIN,MAX - Requires a master-detail relationship
- Value is stored and auto-recalculated
- Supports filter criteria on which children count
- Up to 25 per object by default (raisable to 40)
Cross-Object Formula
References Parent- References a field on a related parent record
- Read-only, computed at read time (not stored)
- Works over lookup or master-detail
- Uses relationship-name dot notation (
__rfor custom) - Can span up to 10 relationships away
- No aggregation — one field, one related record
Why Roll-Up Summary Needs Master-Detail
A roll-up summary field is only available on the master side of a master-detail relationship — it is not offered on lookup relationships. That constraint exists because master-detail tightly binds child records to their parent (shared ownership, cascade delete, and a required relationship). Salesforce leans on that tight coupling to keep the stored aggregate accurate as children are inserted, updated, and deleted.
The four aggregation types are fixed: COUNT the related records, or SUM, MIN, or MAX a field on them. There is no native average, text, or mode roll-up. You can add filter criteria so only certain children are included — for example, summing Amount only on child records where the stage is Closed Won. Because the aggregate is stored on the parent, it is available to reports, list views, and other formulas without re-querying the children each time. Salesforce’s Trailhead module on roll-up summary fields walks through building one on a master record step by step.
The direction and the relationship requirement are the classic trap. A roll-up summary aggregates children onto a parent and needs master-detail; a cross-object formula references a parent field and accepts lookup too. And a documented gotcha both admins and exam writers love: you can’t reference a cross-object formula field inside a roll-up summary field (nor formulas using NOW/TODAY).
How Cross-Object Formulas Reach the Parent
A cross-object formula uses parent merge fields to walk a relationship path. On a Contact you might write Account.Industry; going further, Contact.Account.Owner.Email. For custom relationships, the relationship name ends in __r — for example Project__r.Status__c. Because the value is calculated when the record is read, it is always current and never occupies stored data.
Salesforce allows a formula to reference fields up to 10 relationships away, and caps each object at a maximum of 10 unique relationships — a limit that is cumulative across all formula fields, rules, and lookup filters on that object. Two formulas on Opportunity that both reach the related Account still count as one unique relationship. Polymorphic fields such as Owner need care, since the owner can be a User or a Queue; Salesforce’s tips for building cross-object formulas document these edge cases and the currency-conversion behavior.
A cross-object formula surfaces the referenced parent value even when the viewing user lacks access to that related record or field. If a Case formula displays Account.Industry, users see that value on the Case regardless of their Account access — so don’t rely on a cross-object formula to keep sensitive parent data hidden.
When to Use Which
Reach for a roll-up summary field whenever the answer depends on a set of children: total opportunity value on an account, count of open cases, earliest created date across related records. Reach for a cross-object formula whenever you simply need a parent’s value displayed or evaluated on the current record — the account’s industry on a contact, the parent case’s priority, a related record’s status in a validation rule.
The mechanics of each are covered in depth in the full guide to formula fields in Salesforce, which walks through return types, spanning relationships, and the formula-vs-roll-up decision in more detail. For the aggregation side — the create flow, supported field types, and every limitation — see our companion deep dive on roll-up summary fields.
When your objects are joined by a lookup and you truly need an aggregate, native roll-up summaries aren’t an option. Rather than forcing a master-detail conversion you don’t want, aggregate with a record-triggered Flow or the open-source Declarative Lookup Rollup Summaries (DLRS) tool. Reserve cross-object formulas for pulling single parent values, not for faking aggregation.
Quick Exam Recall
- Direction: roll-up aggregates children upward to a parent; cross-object formula references one parent field downward-to-up on a single record.
- Relationship: roll-up requires master-detail; cross-object formula accepts lookup or master-detail.
- Storage: roll-up value is stored and recalculated; cross-object formula is computed live at read time and stores nothing.
- Functions vs syntax: roll-up is limited to COUNT/SUM/MIN/MAX; a formula uses merge-field dot notation (
__rfor custom) and can’t aggregate. - Interplay limit: a roll-up summary can’t reference a cross-object formula, and each object caps at 10 unique cross-object relationships cumulatively.
Verified against the official Salesforce Summer ’26 Admin & User Guide, Salesforce Help, and Trailhead. Study smarter at CertifySF.com.
