Setting up VAT in WooCommerce for a store in Spain
WooCommerce does not come with Spanish VAT set up: you have to tell it which rates exist, which products they apply to and how shipping tax is worked out. If something is wrong, it charges the wrong amount on every order. Here is where each setting lives, taken from WooCommerce's official documentation, and what it does not include out of the box.
The documentation itself warns that it explains how to set taxes up in the software, not when or what to charge: «We are not tax professionals». Which VAT applies to you is set by the law. Menu and option names below are as they appear in the documentation.
1. Turn taxes on
First of all, switch them on:
- Go to WooCommerce > Settings > General.
- In the taxes and coupons section, tick Enable tax rates and calculations.
- Save changes.
From then on you have the WooCommerce > Settings > Tax tab.
2. The options that matter most
- Prices entered with tax: whether you enter your product prices with VAT included or not. If you choose with VAT, WooCommerce works the base out from the total.
- Calculate tax based on: which address decides the tax. By default, the customer's shipping address; it can also be the billing address or your shop's address. With your shop's address, tax is always calculated from your location, whatever the customer's address.
- Rounding: by default it rounds line by line. There is an option to round at subtotal level, and the documentation warns it can cause small differences.
- Display prices in the shop and Display prices during cart and checkout: whether you show prices with or without VAT. The documentation recommends setting these two and the prices-entered option the same way, because mixing them can cause one-cent errors.
3. VAT rates: the table and the classes
WooCommerce organises taxes in classes. Standard always exists, and it also comes with Reduced rate and Zero rate; you can add more under Additional tax classes, one per line. Each class has its own rates table, and each row in the table has:
- Country code: the two-letter country code, ES for Spain, or an asterisk for all.
- State code, Postcode/ZIP and City, if the rate depends on the area.
- Rate %: the rate, for example 21.
- Tax name: the name the customer sees, for example IVA.
- Priority and Compound: for when several taxes apply at once.
- Shipping: ticked by default, it says the rate also applies to shipping.
For a store in Spain with products at different rates, the basic setup is: the standard rate in the Standard class, the reduced one in the Reduced rate class, and each product assigned the class it needs. Which rate each product carries is set by the Spanish Tax Agency on its VAT rates page, not by the store. Rates can be imported and exported as CSV, and the documentation warns that its sample CSV must not be used as it is because rates change.
4. VAT on shipping
The Shipping tax class option decides which class applies to shipping. By default it is Shipping tax class based on cart items: shipping inherits the class of the products in the order. If an order has products from different classes, the documentation explains that:
- if the order contains any product in the Standard class, that class is used for shipping, even if it is not the highest rate;
- if it contains none, it uses the first rate found in the Additional tax classes list.
In other words, with products at different rates, WooCommerce applies a single rate to shipping, not a split. Under the Spanish VAT Act, what you charge for shipping is part of the taxable amount of the sale (article 78.Dos.1.º). If you mix rates in the same order, check with your accountant how the VAT on that shipping should go.
5. What it does not include out of the box
- Checking an EU business's VAT number. WooCommerce does it with a separate extension, EU VAT Number, which according to its documentation validates the number with a service that takes its data from VIES and, if it is valid, removes VAT. It lets you choose what happens if it does not validate: reject the order, accept it with VAT or accept it removing VAT. Selling VAT-free to another EU business has its conditions and must be reported on Form 349: we explain it in selling to businesses in other EU countries.
- Knowing whether you go over the threshold for sales to EU consumers. WooCommerce charges whatever rates you put in the table; if you have to charge the customer's country's VAT, loading those rates and deciding when is up to you. See the article on the EU VAT One-Stop Shop.
- Automatic calculation. There is the WooCommerce Tax extension, which calculates rates automatically for stores in certain countries; Spain is on its list. If you turn it on, most of the manual options in this article are greyed out.
6. Before you call the setup done
- Place a test order with an address in mainland Spain and check the VAT on each line and on shipping.
- If you have reduced-rate products, test one on its own and one mixed with another at the standard rate, and see which rate shipping gets.
- If you ship to the Canary Islands, Ceuta or Melilla, first read which VAT applies and add rows for those areas if needed.
- If you have a plugin that issues invoices and you also invoice with another program, decide which one issues the invoice for each sale: one sale, one invoice.
- Tax reports are under WooCommerce > Analytics > Taxes.
To see what each order leaves you once VAT is taken out, use the order profit calculator. And if you use Shopify, its equivalent is in setting up VAT in Shopify.
Sources
- WooCommerce · Setting up taxes in WooCommerce · checked on 27/09/2026
- WooCommerce · EU VAT Number · checked on 27/09/2026
- WooCommerce · WooCommerce Tax · checked on 27/09/2026
- Spanish Tax Agency (AEAT) · VAT rates (in Spanish) · checked on 27/09/2026
- BOE · Law 37/1992 on Value Added Tax (article 78) · checked on 27/09/2026
This article explains the general rule with its official sources. Your case may have exceptions: it doesn't replace your accountant.