How To Set Up Magento 2 Tax Rules in 10 Minutes or Less

how to configure tax rules in magento 2

Tax rules are the essential aspects of e-commerce store management in Magento 2. Whether you’re a seasoned Magento user or new to the platform, understanding tax configuration is crucial for accurate tax calculations on your online store.

Tax rules are a combination of Product and Customer Class, Tax Zone, and Rate. Every customer will be assigned to a specific customer class; similarly, every product will be arranged to a product class. In Magento, the customer’s shopping cart will be analyzed and calculated with a certain amount of tax according to the customer and product classes they belong to, and the region (based on their shipping address, billing address, or shipping origin).

In this guide, we’ll walk you through the step-by-step process of setting up tax rules in Magento 2. From basic tax settings to advanced rule creation, we’ll cover everything you need to know to tailor tax calculations to specific products, customer groups, and geographical regions. Let’s get started!

How To Set Up Tax Rules In Magento 2?

Step 1: Go to the admin panel, navigate to STORES, and choose Tax Rules (under Taxes)

(Admin Panel => STORES => Tax Rules)

setup tax rules in magento 2

Step 2: Click on Add New Tax Rule

add new rules magento 2

Step 3: Add tax rule information

create new tax rules


First, you must set the rule name.

Second, choose among available tax rates applied to this new rule. To add the new tax rates, use one of these two methods:

  • Method 1: Enter tax rates manually

Click on Add New Tax Rate, then complete the form from Magento. When complete, click Save

enter manually

  • Method 2: Import tax rates

If you have the CSV file ready, you can use this method. It is quicker and easier to set the new tax rate in Magento. First, scroll down to the bottom of the page and explore the Adding Settings section:

Click Choose File button to upload the prepared CSV file.

Click the Import Tax Rate button.

Note: Click the Export Tax Rate button to export the file.

Step 4: Complete Additional Settings

You must expand the Additional Settings field to see it completely.

complete additional settings


First, you must select the Customer Tax Class and Product Tax Class belonging to this new rule.

  • To edit an existing customer tax or product tax class, tap the Edit icon and modify the form. Hit Save button when done.
  • To create a new tax class in Magento, tap Add New Tax Class. Complete the form as needed and Save. You can also create a new tax class.

Second, set priority for the rule by adding a specific number (lower numbers have higher priority). When there are 2 taxes with the same priority, they will be added. For example, Tax 1 (10%) and Tax 2 (5%) have the same priority, so the Total cost = product price + total tax (15%) x product price. Besides, if these taxes have different priorities (Tax 1 has higher priority), they will be compounded, so the Total cost = (product price + Tax 1 x product price) + (product price + Tax 1 x product price) x Tax 2.

Then, mark on the Calculate Off Subtotal Only if you want to calculate taxes based on the order subtotal.

Next, set the Sort Order to determine the order of this rule when listed with others on the checkout page.

In the next step, you should import the tax rates you must upload your CSV file and then click on the Import Tax Rates button. One more thing is that your CSV file should include: Code, Country, State, Zip/Post Code, Rate, Range from, Range to, and a column for each store view.

Finally, save the config to complete.

We have shown you 4 simple steps to create the new tax rule in Magento 2. If you have any problems when following this tutorial, be free to ask us by leaving a comment below. See you in the next tutorials!

Wrap Up

Configuring tax rules in Magento 2 is crucial for compliance and a seamless shopping experience. Throughout this guide, we provided clear instructions, examples, and tips to help you efficiently set up the new tax rate. Whether you needed basic settings or advanced rule creation, we covered everything you need to know.

By following the step-by-step process, you now have the knowledge and confidence to tailor tax calculations to specific products, customer groups, and geographical regions. Remember to periodically review and update your tax rules to stay compliant with changing regulations. We hope this guide has been valuable, and if you have any questions, feel free to reach out. Happy configuring!

Leave a Reply

Your email address will not be published. Required fields are marked *