Page 1 of 1

Query to work out VAT within a price... how??

Posted: Wed Oct 21, 2009 4:46 am
by simonmlewis
Does anyone know the PHP maths query to work out the VAT within a price?

ie. £10. (or $10 for the USA techy bods).

It's not 10 * 15%... because that would find 15% of 10 and add it on.

I need the element within 10 that is the VAT.

Hope someone can help.

Re: Query to work out VAT within a price... how??

Posted: Wed Oct 21, 2009 5:20 am
by Mark Baker
Gross Price = Net Price * (1 + VAT)
Net Price = 10
VAT = 15%
=> Gross Price = 10 * (1 + 0.15)
=> 11.50

Net Price = Gross Price / (1 + VAT)
Gross Price = 10
VAT = 15%
=> Net Price = 10 / (1 + 0.15)
=> 8.695652174