Is there a problem that needs an urgent fix?Urgent fix?Get emergency help →
Blog

Practical Magento 2 guides on upgrades, security, speed and migration, written by the MageBooster team.

Magento 2.4.9 VAT and tax settings: single site and multisite (Lesson 12)

VAT in Magento 2.4.9: tax rates for the UK, Germany and the Netherlands as a CSV import, one tax rule, prices including VAT, a full tax summary, the tax settings of each store (website and store view scope) and Cross Border Trade.
Lesson 12MageBooster Lessons · Magento 2.4.9

Magento VAT and tax settings: single site and multisite

VAT in Magento 2.4.9, set up once for a single shop and then per website: tax rates for the UK, Germany and the Netherlands, one tax rule, prices entered and shown including VAT, a full tax summary in the cart, then the tax settings of each store with the scope switcher (website and store view), and Cross Border Trade per website for one gross price in every country. Tested on our three-website test shop from Lesson 11.

Updated October 2026Video about 8 minLevel Shop owners and developers
This lesson shows Magento settings, not tax advice. Rates change and which rules apply depends on your business: check the official sources below and ask your accountant.

Four building blocks

BlockWhereWhat it is
Tax rateStores › Tax Zones and RatesA country (optionally state and post code) and a percentage
Product tax classOn every product (Tax Class)Taxable Goods by default
Customer tax classOn every customer groupRetail Customer by default, also for NOT LOGGED IN
Tax ruleStores › Tax RulesThese rates, for these customer classes, on these product classes

Standard rates used in the lesson: UK 20 % (GOV.UK: VAT rates), Germany 19 % and Netherlands 21 % (European Commission, Your Europe: VAT rules and rates). Reduced rates (food, books…) need their own product tax class, rates and rule.

Tax rates (CSV import)

The UK rate came from Lesson 4. For Germany and the Netherlands we import a CSV in System › Data Transfer › Import/Export Tax Rates (also at the bottom of Stores › Tax Rules › Add New Tax Rule). Same columns as Export Tax Rates; * means all states / post codes; an existing code is updated, not doubled. Optional extra columns named after store view codes hold the rate title per store view.

tax-rates.csvDownload

Code,Country,State,Zip/Post Code,Rate,Zip/Post is Range,Range From,Range To
UK VAT,GB,*,*,20,,,
Germany VAT,DE,*,*,19,,,
Netherlands VAT,NL,*,*,21,,,
Magento 2.4.9 on PHP 8.5: Add New Tax Rate opens an empty form once the shop has more than one store view (exception.log: Deprecated Functionality: Using null as an array offset … framework/Data/Form.php on line 248). The CSV import works.

The tax rule

Stores › Tax Rules › Add New Tax Rule: Name VAT UK DE NL, Tax Rate UK VAT, Germany VAT, Netherlands VAT. Under Additional Settings: Customer Tax Class Retail Customer, Product Tax Class Taxable Goods (both preselected), Priority 0. Save Rule. Magento picks the rate whose country matches the customer’s address (or the default tax destination).

Single site settings

Stores › Configuration › Sales › Tax, scope Default Config:

GroupSettingValue in the video
Tax ClassesTax Class for ShippingNone (shipping without VAT here; pick a class if your shipping is taxable)
Tax ClassesDefault Tax Class for Product / CustomerTaxable Goods / Retail Customer
Calculation SettingsTax Calculation Based OnShipping Address
Calculation SettingsCatalog Prices / Shipping PricesIncluding Tax (prices in the admin contain VAT)
Calculation SettingsApply Customer Tax / Apply Discount On PricesAfter Discount / Including Tax
Calculation SettingsEnable Cross Border TradeNo (see below)
Default Tax Destination CalculationDefault CountryUnited Kingdom: used until the customer gives an address (catalog, new cart)
Price Display SettingsProducts / ShippingIncluding Tax
Shopping Cart Display SettingsPrices, Subtotal, ShippingIncluding Tax; Order Total Without Tax: Yes; Full Tax Summary: Yes
Orders, Invoices, Credit Memosthe same fivethe same values
vat-single-site.shDownload

