"universalbitmapper" <jb*****@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Hi,
I'm coding a PHP/MySQL application.
I'm looking for the formula to compute the original variable after it
has been applied VAT.
For instance 100 + 18% -118.
But if I try to find out 100 from 118 - 18%, the result is greater than
100.
I don't have enough maths background to solve the equation:
c = a + (a*b/100)
I'm stuck at this point:
a = (a*b/100) -c
I would like to have all 'a' on the left side and b and c on the right.
Can someone help?
Short answer:
100 / (100+VAT) * price with VAT = original price
100 / (100+18) * 118 = 100
I don't know the correct mathematical terms, but basicly this is what
happens:
the ratio of 100 : (100 + VAT) must be the same ratio as "original price" :
"VAT price"
100 / (100 + VAT) = original price / VAT price
multiply both sides with VAT price:
==100 / (100 + VAT) * VAT price = original price * (VAT price/VAT price)
==100 / (100 + VAT) * VAT price = original price
there you have it.
--
"Ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" - lpk
http://outolempi.net/ahdistus/ - Satunnaisesti päivittyvä nettisarjis
sp**@outolempi.net || Gedoon-S @ IRCnet || rot13(xv***@bhgbyrzcv.arg)