To calculate WooCommerce tax on an order, you take each line item, find the rate that matches the customer’s address and the product’s tax class, then apply it based on whether your prices already include tax. The math is simple once you know two settings: how prices are entered and how WooCommerce rounds. Here is how it works, with a worked example.
Turn on taxes first
Taxes are off by default. Go to WooCommerce > Settings > General and tick Enable taxes. A new Tax tab appears where you set everything below. Without this, WooCommerce never adds tax to any order.
Inclusive vs exclusive pricing
Under WooCommerce > Settings > Tax, the Prices entered with tax setting decides the whole calculation:
- Exclusive (prices exclude tax): you enter $100, tax is added on top. A 20% rate makes the customer pay $120, and the tax is $20.
- Inclusive (prices include tax): the $100 you enter already contains the tax. WooCommerce backs it out. At 20%, the tax portion is 100 - (100 / 1.20) = $16.67, and the net price is $83.33.
Same headline number, different tax. Pick the mode that matches how you quote prices, because it changes what the customer pays. The WooCommerce Tax Calculator lets you toggle between the two so you can see both results side by side.
Address and tax classes set the rate
WooCommerce does not use one flat rate. It picks a rate by matching two things:
- The customer’s address. You choose whether to tax based on the shop base, the billing address, or the shipping address. Rates are defined per country, state, postcode, and city, so a buyer in one region can pay a different rate than another.
- The product’s tax class. Every product is assigned a class: Standard, Reduced rate, or Zero rate (you can add your own). Each class has its own rate table. A standard item might be 20% while a reduced-rate item is 5% and a zero-rate item is 0%.
So the order total depends on who is buying and what each item is.
Compound taxes and rounding
Two settings quietly change the final number:
- Compound tax stacks one tax on top of another. A non-compound tax applies to the item price. A compound tax applies to the price plus the earlier tax, so the order matters when both exist.
- Rounding can happen per line item or at the subtotal. The Round tax at subtotal level option totals the untaxed lines first, then rounds once. Leaving it off rounds each line, which can differ by a cent or two on large carts.
Calculate it in three steps
- Open the WooCommerce Tax Calculator and enter your item price.
- Set the rate and choose inclusive or exclusive to match your store.
- Read off the net price, the tax amount, and the gross total, then copy what you need.
Everything runs in your browser, so nothing is sent anywhere. This is for understanding and estimating your setup, not tax advice. Confirm rates and rules with an accountant.
Related tools
- Building rate tables to import? Use the WooCommerce Tax Rate CSV Generator.
- Bulk-creating products to test against? Try the WooCommerce Product CSV Generator.
- Need clean SKUs for those products? See the WooCommerce SKU Generator.
Set your pricing mode, match the rate to the address and class, and the totals fall into place.