I am sure you will agree that sales tax collection is amongst one of the most bothersome issues faced by ecommerce merchants. Though it seems so trivial, in the line of business, its reality is much more significant and so are its challenges. Dealing with not-so-fun elements such as calculating, collecting and paying taxes, requires careful consideration, certainty and a thorough understanding of applicable legislation. It is super easy to become overwhelmed once you branch out into various international markets, but we can’t let taxes be the reason to stop you. Now can we? Definitely, the answer to that is a clear no.
We want this to be as comfortable an experience as is possible, and for that we present you this comprehensive guide to set up and manage taxes. Bear in mind, this guide has been written based on Magento 2.3.x. However, this will in no way limit backward compatibility as previous Magento versions show no signs of significant change in tax setup.
The guidelines provided here will also work well with Magento 2 Commerce (Enterprise), Magento 2 Open Source (Community), and Magento Commerce Cloud.
Taxes and Magento 2
Let’s address the first question to come to mind, where do I go to configure tax settings? While using Magento 2, three areas require uncompromised attention.
- Tax Zones located in Stores
- Tax Rules located in Stores
- Tax located in Stores>Configuration>Sales
Following this order would most likely prove to be a favorable approach during sales tax configuration.
Tax Zones
Start in Magento Admin by clicking on Stores, and selecting Tax Zones and Rates from under the Taxes heading on the bottom left corner of the list of options on your screen. If you find sample rates already available, you can just delete and start fresh.
For the sake of clarity, let’s go through an example scenario together. Suppose you want to set an 8.3750% tax on all zip codes within the state of New York. You would add a new tax rate, looking just like this:

Let’s give it a second to sink in. So we have four mandatory fields to fill out one dropdown.
- Tax Identifier: Set a name yourself to be able to identify your tax zone and rate. The unique name you’d like to assign could be anything that helps you easily identify each rate. It comes in handy when you have expanded business and don’t have the time to go through an exhaustive directory.
- Zip/Post is Range: Select this option to set a range of zip codes that this new tax rate will apply to. Assign From and To zip codes and the system will apply the rate to each zip code that falls in between the defined limit.

- Zip/Post Code: Appears only when preceding field is disabled, it is used to define a particular zip code the rule will apply to. Here, we placed an asterisk (*) which implies that this rate will automatically be applied to all zip codes in your selected state and country. If you want to set the rate for a single zip code, you will simply mention that zip code in the field.
- State: Select the name of the state you wish to apply this rate to.
- Country: Select the name of the country this rate was created for.
- Rate Percent: Note down the percentage in decimal format representing the tax rate.
We have just set a zone and rate for New York, but haven’t created any Tax Rules that would activate this zone and rate. Think of this as half cooked, the sales tax is half applied so the customer will not face these charges yet.
Tax Rules
We have set a Tax Zone and Rate for New York, USA, now we are going to add a rule that will cause this tax zone and rate to apply. Go to Stores on your Admin Panel and click Tax Rules under the Taxes heading. Let’s add a new rule.

