# Completely wrong tax calculation

I have set up a tax rate of 21% (Belgian Tax). This tax rate applies to all products (Taxable Goods) through the needed Tax Rule.

Let's take a product with a price of 6.82€ (tax included). Magento shows "[Inc. Tax €1.18]" on the Price tab for this product.

This is completely wrong: 6.82€ * 0.21 = 1.4322€ (-> compared to 1.18€)

As a result, the tax information on the shopping cart and on invoices are totally wrong.

I have this set-up in System > Configuration > Tax:

• Tax Calculation Method Based On: Total
• Tax Calculation Based On: Shipping Origin
• Catalog Prices: Including Tax
• Shipping Prices: Including Tax
• Apply Customer Tax: Before Discount
• Apply Discount On Prices: Excluding Tax
• Apply Tax On: Custom price if available

I can't find what is going wrong. Any help would be fully appreciated.

• What version of Magento are you currently using? Do you have any other tax rates set? May 8, 2013 at 21:36
• Magento CE 1.7.0.2. No other tax rates set. May 8, 2013 at 21:44

## 1 Answer

Actually the numbers are ok. 6.82 Including tax means that 6.82 = 1.21 * (price_without_tax).
This means that price without tax = 6.82 / 1.21 = 5.64.
And the tax is 6.82 - 5.64 = 1.18.

• Dude. I was making wrong calculations! Thanks Marius, I read your answer and then hit my head on the wall. May 8, 2013 at 21:49
• I am facing one issue with tax. Product price = 5 USD (Including tax) We have configured tax 5% for specific country, region (Country - India , State - Maharashtra). Displayed price as Including tax - for more information of the issue you can review i.sstatic.net/Woza2.jpg link. May 17, 2016 at 12:44
• @BijalBhavsar. The calculations are right. You have the prices set to include tax. 5% in your case. this means that 10INR is the product price with 5% tax included. This means that the tax value is (10/(100+5)) *5 = 0.476 ~ 0.48.
– Marius
May 17, 2016 at 12:53
• @marius - could you please elaborate logic of this calculation. May 17, 2016 at 13:04
• @BijalBhavsar. This is how the taxes work. If your product price has the taxes included, the tax amount is calculated as this: (productPrice / (100 + taxPercent)) * taxPercent. Or in a more friendly way (productPrice*taxPercent) / (100 + taxPercent).
– Marius
May 17, 2016 at 13:08