How to Set Up Magento 2 Tax Rules: Tax Configuration

How to Set Up Magento 2 Tax Rules: Tax Configuration

Magento 2 Tax Rules involve product and customer classes combined with tax rates. Setting up the tax rules is an essential configuration for each order on a specific website. This setup reduces your workload and enhances the overall customer experience. It also ensures that Magento owners are in full compliance with tax regulations. This article covers essential aspects of taxes in Magento 2. It includes managing tax rates, setting up tax classes, and creating tax rules and calculations.

Key Takeaways

  • Learn how Magento 2 tax rules simplify tax management for your online store.

  • Explore the two-step process for setting up tax rules.

  • Learn how to establish tax classes for shipping and Magento 2 products, ensuring precise tax calculations for customers.

  • Explore the flexibility of different tax calculation methods based on your product pricing and shipping details.

  • Discover the significance of understanding tax zones and rates to apply taxes accurately.

  • Learn how to manage currency and tax rules effectively in a multi-site configuration.

What are Magento 2 Tax Rules?

Magento 2 Tax Rules play a crucial role in the order process, as they are designed to be associated with specific customer tax classes and product tax classes. They are all linked to a particular tax rate. This configuration ensures that tax calculations are applied accurately to each order. It helps you manage taxes seamlessly in your Magento 2 store.

Every product is assigned a product class, and every customer is assigned to a customer class. After configuring these rules, the Magento 2 system thoroughly analyzes each customer's shopping cart.

It then automatically calculates the applicable tax based on the product classes, customer classes, and region. This tax is determined by the customer's shipping or billing address.

How to Set Up Tax Rules In 2 Steps

Step 1: Provide Tax Rule Information

  1. Access the Admin panel and navigate to Stores > Taxes > Tax Rules.

  2. In the upper-right corner, click Add New Tax Rule.

  3. Enter the name of your new rule under Tax Rule Information.

Magento 2 Tax Rule Information Setup

  1. Next, select the applicable Tax Rate for this rule.

Note: If you need to modify an existing tax rate, simply hover over the respective tax rate and click the Edit icon. After you’ve made your adjustments, remember to Save the changes.

To input tax rates, you can choose between two methods:

Method 1: Manual Entry

  1. Click Add New Tax Rate.

  2. Fill out the required form.

Manual Entry for Tax Rates in Magento 2

  1. Once the form is complete, click Save.

Method 2: Import Tax Rates

Note- Prepare a CSV file with your tax rates to speed up the process.

  1. Scroll down to the bottom of the Add New Tax Rules page.

  2. Click Choose File and select the CSV file containing the tax rates for import.

Importing Tax Rates in Magento 2

  1. Click Import Tax Rates.

Note: To export tax rates, use the Export Tax Rates option.

Step 2: Configure Additional Settings

After creating your tax rule, you must establish additional parameters, such as specifying which products and Magento customer groups the rule applies to. The calculation is based on this subtotal.

  1. On the Tax Rule page, click Additional Settings.

Configuring Additional Tax Settings in Magento 2

  1. Choose the Customer Tax Class to which the rule should be applied.
  • To create a new tax class, click Add New Tax Class, complete the required form, and Save it.
  • If you need to modify a tax class, click the Edit icon, make your updates, and Save the changes.
  1. Similarly, choose the Product Tax Class to which the rule applies.
  • To create a new tax class, click Add New Tax Class, complete the form, and Save it.
  • To modify an existing tax class, click the Edit icon, update the form, and Save the changes.
  1. When multiple taxes apply, you must assign a priority by specifying a number in the Priority field.

  2. To calculate the tax based on the order subtotal, tick the Calculate off Subtotal Only checkbox.

  3. Set the Sort Order to organize your tax rules as needed.

  4. Once all these settings are configured, click Save to ensure your changes are applied.

General Tax Settings

  1. Access tax settings in your Magento store by following: Stores > Settings > Configurations > Sales > Tax.

General Tax Settings Overview in Magento 2

  1. The first step is to review the general tax settings. These include the Vertex Tax Class, Calculation settings, and Price Display settings, initially set as Use system value by default.

  2. After making the necessary changes, Save your configuration by clicking the Save Config button.

  3. If you have a multi-site configuration, specify the Store View for the website and store to which you want to apply these settings.

