Fixing VAT calculation problems in WooCommerce

How WooCommerce's tax settings work and how to track down wrong VAT totals, missing VAT and prices that change at checkout, covering price entry, rate tables, tax classes, customer location, shipping tax, rounding and display settings.

VAT problems in WooCommerce usually show up in one of a few ways. Totals are higher or lower than you expect. VAT doesn't appear at all. Prices change when a customer enters their address. Or the figures in WooCommerce don't quite match your accounting software.

WooCommerce's tax system is built to handle sales taxes in many countries, so it has a lot of settings, and each one changes the maths in a different way. When totals look wrong, it's almost always because one setting doesn't match how you've set up the rest of the shop. This guide explains what each setting does, so you can find the one that's out of step.

Check that tax calculations are switched on

Tax settings only appear once they're enabled. Go to WooCommerce → Settings → General and look for Enable tax rates and calculations. When it's ticked, a Tax tab appears in the settings. When it's unticked, WooCommerce doesn't calculate or show any tax at all, whatever else is configured.1

Check how prices are entered

On the Tax tab, the Prices entered with tax setting tells WooCommerce how to read the prices you've typed into your products:1

  • Yes, I will enter prices inclusive of tax means the product price already contains the tax. WooCommerce works backwards to find the tax portion. For example, with a 20% rate in your tax table, a £24 product costs the customer £24, of which £4 is tax.
  • No, I will enter prices exclusive of tax means WooCommerce adds tax on top. With the same 20% rate, a £24 product costs the customer £28.80.

If this setting doesn't match how your product prices were actually entered, every total on the site will be out by the tax amount. That's the most common cause of "VAT is wrong on everything".

Changing this setting doesn't change the numbers stored on your products. It only changes how WooCommerce interprets them. So if you change it, check your product prices still say what you intend.

Check your tax rate tables

WooCommerce doesn't come with any tax rates. They're entered by hand in tables on the Tax tab, with one table per tax class (Standard rates, Reduced rate rates and Zero rate rates by default).1

Each row has these columns:

  • Country code: a two-letter ISO country code. The United Kingdom is GB, not UK. A row with UK won't match any customer.
  • State code, Postcode / ZIP, City: leave these blank for a rate that applies to the whole country, or fill them in to narrow the row down.
  • Rate %: the rate as a plain number, such as 20, not 20% or 0.2.
  • Tax name: the label shown at checkout and on emails, such as VAT.
  • Priority and Compound: control how multiple matching rates combine. For a single rate per country, leave priority at 1 and compound unticked.
  • Shipping: whether this rate also applies to shipping charges.

When VAT doesn't appear at all, the usual cause is that no row in the relevant table matches the customer's location. Check the country code first, then any postcode or city restrictions.

The rate values themselves should come from your accountant or official guidance. WooCommerce simply applies whatever is in the table.

Check product tax settings

Each product has its own tax settings in the General tab of the product data box:1

  • Tax status: Taxable means tax is calculated on the product. Shipping only means only the shipping cost is taxed. None means no tax is calculated for that product at all.
  • Tax class: chooses which rate table WooCommerce uses for the product. A product set to Reduced rate uses the rows in the Reduced rate table, and so on. If that table has no row matching the customer's location, no tax is calculated.

Variations have their own Tax class setting, with "Same as parent" using the parent product's class. (If the variations themselves aren't appearing, see our guide to WooCommerce product variations not showing.) If tax is wrong on only some products, compare their tax status and class with a product that's working. You can change these in bulk from Products → All Products using the bulk edit option.

Check where tax is calculated from

The Calculate tax based on setting decides which address WooCommerce uses to find the matching rate row: the customer's shipping address, the customer's billing address or your shop's base address.1

When it's set to a customer address, WooCommerce needs to know where the customer is before it can pick a rate. Before they've entered an address, it uses the Default customer location setting under WooCommerce → Settings → General:2

  • No location by default means no tax is calculated until the customer enters an address. Prices in the shop may show without tax, then change at checkout.
  • Shop country/region assumes customers are in the same country as your shop until they tell WooCommerce otherwise.
  • Geolocate looks up the customer's location from their IP address. Geolocate (with page caching support) does the same in a way that works with page caching, and adds a ?v= parameter to URLs.

If prices change as a customer moves through checkout, this combination of settings is usually why.

Prices changing for customers in other locations

If you enter prices inclusive of tax and a customer's location matches a different rate (or no rate), WooCommerce's default behaviour is to take off the tax for your base location and then apply the customer's rate. So the price the customer pays changes.3

