# A different kind of percentage calculation??

Question asked by Stuee on Jan 23, 2012
Latest reply on Jan 28, 2012 by Sorbsbuster

### Title

A different kind of percentage calculation??

### Post

Hi,

Im pulling my hair out with this and the few vodkas ive had probably are not helping too.

I need some assistance on how to set this up.

I have the following fields.

Sub total

Discount

freight

total

new total

What im trying to do is when the order is setup correctly the subtotal is filled in, the discount and total but ive added discount and new total as i keep rounding jobs off for customers.

I want it to,  say the sub total is \$103frieght is \$40 and the total is \$143, i want to be able to put in \$140 in the new total and it calculates the percentage difference between new total and subtotal and put the percentage in discount and adjusts the total to the new.

i tried.

discount = new total / subtotal as percentage

Total = subtotal - discount

but no joy.

Hopefully ive not confused anyone and someone can help.

cheers

Stuart