How to Setup Basic Taxes in Woocommerce

Tax laws can be complicated, and every store owner really should consult their tax attorneys before going big time, and probably before selling anything at all.

That said, I’m no tax lawyer, but as a lowly website designer and WordPress developer, I do know a thing or two about how to set these taxes up when using the absolutely awesome Woocommerce plugin to sell things on your website.

First, let’s review what’s in Woocommerce by default.

Woocommerce Basic Tax Features

General Tax Options

Once you’re in WordPress, and have Woocommerce installed, you’ll need to tell it you want to enable taxes. This is done via Woocommerce > Settings > General. Scroll down the page until you see this section, “Enable Taxes” and make sure the box is checked.

the initial checkbox for enabling woocommerce taxes

Next, go to Woocommerce > Settings > Tax.

example of where woocommerce taxes are located in WordPress

The first “sub-tab” of this section of Woo’s settings is called Tax Options. Here’s what they all do.

Prices entered with tax
Choosing, “Yes, I will enter prices inclusive of tax” essentially voids all other options, as if you do this, you’ll effectively be dealing with taxes on your own — both when you create products and add their pricing as well as when you go to do your own taxes come tax time. Most people will choose, “No, I will enter prices exclusive of tax” and continue on through the process.
Calculate tax based on
Typically in the US, this should be set to “Customer shipping address.” That will tell Woocommerce to look at whatever shipping address the customer enters and base taxes off of that. So if you end up setting up a 6% Pennsylvania sales tax, for example, only users who live in Pennsylvania will be taxed that 6%. If you decide to add the 1% additional Allegheny sales tax, then people who live in that county (we set this all up later) will pay 6% PA tax + 1% Allegheny sales tax for a total of 7% tax.

The other option is to charge tax based on your shop address. In Pennsylvania, for example, online stores with sales of $10,000 or more annually all must charge tax and pay it to the state.

Shipping tax class
This allows you to choose the default “shipping tax class” — essentially a “tax class” is a way to group different products that get different taxation. For example, in Pennsylvania unprepared food, clothing and services are not taxed, while things like razors and decorative pumpkins not used to create food are (yeah, tax laws can be complicated.) So you might have a shop that sells all of these things, and so you’ll need to add these different tax classes. For the unprepared food, clothing and services you sell on your site, when creating those products, you’d set them to the Zero Rate tax class, like so:

example of how to set a product's tax rates

Otherwise, you’d leave them set to the normal rate. You can also set their Tax Status to None alternatively, if you don’t want certain items to be taxed. You can also choose whether specific products get their shipping taxed as well.

Rounding
Checking this will take the subtotal of all products purchased and apply the tax rate to that, instead of doing it individually per product. So if a customer has three products that cost $1, $15, and $19.99 respectively, not checking this would do this math (at a 6% sales rate):

(1 * .06) + (15 * .06) + (19.99 * .06) = .06 + .9 + 1.1994 = .06 + .90 + 1.12 (rounded at the product price level) = $2.08 in total tax

Whereas if you do check the box, the calculation goes like this:

1 + 15 + 19.99 * .06 = 2.1594 = 2.16 (rounded at the subtotal level) = $2.16 in total tax

Additional tax classes
Here’s where you can create the additional tax classes as described above. This will result in additional tabs near the top of this page (Tax Options | Standard Rates | Your Other Rates | Etc.)
Display prices in the shop
Here you choose whether the prices shown on your site’s front end pages will show their price + tax or just the initial price.
Display prices during cart and checkout
This is the same as the one above, but applies to the cart page.
Price display suffix
This allows you to add some text after the normal pricing. So if a product costs $19.99, you can add text here so that it displays as “$19.99 + tax” by literally entering the text “+ tax” here.
Display tax totals
“As a single total” will just show on line item on the cart and checkout pages, Tax: $2.16 whereas “Itemized” will show each applicable tax listed out, such as:

PA Sales Tax: $2.16
Allegheny Sales Tax: $0.16

Make sure to click Save Changes after you make any changes.

Setting Tax Rates

Next up, click Standard Tax Rates near the top of the page.

Click Insert Row to create a new taxation situation. We’ll do Pennsylvania and go through each box one at a time.

example of where we're headed with setting up taxes
This is where we’ll end up when we’re done.
Country Code
Every country has a specific code, and they’re all kept up to date here on Wikipedia. Pennsylvania is the US, so we’ll enter US in the first box.
State Code
If you’re not in a country with a state or province code, you can leave this blank. Pennsylvania’s code is PA though, so we’ll add that here. Now, everything in the state will get the tax rate we set.
Postcode/ZIP
You can use this to set even more limited regions. For example, if you want to apply the 1% sales tax applicable to Allegheny County, you can add all of the zip codes in that county here. I even have a list of them ready to roll for you here, should you be looking for Allegheny ZIP Codes. We don’t need that for now, though, and note that if you did want to add the 1% Allegheny sales tax, you’d want to click Insert Row and add it as its own line, since here we’re doing PA in general.
City
Here you could add in a specific town or city, and if the customer types that in as their address, the tax class would apply to them.
Rate %
This is our tax rate. For PA, we’ll enter 6 here.
Tax Name
This is what will be displayed on the front end of the site, if you’ve elected to show all taxes as one line.
Priority
You can leave this at 1, but if you have multiple tax rates, they all need different numbers entered here.
Compound
Checking this will make the taxes greater. So in our 6% PA and 1% Allegheny examples, with a $20 product, checking this box would change the way tax is calculated from this default:

20 * (.06 + .01) = $1.40 total tax

To this compound calculation:

Calculate PA Tax
(20 * .06) = 1.20 PA Tax

Add that PA Tax to the Total
20 + 1.20 PA Tax = 21.20 New Total

Now Calculate Allegheny Tax based on New Total
21.20 * .01 = .21 Allegheny Tax

The total cost, with all compound tax, then becomes $21.41.

Leaving this box unchecked, the total tax is just:
20 * .07 = 1.40 Total Tax

Making our total price $21.40. This could very considerably more with larger tax percentages.

Shipping
Check this if the tax should apply to any shipping costs.

You can add as many tax rates as you’d like here, making Woo’s built in taxation system completely sufficient for nearly any situation…though not necessarily easy to maintain with more than a few.

If you know you have more complicated tax needs, you can look into paid services like the many Woocommerce tax add-ons, which can handle all of the many tax zones in the world for you.

Up Next: How to Move Categories in WordPress & Woocommerce