To define this rule: If a customer falls under the Retail Customer of the Customer Tax Class, and the item this customer has chosen to purchase is associated to a Product Tax Class of Taxable Goods then this will trigger the rule, US-NY-*-Rate 1, to kick in if this customer’s address is within the outlined zip code. This would be an accurate time to create a clear concept, remember if this rule is exclusively the only rule you have created, then any customer that doesn’t fall under these specifications won’t be charged a single penny in the name of tax (and it’s not like they were looking forward to being charged anyway).
Let’s take a minute and to ponder over the fields and what we have done to set this rule.
- Name: Name your tax rule absolutely anything under the sun, but your safest bet would be on a name that immediately conjures the function behind the rule.
- Tax Rates: Assign tax zones and rates to the new tax rule. This field allows you to apply a single rule to several zones and rates simultaneously. For example, say you want to apply the exact same rule for customers in Texas. While filing out this field you will select the tax rates you have created for both New York and Texas. Now, this doesn’t mean that the customer will face both charges according to tax in Texas and New York. The customer will only be charged according to the tax rate in their respective state.
- Customer Tax Class: Like the Tax Rates field you can select multiple customer tax class while implementing a single rule. Normally, you will have one customer tax class for all customers just like in our example, leaving this rule to apply to all customers. However, in some cases, you may end up with a type of customer who falls under an exempted category. If so that requires a new customer class, assigned to a specific group and separate zones and rates designated specifically for them.
- Product Tax Class: Magento 2 enables you to allocate one Product Tax Class to each product which helps you to pinpoint them with tax rules such as the one we just made. When each and every product is taxable you must make sure to select the same Product Tax Class for every product.
- Priority: Leave the default ‘0’ whenever you’d like to keep all tax rules on the same priority level. The function of this field is actually to give you a chance to display rule priority whenever you choose to apply more than one tax.
To understand Priority and how it works, you’ll need to grasp one concept: if you set the same priority to tax rates they are added, if not they’ll be compounded. We hope we didn’t lose you here, allow us to elaborate and don’t worry it will be short and simple.
Let’s imagine a tax setup with some minor adjustments. Assume that you need different tax rates for state and local taxes. This would mean you need two separate rates, as opposed to the single 8.3750% tax rate on all New York zip codes set earlier, 7 % being state tax and 1.3750% being local tax. (Note that this is just for the sake of understanding and is in no way the actual tax bifurcation for New York.) Because local tax is set at 1.3750% it doesn’t necessarily mean that all zip codes in New York will fall under the same local tax rate, meaning that some zip codes could be charged a different rate. Suppose the other zip codes are charged a 1% local tax rate, this would suggest that your customers in the latter zip codes are being charged an additional 0.3750%.
Obviously, this would require an immediate remedy. We would set one zone and rate to include all New York zip codes by filling out the Zip/Post Code field with an asterisk (*) and the Rate Percent field would be filled with 7%. Then, create separate Zones and Rates by setting ranges in the Zip/Post is Range field. One for the zip codes that are charged 1.3750% and one for the zip codes charged only 1%.
Let’s take minute to summarize. At this point, we have 3 separate Zones and Rates for New York only.
- All zip codes at 7%
- Range for zip codes at 1.3750%
- Range for zip codes at 1%
Okay, so now we get to the tricky part. For these zones and rates, we will imagine we have 3 rules to set them off separately. Now, let’s discuss the impact of same and different Priority settings.
- Priority at Same Level: Since the Priority is the same, all rates would be added. So a customer that lives in the zip code with a local tax of 1% will be charged only an additional 8% state tax. This means this customer will be charged a total of 8%.
- Priority at Different Level: Here, the tax with a higher priority will be charged first. If you set a high priority on 7%, the customer will first be charged 7% on the total price of the product. Then on this new total they would face additional tax according to their zip code. This is compounding, it can undoubtedly cause the charged sales tax to exceed the actual sales tax.
In order to exactly charge 8.3750%, you would want to set local and state rates on the same Priority level.
- Calculate off Subtotal Only: Place a check in the box when you choose to have separate tax rates with different priorities and don’t want to compound. This will allow the taxes to be added. This option is rarely used. If you aren’t using it, it will remain unchecked.
- Sort Order: Use to sort the order of tax rules if you have any preference, if not you can skip this field altogether.
- Import & Export: Import and export previously provided information, in a CSV format, to cut down manual input. This is only useful if you have set up similar information before.
Tax Settings
Settings consist of:
– Tax Classes
– Calculation Settings
– Default Tax Destination Calculation
– Price Display Settings
– Shopping Cart Display Settings
– Orders, Invoices, Credit Memos Display Settings
– Fixed Product Taxes
Tax Classes
For this section, we will move on to Stores > Configuration > Sales > Tax. You can assign Tax Classes to shipping, products and customers. When you define Tax Rules (like we did previously), you can create new Tax Classes

