Roll-Up Summary Field
A Roll-Up Summary Field is a special field on a master object in a Master-Detail relationship that calculates an aggregate value (COUNT, SUM, MIN, or MAX) from the related detail records.
Definition
A Roll-Up Summary Field is a special field on a master object in a Master-Detail relationship that calculates an aggregate value (COUNT, SUM, MIN, or MAX) from the related detail records. It automatically recalculates whenever detail records are created, updated, or deleted.
In plain English
“Here's a simple way to think about it: Roll-Up Summary Fields aggregate child data without writing code. Count, sum, min, max from related child records - automatically recalculating as children change. Real-time aggregation on the parent record.”
Worked example
On the Account object, the admin at Summit Partners creates a Roll-Up Summary Field called "Total Open Opportunity Amount" that sums the Amount field from all related Opportunity records where the Stage is not Closed Lost. The VP of Sales uses this field in list views to instantly see how much pipeline is associated with each Account.
Why Roll-Up Summary Fields aggregate child data without writing a single line of code
A Roll-Up Summary Field on a parent record calculates an aggregate (count, sum, min, or max) of values from related child records, and updates automatically whenever the children change. Total Opportunity Amount on an Account, count of open Cases on a Contact, max value of related Quotes on an Opportunity - each is a roll-up summary that produces real-time aggregated data without needing a scheduled job or custom code.
The constraint is that roll-ups only work on Master-Detail relationships, which limits where you can use them - a deliberate platform decision because cascade-aware aggregation is much simpler than the lookup equivalent. Where roll-ups don't fit, the alternatives are scheduled batch updates or Apex triggers, both of which add complexity. Use roll-up summary fields whenever a Master-Detail relationship and an aggregation need coincide; design the schema deliberately so they coincide more often than not.
How to set up Roll-Up Summary Field
Roll-Up Summary Fields aggregate child records into the parent — COUNT of related cases, SUM of opportunity line items, MAX of order date. They only work on Master-Detail relationships; Lookup relationships cannot have roll-ups (use a Flow or third-party tool instead).
- Confirm the relationship is Master-Detail
Object Manager → child object → Fields & Relationships → check the type. If it's Lookup, you can't add a roll-up. Convert to Master-Detail (carefully — destructive) or use a Flow.
- Open Object Manager → master object → Fields & Relationships → New
Note: you create the roll-up on the master/parent, not the child.
- Pick Roll-Up Summary
From the field type list.
- Set Field Label and Name
Label like "Total Revenue" or "Open Cases."
- Pick the Master-Detail Relationship to roll up
If the master object has multiple Master-Detail children, pick the right one.
- Pick Aggregate Function and Field
COUNT (no field needed), SUM, MIN, MAX. SUM/MIN/MAX need a numeric or date field on the child.
- (Optional) Add Filter Criteria
Roll up only records matching a filter — "Status = Closed", etc. Saves you having to do conditional aggregation in formulas.
- Save
Salesforce kicks off a recalculation. On large data volumes this can take hours.
COUNT / SUM / MIN / MAX. AVG is not supported — use SUM ÷ COUNT in a formula field.
Numeric, Currency, Percent, or Date field on the child. COUNT doesn't need one.
Restrict the rollup to a subset of children.
Which child relationship to roll up across. Lookup is not supported.
- Roll-Up Summary requires Master-Detail. Lookup → use a Flow (record-triggered, after-save) to update the parent count manually, or a third-party tool like DLRS.
- Each object has a hard limit of 25 Roll-Up Summary Fields. Plan for this — once you hit 25, you must delete one to add another.
- Adding a roll-up triggers a full recalculation across the entire data set. On a 5M-row child object, this can take many hours — schedule for off-hours.
How organizations use Roll-Up Summary Field
Total Opportunity Amount on Account uses roll-up summary; pipeline visibility per account is live data.
Open Service Appointment count per Asset; service-density visibility improved.
Trust & references
Straight from the source - Salesforce's reference material on Roll-Up Summary Field.
- Roll-Up Summary FieldSalesforce Help
- Create a Roll-Up Summary FieldSalesforce Help
Test your knowledge
Q1. Which Salesforce Cloud is Roll-Up Summary Field most closely associated with?
Q2. What best describes the purpose of Roll-Up Summary Field in Salesforce?
Q3. Who would typically configure or interact with Roll-Up Summary Field?
Discussion
Loading discussion…