VAT being Calculated incorrectly (Rounding Error)

VAT being Calculated incorrectly (Rounding Error)

1 0 2

Hi all,

Does anybody know where VAT is calculated and if we can influence it anywhere in the source code? At the moment shopify is incorrectly calculating VAT. 

On the transaction below, goods came to £153.08

This means GB VAT 20% should be £30.616

As per government guidelines anything above 0.5 of a penny should be rounded up. Rounding to £30.62 making the total £183.70.


Whilst this is only a penny. It makes syncing it with our other system a nightmare.

Replies 4 (4)

Shopify Partner
3 0 4

Having the same issue with our taxes... 

It floors me that this issue still exists, considering how popular Shopify is and how many stores are using it. Our shopify order is consistently off compared to our accounting software - and we get the odd custom complaining that we over charge them on tax. 

Yes it's only a penny, but it's huge head ache. 

1 0 0

Hi All,


In our experience the VAT calculation system is even worse when combined with Shopify's foreign currency and price rounding features. Posting these examples here as a warning for anyone intending to sell internationally via Shopify in 2022.


We have an open Shopify Plus support case dealing with below issue since March 2022. They haven't been able to provide a fix and say the developers can't find the root cause of the issue. 


I will update this thread with any update I get.


Shopify Incorrectly Calculates VAT when Price Rounding Feature is Enabled for Foreign Currencies


When price rounding on foreign currencies is enabled, Shopify incorrectly uses the non-rounded Shipping Value for VAT calculations, instead of the rounded value shown during checkout and on the customer invoice.


See the example order below. Product costs €31.95, Shipping €6.95 (both rounded up to nearest €0.95 by the price rounding feature). This is a German transaction, so VAT is 19%.


This should come to:

(31.95*0.19)+(6.95*0.19) = 7.391


Instead, Shopify calculates €7.21. By placing the same test order with the rounding feature disabled, we know the shipping cost before rounding was €6.01. If we perform the same calculation using that value, we get the result that Shopify calculates:


(31.95*0.19)+(6.01*0.19) = 7.2124




The Order Printer App is Unable to Create Invoices with Duties 

If you use the duties calculation service introduced with Shopify Marketplaces, the Shopify order printer App is currently unable to produce invoices with a Duties line. There is also no liquid template variable for it.


In the example below, the duties charge of €9.64 from the order summary and checkout screen is omitted in the order printer invoice, yet it's included in the VAT calculation and total price shown. And yes, the rounding error from the beginning of this thread also still exists. Shopify still incorrectly rounds down.


Model Calculation



Order Summary Page (Shows Duties)



Order Printer Invoice (Doesn't show Duties)








10 0 4

Hi there


I know this is an old ticket but I wondered if you ever got a solution? We're having the same issue and it's causing us serious headaches as customer invoices generated from Shopify don't match the invoices being generated by our Sage 200 system.

New Member
7 0 0
Sorry to be the bearer of bad news, but I unfortunately never figured it
out. I've stopped working in this area a long while ago, so I don't even
remember if we had a workaround for this, sorry.

Hopefully you can figure it out!