- Shipping Tax Class: Use this option if you charge additional tax for shipping.
Once you click on the Tax Classes dropdown arrow you’ll be shown a field with the name of Tax Class for Shipping. To many, this feels like the most puzzling element of Tax setup in Magento. We’ll just take it slow and break it down.
To be able to set a Tax Class for Shipping you will have to first uncheck the Use System Value checkbox. Afterwards, you will be given a list of, what are in fact, Product Tax Classes to choose from. You can get an idea with the help of the image below.

Product Tax Class and Customer Tax Class are two types of tax classes in Magento 2. Since Magento doesn’t have the option to deal with Shipping Tax Classes separately, we will use Product Tax Class to help set up.
To make set up smooth yet proper, you might want to create and name a Product Tax Class, “Shipping”. Remember, you don’t want to associate any products to this group, but more on this in detail in a later section.
- Default Tax Class for Product: Calculate and make certain the correct tax rate is charged in the customer’s shopping cart. Whenever you create a product, you will have to designate it to a product tax class as well. For example, edible goods might not be taxed or may be taxed at a separate rate from another type of good.
- Default Tax Class for Customer: Create unlimited Customer tax Classes to manage various customer groups and their corresponding applicable taxes.
For instance, sometimes a tax might be applicable on a retail purchase but not on a wholesale purchase of the same product. In such cases you could set up separate tax classes to avoid any tax miscalculations.
Calculation Settings
To adjust the settings that will be used to calculate tax, proceed to Stores > Configuration > Sales > Tax and click on the Calculation Settings drop down to expand.

Now, expand Calculation settings. You will find three fields which you will set to calculate tax. The image below shows the three options.

Let’s take a closer look at each field.
- Tax Calculation Method Based On: There are three methods to calculate tax, namely, Unit Price, Row Total and Total. To simplify it a little, we have added examples with each type of calculation. The example includes that a customer has purchased 2 sweaters and 2 shirts.

- Unit Price: This tax is calculated on the cost for each unit of each product in the customer’s shopping cart.
Example: With this method you would apply tax to each sweater and shirt
- Row Total: This tax is calculated on the price of total units of the each product separately.
Example: With this method you would apply tax to the total number of sweaters and then an independent tax on the total number of shirts.
- Total: This tax is calculated on the total, meaning all products.
Example: With this method you would apply tax to the total cost of both 2 sweaters plus 2 shirts.
- Tax Calculation Based On: This field is extremely important in the sense that the tax rate is dependent on what you choose here. As seen below, you will be given three options to choose from.
a. Shipping Address: The address receiving the order
b. Billing Address: The address receiving the bill
c. Shipping Origin: The address you have previously specified as a point of origin, from where the product will be sent.
The shipping and billing address options allow you to determine if the Tax Zone and Rate we previously outlined will be charged to the customer’s billing or shipping address. If you choose the last option, you will allow the system to determine Tax Zone and Rate by your own assigned Shipping Origin address.
(If you would like to add a Shipping Origin and haven’t done so before, visit Stores> Configuration> Sales> Shipping Settings)
- Catalog Prices: Control the possibilities of including or excluding tax in Catalog Prices. What you select in this field will tell Magento 2 if your product prices are including or excluding tax.

It is most common for merchants dealing in or with the US, to select the Excluding Tax option, mainly because tax varies between states. It would be unreasonable to add product prices with the tax incorporated in it.
However, European countries such as the UK charge pretty much a standard VAT, so merchants would favor selecting the Including Tax option and giving their customers an appealingly well rounded figure.
If you’re using an ERP which sends product prices to Magento, remember to check whether ERP is including or excluding a sales tax and adjust settings accordingly.
Shipping Prices: Use this option to specify if the cost of shipping includes or excludes tax.

If you depend on another source for shipping rates, you might want to make sure of whether tax has been included or not so you could adjust the settings.
- Apply Customer Tax: Choose to apply tax before or after all price reductions.