1. Vertex Settings and Tax Classes

Vertex Tax classes are vital for assigning taxes to customers, products, and shipping. Magento's system analyzes the contents of each customer's shopping cart to calculate the appropriate tax.

It considers the customer's class, the product’s class in the cart, and the geographical region (based on the customer's shipping address, billing address, or shipping origin).

Vertex Settings and Tax Classes in Magento 2

For tax classes, set up Tax Class for Shipping and Default Tax Class for Product. Both of them have similar options to choose from.

  • Taxable Goods
  • Refund Adjustments
  • Gift Options
  • Order Gift Wrapping
  • Item Gift Wrapping
  • Printed Gift Card
  • Reward Points

Note 1- You can set different tax classes when creating a product except for the default tax class in the configuration.

Retail Customer is the default option Magento provides. However, you can create different customer tax classes in your store and assign them to customer groups. It ensures each customer belongs to some specific tax class.

Note 2: When creating tax rules, you can add tax classes in Magento 2.

2. Calculation Settings

These Magento settings will dictate how taxes are calculated for your online store, considering factors like product prices, shipping details, and discounts.

Tax Calculation Settings in Magento 2

  1. Choose how taxes are calculated in the Tax Calculation Method Based On field. You have three options, including:
  • Unit Price: This option calculates taxes based on the individual price of each product.

  • Row Total: It computes taxes as the sum of products in the cart without considering any discounts.

  • Total: Taxes are calculated on the total order amount.

  1. Determine the address on which tax calculation should be based. You can select one of the following options:
  • Billing Address: Taxes will be calculated according to the customer's billing address.

  • Shipping Address: Taxes are based on the customer's shipping address.

  • Shipping Origin: Taxes will be calculated with respect to the shipping origin.

  1. Decide whether prices entered from the Admin Panel include taxes for Catalog Prices.

  2. In the Shipping Prices field, choose if the shipping amounts entered from the admin panel include taxes in shipping prices.

  3. Choose when to apply customer tax, before or after discounts, in the Apply Customer Tax section.

  4. In Apply Discount on prices, choose from excluding or including tax for discounts on prices.

  5. Select whether you want to Apply Tax On custom prices, if available, or solely on the original price.

  6. In the Enable Cross-Border Trade field, choose Yes or No according to your requirements.

It's important to remember that these tax settings can vary based on your store's location. Ensure that these configurations align with your specific requirements and regional tax regulations.

3. Default Tax Destination Calculation

Default Tax Destination settings determine how taxes are calculated. These settings include:

Setting Default Tax Destination in Magento 2

  • Default Country (the country upon which tax calculations are based)

  • Default State (the state or province used as the basis for tax calculations)

  • Default Post Code (the ZIP or postal code used as the basis for local tax calculations).

4. Price Display Settings

Price Display Settings allow you to customize how product prices are shown. You have two options:

Magento 2 Price Display Tax Settings

  1. Show Product Prices in Catalog: This decides if you want to display prices on your website with or without taxes included.

  2. Shipping Prices: You can choose to show shipping prices with or without taxes included. You can also show both options at the same time.

These settings allow you to control how prices appear to your customers, making it easier for them to understand.

5. Orders, Invoices, and Credit Memos Display Settings

Configure shopping cart price display using Shopping Cart Display Settings. Options include:

Display Settings for Orders, Invoices, and Credit Memos in Magento 2

  1. Display Prices: Choose whether to show prices with or without taxes included.

  2. Subtotal: Decide how to display the subtotal, with or without tax.

  3. Shipping Amounts: Control how shipping costs appear, whether with or without tax.

You can also control the visibility of a full tax summary and decide whether to display a zero tax subtotal.

6. Fixed Product Taxes

Fixed Product Taxes Configuration in Magento 2

Fixed Product Taxes (FPT) apply to businesses in regions where specific products have fixed tax amounts. It is not dependent on a percentage of the product's price. To comply with your store's tax obligations, it's essential to configure FPT accurately according to your specific tax jurisdiction.

Tax Zones and Rates

