A roll–up summary field calculates values from related records, such as those in a related list. You can create a roll–up summary field to display a value in a master record based on the values of fields in a detail record. The detail record must be related to the master through a master-detail relationship