For example, with prices entered inclusive of tax, a 20% rate for GB and no rate for the customer's country, a £24 product is charged at £20.

If you'd rather the price customers pay stays the same wherever they are, with only the tax portion changing, WooCommerce provides a filter for that. You can add it to your child theme's functions.php or a code snippets plugin:3

add_filter( 'woocommerce_adjust_non_base_location_prices', '__return_false' );

This changes how much you receive on those orders, so check with your accountant which behaviour you need before adding it. Take a backup and make a copy of functions.php before editing it, since a typo in that file can take the site offline with a critical error.

Check tax on shipping

If shipping isn't having tax applied, check two things:

  1. The Shipping checkbox on the matching rate row is ticked.
  2. The shipping method's own Tax status is set to Taxable. You'll find this by editing the method under your zones in WooCommerce → Settings → Shipping.

Which rate table applies to shipping is controlled by the Shipping tax class setting on the Tax tab. It can be set to a specific class, or to Shipping tax class based on cart items.1 With the second option, WooCommerce picks the class like this:4

  • If any item in the basket uses the Standard class, shipping uses Standard.
  • If every item uses the same other class, shipping uses that class.
  • If the basket contains a mix of non-standard classes, shipping uses whichever of those appears first in your Additional tax classes list.
  • If nothing in the basket is taxable, no tax is charged on shipping.

How shipping should be taxed is a question for your accountant. This just explains what WooCommerce will do with each setting so you can make it match.

Rounding differences

Penny differences between WooCommerce and your accounting software usually come from rounding. By default, WooCommerce rounds tax on each line of the order. Ticking Round tax at subtotal level, instead of rounding per line on the Tax tab makes it round once on the subtotal instead.1 Neither is wrong in itself, but they can give slightly different totals.

If your accounting software expects one method, set WooCommerce to match, then compare a few test orders. Also check the Number of decimals setting under WooCommerce → Settings → General. It controls how many decimal places prices are displayed with, and should normally be 2 for pounds and pence.2

Check how tax is displayed

Several settings control what customers see, and getting them out of step can make correct totals look wrong:1

  • Display prices in the shop and Display prices during cart and checkout can each be set to Including tax or Excluding tax. If one is inclusive and the other exclusive, prices will appear to jump between the product page and the basket.
  • Price display suffix adds text after every price, such as inc. VAT. It also accepts the placeholders {price_including_tax} and {price_excluding_tax}, so you can show both figures, for example inc. VAT ({price_excluding_tax} ex. VAT).
  • Display tax totals shows either a single tax line or one line per rate (Itemized).

Invoices and VAT numbers

If order emails or PDF invoices show different tax figures from the order screen, check the invoice plugin's own settings. Many have separate options for how tax is displayed, and your VAT registration number is usually entered there rather than in WooCommerce.

WooCommerce doesn't collect or validate customers' VAT numbers by itself. Stores that need to do this use an extension. What you then do with a VAT number is, again, one for your accountant.

Test after every change

Tax settings interact with each other, so after changing anything, place test orders that cover the combinations you actually sell: each tax class you use, a mixed basket, a customer in your base country and, if you sell elsewhere, a customer in another location. Compare each total with what you expect. If one doesn't match, the difference usually points straight at the setting responsible.

If orders are getting stuck rather than calculating wrongly, see our guides to fixing WooCommerce checkout problems and orders stuck on Pending payment.

Still not adding up?

If totals still look wrong after checking these settings, a plugin may be changing tax calculations. Subscriptions, B2B pricing, currency switchers and product add-on plugins often do. Try the same test order with those plugins deactivated. If you'd like help getting WooCommerce set up the way your accountant has asked, my WordPress development service and emergency WordPress support cover WooCommerce tax settings, invoice plugins and checkout problems.


  1. Setting up taxes in WooCommerce, WooCommerce. ↩ ↩ ↩ ↩ ↩ ↩ ↩ ↩

  2. General settings, WooCommerce. ↩ ↩

  3. Code snippets for configuring special tax scenarios, WooCommerce Developer Docs. ↩ ↩

  4. class-wc-tax.php, WooCommerce source code on GitHub. ↩

Adam Greenough

Written by Adam Greenough

Freelance web developer with over 15 years of experience building and fixing WordPress sites. I work with businesses across the UK on everything from emergency support to full builds.

Need emergency WordPress support today?

If your site is down, hacked or throwing errors, send me the details and I will assess the problem quickly. Support starts from £50, you will get a fixed quote before any work begins, and if I cannot fix the issue, you will not pay.