This sounds like a case where Calculated Columns should be used.
For example, let's say you have a list with columns for four values, a column for a total of all four values, and a column for the sum of column A and column D. Here is the approach I'd take:
Column A, B, C, and D would be number-type items in the list.
Column E (the total) would be a calculated column that uses the SUM of the 4 columns.
Column F (the partial sum) would be a calculated column that uses the SUM of the two columns in question.
When you create your columns, just make sure you choose CALCULATED (it's not too far from the bottom of the list), and enter your calculation requirement in the box.
This example is a bit simplified, but it should give you the general idea of how to approach this problem using a SharePoint list.