You can specify when to charge tax, in case of coupons or price rules. IT can easily be set to apply tax before or after discounts as in the image above.
- Apply Discount on Prices: Apply discounts on product price including or excluding tax.

- Apply Tax On: Calculate tax based on a specific price you have previously added or a special discounted price.

This setting will imply that Magento will always charge based on either the original product price you have set or a different price. The custom price could be a promotional offer or discounted price.
- Enable Cross Border Trade: Basically this option can best be summarized to allow you to choose if you will incur the cost of tax or will you pass it on to the customer.
This is a little complicated. To understand better, let’s focus on the warning that we have highlighted in the image below.

* “When catalog price includes tax, enable this setting to fix the price no matter what the customer’s tax rate.”
In case of US based merchants, this is most likely going to be set to No. But depending on what they are aiming for, it may differ for merchants based in the UK. This could best be outlined with an example. Let’s give it a try.
Imagine, you are based in the UK and supply goods within the EU. VAT for you is 20%. You have just entered 100 as the price of your product including VAT. You have surpassed the VAT threshold for France. If you ship to France you will charge France’s sales tax if shipping to France. Let’s suppose that France has a VAT of 25% as opposed to your 20%.
Now, moving forward, if Enable Cross Border Trade is set to No, anyone ordering from France will face the following:
a. Magento will calculate the product price without VAT, making the price 83.33 instead of 100
b. Then Magento will smartly consider 83.33 as the price prior to tax and will apply the 25% French VAT
c. Your customer will be shown a new price of 104.16
However, if Enable Cross Border Trade is set to Yes, anyone ordering from France will face the following:
a. Magento identifies 100 as the product price including VAT
b. It will efficiently remove France’s VAT of 25% instead of 20% out of the original 100
c. Your customer now knows they have been charged 100 including taxes
Default Tax Destination Calculation
For this particular configuration, you will from Stores > Configuration > Sales > Tax and then to the Default Tax Destination Calculation drop down.

This option is for all scenarios where you choose to show catalog prices including tax. Like for example, we said this could easily apply to UK. So your customers in UK will see only one price from product page to checkout.
Price Display Settings
Go from Stores > Configuration > Sales > Tax and expand the Price Display Settings drop down. Two fields are required here, just as seen below.

- 1. Display Product Prices In Catalog: This field provides three options.
a. Excluding Tax (normally for the US),
b. Including Tax (normally for Europe),
c. Including and Excluding Tax

No matter how similar it seems, you don’t want to confuse this with our previous settings. Before this we were just defining if prices would be entered with or without tax. This setting controls the actual display of prices with or without tax.
- Display Shipping Prices: This concept is an exact replica of the one above, only difference is that it applies to shipping instead of product prices.

Shopping Cart Display Settings & Orders, Invoices, Credit Memos Display Settings
Go from Stores > Configuration > Sales > Tax and expand the Shopping Cart Display Settings and also the Orders, Invoices, Credit Memos Display Settings drop down.

This essentially is for tax display purposes. You can use this to easily manage how you and your customer see tax related information, from order confirmation emails to their cart and even in Magento generated documents.
Fixed Product Taxes
From Stores > Configuration > Sales > Tax go to Fixed Product Taxes and click on the drop down.

To get some clarity, suppose particular taxes apply to particular products because of certain regulations. Now, by solely enabling FPT wouldn’t do anything but if you were to couple it with a specific product attribute you might find something functional.
To add a new attribute, go to Stores > Attributes > Product and then select Fixed Product Tax from the Catalog Input Type for Store Owner drop-down. Then navigate to Stores > Products > Attribute Sets, here create your FPT attribute. This is where products with a special tax are included.
In Magento if you add or edit a product with an FPT attribute associated to it, you will find the options below:

Well, that was a handful, now what?
We hope that this was helpful to you. But since this is such an important (and sometimes downright complicated) topic we would like to cover in detail. Here are a few other important links we believe will help ease the sleepless nights taxes can cause.