How can I sum up fields that reside in multiple nodes? I am using Drupal as an inventory management system and wanted to know how can I sum up fields to get a net total?

Say I purchased 10,000 widgets over 2012, and I want to be able to sum up all the fields in those nodes to get a final total then have it displayed in a block giving me a summary of how much I spent during 2012. I want to be able to archive this data into a type of report. 

I know I should use the Views module, but I want to know how others would accomplish this situation.

What kind of performance roadblocks could I run into, if I had 1 million nodes? Would my site crash? can this be lazy loaded. if needed?
The SUM functionality is actually built into Views for D7.

If you go to your Advanced settings and enable Aggregation, you will see the Aggregation settings applied to each field.

Click on 'Aggregation settings' for the field you'd like to do the SUM functions for and you can select 'SUM' from the 'Aggregation type' dropdown as shown in this screenshot



Taken from Source Sum a field