How to calculate of two rows which has multiple value in two colums and display in another field which is in outside of table what is script for that

see if these help you out. You will have to write custom script to do that:-

One more tip it is highly likely somebody had the same doubt as you so always try searching before posting !