Tax rates apply to specific geographical areas. You can use the Tax Zones and Rates tool to specify tax rates for collection. Each tax zone and rate has a unique identification, allowing for multiple tax rates in a single geographic region. For example, you can apply distinct tax rates to food, medicine, and other taxable goods in the same location.

The calculation of store tax primarily depends on the store's address. The system calculates the actual tax amount for a customer's order after they provide their information. Magento calculates the tax based on the tax configuration specific to the store.

To establish a new tax rate, follow these steps:

  1. Click on the Add New Tax Rate button.

Setting Tax Zones and Rates in Magento 2

  1. Fill in the Tax Identifier and Zip/Post Code fields.

  2. Select the State and Country where you intend to apply this tax rate.

  3. Enter the Rate Percent, which is used in the tax rate calculation.

  4. Finally, click Save Rate to complete the process.

Tips for Configuring Tax Rules in Magento 2

1. Understanding tax classes and rates

Tax classes are categories that determine how taxes are applied to specific products or customers.

There are default tax classes available, such as Default Product Tax Class and Retail Customer. You can also create custom tax classes if needed.

On the other hand, tax rates define the percentage of tax that needs to be charged. It is based on country, state, or zip/postcode criteria. You can manually enter these rates or import them using a CSV file.

2. Using Various Tax Zones and Rules

To effectively utilize different tax zones and rules in Magento 2, you can specify the Country, State, and Zip/Post Code where the tax should be applied. It allows you to customize tax rates based on specific geographical locations.

For example, if your store operates in different regions with varying tax regulations, you can set up separate tax rules for each zone.

3. Managing currency and tax rules for a multi-site configuration.

For managing currency and tax rules in a Magento 2 multi-site configuration, set up distinct websites with their currencies and tax settings. It allows you to cater to customers with specific tax requirements in different regions.

You can assign each website its own base currency and define the tax rates applicable to that particular site. It ensures your customers are charged the correct taxes based on location. It is applicable even when customers access your store from different websites within your multi-site configuration.


1. How can I set up Magento 2 tax rules for my online store?

To set up Magento 2 tax rules for your store, navigate to Admin Panel> Stores > Taxes > Tax Rules. Here, you can define and associate tax rules with specific tax rates. It ensures that your store calculates tax according to the product and customer classes.

2. What is the significance of the "store view" when configuring tax settings?

The store view is important when configuring tax settings because it lets you specify where they should be applied. It is particularly useful for multi-site configurations where you can define tax rules and rates for different store views. It helps ensure that your tax calculations are compounded for each view.

3. How do I create tax classes for my online store?

To create tax classes, go to the Tax Rule page and click on Additional Settings. You can select the customer and product tax classes to which the rule should be applied. This step helps categorize products and customers properly, ensuring accurate tax calculations.

4. Can I apply different tax rules to specific customer groups within my online store?

Yes, you can create customer tax classes and assign them to different customer groups. It allows you to apply specific tax rules to particular customer groups. It ensures that tax is calculated accurately based on the customer's class.

5. What does "compound tax" mean in the context of tax settings?

Compound tax refers to the ability to calculate tax based on the subtotal. It ensures that tax is calculated accurately when multiple taxes apply to a single order. It provides a transparent and precise tax calculation for your customers.

6. How can I ensure that my store's tax calculations align with specific regional tax regulations?

Setting up tax zones and rates is important to ensure your store's tax calculations align with regional tax regulations. It allows you to specify unique tax rates for different geographical areas. It helps ensure compliance with local tax regulations and accurate tax calculations for each region.


Magento 2 Tax Rules ensure accurate tax calculations for ecommerce stores. These rules simplify the tax configuration process. It combines product and customer classes with specific tax rates. This tutorial covered the setup of Magento 2 Tax Rules in two simple steps. It also explained different types of general tax settings, including vertex settings, tax classes, etc.

To optimize your Magento store's performance, consider the benefits of a dedicated Magento hosting server.

Maria Ajnawala
Maria Ajnawala
Technical Writer

Maria has over five years of expertise in content marketing, specialising in Magento insights and industry trends. She excels in creating engaging content that resonates within the Magento community.

Get the fastest Magento Hosting! Get Started