When it comes to performing calculations on your data, the Salesforce platform provides a number of options, API, Apex Triggers, Visualforce and Rollup summaries.
The Rollup summary provides a code-free solution with the ability to apply some condition filtering.
Rollup summary fields can be referenced and combined with other features such as formula fields and Validation Rules.
The key requirement is that there is a Master-Detail relationship between the detail records being summarized on the field.
Rollup summaries provide a real-time calculation once configured. When creating or changing rollups, Salesforce states that it can take up to 30 minutes.
Calculating Rollup summaries can be quite an intensive job
for the Salesforce servers. As such, Salesforce limits the total number of Rollup summaries to 10 per object
This can be increased to 25 by contacting Salesforce Support with a valid business case
Roll Up Summary Field Technology Overview knowledge base article at http://help.salesforce.com/apex/ HTViewSolution?id=000004281