# Tax Calculation in magento

I want the total tax amount must be equal if I calculate it via grandtotal incl. Tax.

Like:

Product Ordered :  P1 = $10 (Incl. Tax) P2 =$20 (Incl. Tax)

Subtotal = $30 Shipping =$30 (Incl. Tax)
Grand total Incl Tax : $60 Total Tax(7%) :$3.92 (I want this should be 3.93)
Grand total excl. Tax : \$56.08 (It should be 56.07)


Because I set same tax class for both Shipping and Products. Set Tax rate to 7%.

When I calculate 60 * 7 /107 = 3.9252 = 3.93


But I guess in magento it is like :

Product total tax via row total = 30 * 7 /107 = 1.9626 = 1.96
Shipping tax = 30 * 7 /107 = 1.9626 = 1.96
Total Tax = 1.96 + 1.96 = 3.92 (That is different if I calculate it on grand total)


(I don't want to round tax individually, I want to round the total tax amount (Product tax + shipping))

Suggest how can I achieve this.

• go to admin>system>configuration>sales>tax->Shopping Cart Display Settings set what you want... Commented Aug 29, 2017 at 5:21
• You want to calculate tax for GST Commented Aug 29, 2017 at 5:23
• @RameshS Yes, Tax for GST Commented Aug 29, 2017 at 5:58
• Okay then see Manage Tax Rules in sales>tax Commented Aug 29, 2017 at 6:00
• prntscr.com/geblso like this Commented Aug 29, 2017 at 6:02