#!/bin/bash
# MageBooster Lesson 12: VAT settings for a single site (Default Config), as in the admin (run on the server, in the Magento folder)
cd /var/www/magento
m() { sudo -u magento bin/magento config:set "$@"; }
m tax/calculation/price_includes_tax 1      # Catalog Prices: Including Tax
m tax/calculation/shipping_includes_tax 1   # Shipping Prices: Including Tax
m tax/calculation/discount_tax 1            # Apply Discount On Prices: Including Tax
m tax/defaults/country GB                   # Default Tax Destination: United Kingdom
m tax/display/type 2                        # Display Product Prices In Catalog: Including Tax
m tax/display/shipping 2
for k in price subtotal shipping; do m tax/cart_display/$k 2; m tax/sales_display/$k 2; done
for k in grandtotal full_summary; do m tax/cart_display/$k 1; m tax/sales_display/$k 1; done
sudo -u magento bin/magento cache:flush

Scopes and the scope switcher

The scope switcher at the top left of Stores › Configuration picks what you edit: Default Config (all stores), a website or a store view. The label under each field name shows how far down it can be set. From Magento/Tax/etc/adminhtml/system.xml in 2.4.9:

LabelMeaningTax settings with this scope
[GLOBAL]One value for the whole installation (Default Config only)Default Tax Class for Product, Default Tax Class for Customer
[WEBSITE]One value per websiteTax Class for Shipping, all Calculation Settings (incl. Catalog Prices and Enable Cross Border Trade)
[STORE VIEW]One value per store viewDefault Tax Destination Calculation, Price Display, Shopping Cart Display, Orders/Invoices/Credit Memos Display

Below Default Config every field has a checkbox: Use Default Value on a website, Use Website on a store view. Ticked, the field inherits from the level above; untick it to give this website or store view its own value, then Save Config. A store-view field can also be set on the website: it then applies to all of the website’s store views. General › Country Options › Default Country is a store-view field too.

Tax settings per store

In the video, one store at a time: scope = the website for Calculation Settings, the tax destination and the default country, then scope = its store view for the display settings, Save Config each time. Then System › Cache Management › Flush Magento Cache (with Varnish this also purges the page cache).

Setting (Stores › Configuration)ScopeSet onUK · Main WebsiteGermanyNetherlands
Sales › Tax › Calculation Settings › Enable Cross Border TradewebsitewebsiteNo, later YesNo, later YesNo, later Yes
Sales › Tax › Calculation Settings › Catalog Prices, Shipping PriceswebsiteDefault ConfigIncluding Tax (inherited)Including Tax (inherited)Including Tax (inherited)
Sales › Tax › Default Tax Destination Calculation › Default Countrystore viewwebsiteUnited Kingdom (inherited)GermanyNetherlands
General › Country Options › Default Countrystore viewwebsiteUnited Kingdom (inherited)GermanyNetherlands
Sales › Tax › Price Display Settings (products, shipping)store viewDefault ConfigIncluding Tax (Use Website)Including Tax (Use Website)Including Tax (Use Website)
Sales › Tax › Shopping Cart / Orders Display Settingsstore viewDefault ConfigIncluding Tax, full tax summarythe samethe same

Store views in our test shop: Default Store View (Main Website, www), Deutsch (Germany, de), Nederlands (Netherlands, nl). Why the default country too: the checkout address form starts with General › Default Country, the cart estimate with the tax destination; without both a German visitor starts with the United Kingdom. A store view could show prices differently (for example Excluding Tax for a trade shop): untick Use Website there. The same as a script:

vat-per-store.shDownload

#!/bin/bash
# MageBooster Lesson 12: the per-store settings of the video (admin: Stores › Configuration, scope switcher), as config:set.
# Website scope: tax destination + checkout country per website; the UK (Main Website) inherits GB from Default Config.
cd /var/www/magento
m() { sudo -u magento bin/magento config:set "$@"; }
m --scope=websites --scope-code=germany     tax/defaults/country DE
m --scope=websites --scope-code=germany     general/country/default DE
m --scope=websites --scope-code=netherlands tax/defaults/country NL
m --scope=websites --scope-code=netherlands general/country/default NL
# store views: display settings stay inherited (Use Website = including tax). A store view could override them, e.g.:
# m --scope=stores --scope-code=nl_nl tax/display/type 1    # 1 = Excluding Tax, 2 = Including Tax, 3 = both
# Cross Border Trade (one gross price in every country), per website:
for w in base germany netherlands; do m --scope=websites --scope-code=$w tax/calculation/cross_border_trade_enabled 1; done
sudo -u magento bin/magento cache:flush

