2007-05-03

Calculating Netto and Total prices with VAT


My problem was the following:
Knowing the total price of an item. I would like to save the nett price which is the total price without VAT.
After saving the nett price into the database I wanted to read the nett price back and transform it to total price by adding the VAT.

This is simple, but not as simple as I first thought.
To calculate the Netto price from the Total price knowing the value of VAT in percent (ex. 19) the formula is the following:

Netto = (100 * Total) / (100 + VAT)

To convert the Netto back to Total use the following formula:

Total = Netto + (VAT * Netto) / 100

If you actually read this, know, that I'm happy.
For those who don't know: VAT is short for Value Added Tax. In other languages: TVA in Romania and AFA in Hungary

Post a Comment