Summary doctype field

How do you create a doctype field to hold the SUM of multiple doctype fields. I have 10 number fields, and need to use the 11th field as a total field. How is that done?