Magento2: Tax rates calculation is going wrong

Created on 17 Aug 2017  路  7Comments  路  Source: magento/magento2

Hi M using magento 2, I am trying to setup tax rates but the tax calculation resultant is wrong not sure where am i going wrong. Kinldy help me on this.
Expected:
Product cost(Backend): INR 100
Product cost(Frontend): INR 100 (This is inclusive of tax 18%)
Cart: Subtotal: INR 82
tax: INR 18
Total: INR 100

But what i see is the following:

screenshot-crazyelife

Configuration is as follows:

backend

needs update bug report

Most helpful comment

Closing this issue since Magento seems to work as expected. Thanks @korostii for looking into this.

All 7 comments

When price includes tax, tax base isn't 100 in this case, it's 84.75 actually.
Thus tax = (84.75 * 18)/100 = 15.255

The formula to use in order to calculate tax directly from price incl.tax is:
tax = (price * 18) / (100 + 18) = 15.25423728813559

Thanks Korostii. Is there any way that i can achieve the expected results.

Expected:
If Assigned Product cost at Backend as INR 100

Product cost(Frontend): INR 100 (This is inclusive of tax 18%)
Cart: Subtotal: INR 82
tax: INR 18
Total: INR 100

@arun-techmanyata Thank you for your report.
Please use the issue reporting guidelines to report an issue. Include the steps required to reproduce, the actual result, and the expected result.

@arun-techmanyata,
If your tax base is less than 100, tax has to go lower than 18. Otherwise it's just wrong and not "desired".

While having tax rate of 18% , you can have row tax of INR 18 only if price _excluding_ tax is INR 100.
You can do that by switching "Display Taxes" setting to "Excluding Tax"
E.g. price in admin 100 , tax rate 18% -> tax will be applied on top of price -> in frontend you'll have:
price excl. 100, tax 18, total 118.

Additionally, please keep in mind that this is not a help desk.
The behavior of Magento in this case seems to be as intended thus it's not a bug.
The GitHub issue tracker is intended for tracking technical issues (read: "bugs") of Magento CE itself only.

If you are looking for some help or an advice regarding setup or configuration please refer to the Community Forums or the Magento Stack Exchange.

Closing this issue since Magento seems to work as expected. Thanks @korostii for looking into this.

Was this page helpful?
0 / 5 - 0 ratings