Result on our test shop (travel mug, 24.00 including VAT in the admin, shipping origin United Kingdom from Lesson 4):

www (UK)de (Germany)nl (Netherlands)
Product price, Cross Border Trade No€24.00€23.80€24.20
Product price, Cross Border Trade Yes€24.00€24.00€24.00
Cart tax line (CBT Yes)UK VAT (20%) €4.00Germany VAT (19%) €3.83Netherlands VAT (21%) €4.17
Order total incl. / excl. tax (+ €5 flat rate)€29.00 / €25.00€29.00 / €25.17€29.00 / €24.83

Cross Border Trade

With catalog prices including tax, Magento first takes the VAT out with the rate of its own origin (Shipping Settings › Origin, here the UK: 24.00 / 1.20 = 20.00 net), then adds the customer’s rate: 20.00 × 1.19 = 23.80, 20.00 × 1.21 = 24.20. Enable Cross Border Trade = Yes keeps the gross price the same in every country, and the VAT inside it changes. It is a website-scope setting: in the video it is switched on for each website (scope = website, untick Use Default Value, Yes, Save Config), then the cache is flushed. Setting it once at Default Config does the same for all websites that don’t override it.

B2B and the EU

Customers › Customer Configuration › Create New Account Options › Enable Automatic Assignment to Customer Group checks VAT IDs with the EU VIES service and moves customers into the groups you set (valid domestic, valid intra-EU, invalid, validation error). For sales to consumers in other EU countries above the EU-wide threshold, the customer’s country rate applies, declared through the One-Stop Shop (OSS). Which rules apply to your business is a question for your accountant.

Downloads

Troubleshooting

SymptomCause and fix
New Tax Rate form is empty2.4.9 + PHP 8.5 with more than one store view (Form.php:248 deprecation). Import the rates as CSV.
No tax in the cartNo rule for the customer class + product class + country, or the product has Tax Class None.
Price differs per countryCatalog prices include tax and Cross Border Trade is No: expected; enable Cross Border Trade for one gross price.
German site checkout starts with United KingdomSet General › Country Options › Default Country per website.
Old prices on the storefrontFull page cache / Varnish: System › Cache Management › Flush Magento Cache or bin/magento cache:flush.
A field is greyed outUse Default Value / Use Website is ticked: untick it. A field missing in a scope is GLOBAL (or WEBSITE when a store view is selected).

Next lesson

Lesson 13: OpenSearch, set up in the admin and tested on the server.

Selling in several countries with Magento?We set up multisite shops with clean tax, price and store structures.

▶ Watch every MageBooster lesson on YouTube: all lessons in order · subscribe to the channel

Installation guides: Magento 2.4.9 on Ubuntu Mage-OS Hyvä
Spotted a mistake on this page? Tell us and we will fix it right away.

Free Site Audit

Send your store details. We check speed, security and extensions, then reply with three quick wins within 3 working days.

Let's talk

Get a quote

Tell us about your store and we’ll reply within one working day. Prefer to chat? Say hello from WhatsApp

MageBooster Book a UnoPim demo See UnoPim live with products like yours. A new PIM or a move from Akeneo: we reply with a plan, a timeline and a quote.
✓ Official UnoPim partner✓ AI agent set up for your team✓ Connected to Magento
MageBooster Start your Hyvä project From scratch or from your current store. We reply with a project plan, a timeline and a quote.
✓ Design and structure by us✓ Hyvä-optimised server✓ Bonus modules included

MageBooster

Let us get in touch with you

Leave your details and your store address. We look at your store first and contact you within one business day, by phone, WhatsApp or email, whichever you prefer.

Partner with us