Summation the diffrerence of multiple columns

I have requirement, to calculate the sum of the difference of multiple columns…let me aloborate the requiremnt.

we have two columns in form ColumnA and ColumnB. columnA contains amount before adding the tax and columnB contains after adding the tax.

ColumnA ColumnB

100 - 150 = 50

200 300 = 100

300 350 = 50

200

in this case we need to show the sum of the difference of these three columns in a new colum.

can any one help me the logic to achieve this…

Thanks in advance…

This case is very simple, so you can calculate the total difference just as SUM(ColumnB) - SUM(ColumnA):

SUM(ColumnB) - SUM(ColumnA) = (150+300+350) - (100+200+300) = 800 - 600 = 200

Also reference the on hand screen which has this sort of logic present.

thankyou, the way martin suggesting is working but i achieved this in another way.

thanks for your valueble reply martin and adam.