Magento 2 Tax Configuration: How to Add Tax Classes, Rules & Rates, Tax Rates Import & Export

- E-Commerce, Magento 2

Magento 2 Tax Configuration

Today, we’d like to draw your attention to the Magento 2 tax configuration. You will learn what the Magento 2 estimate shipping and tax feature is and how it works. Next, we move to the Magento 2 tax class configuration. You will learn how to add new tax classes. Besides, this section describes Magento 2 tax rules and rates. You will learn how to add them.

After that, we proceed to the Magento 2 tax rate export and import. You will learn how to compose a CSV with tax rates suitable for Magento 2. Importing taxes can save time when moving to another store, or migrating from Magento 1. We also shed light on a third-party tool that can help you automate this process. 

What Is The Magento 2 Estimate Shipping And Tax Panel?

A shopping cart page is the first place where your e-commerce clients encounter taxes. There’s a panel labeled Estimate Shipping and Tax in Magento 2. Your customer can use it to calculate the tax and shipping based on the country (and state/province) selected from the drop-down menus in the block. Below, we focus on the tax part of this story. So, let’s see, how the Magento 2 estimate shipping and tax feature works. 

In Magento 2, the estimate shipping and tax functionality is implemented as follows:

  1. Add a product to the cart.
  2. On a cart page, click the Estimate Shipping and Tax in the Summary block.
  3. The section displays where you can select a country, state (province), and zip code.
  4. The selected information is used in the Magento 2 tax calculation.

magento 2 estimate shipping and tax cart section

Step-By-Step Magento 2 Tax Configuration

Now, let’s explore how different tax classes are implemented in Magento 2. You can assign a Magento 2 tax class to customers, products, and shipping. The platform analyzes a customer’s shopping cart to calculate the appropriate tax according to the following three parameters:

  • Customer tax class. In Magento 2, you can have multiple customer tax classes assigned to different customer groups.
  • Product tax class. The platform lets you create products and assign them to specific tax classes.
  • Region tax class. It is also possible to charge an extra tax on shipping. You can designate a specific Magento 2 tax class for shipping determined by the customer’s shipping address, billing address, or shipping origin.

Note that you can create a new tax class when a tax rule is defined. Magento 2 tax rules incorporate a combination of product class, customer class, and tax rate. We focus on that below.

How to Add Magento 2 Tax Class

Follow these steps to configure tax classes in Magento 2:

  1. Go to Admin -> Stores -> Settings -> Configuration.
  2. In the left panel, expand Sales and choose Tax.
    Add Magento 2 Tax Class
  3.  Now, you need to expand the Tax Classes section situated at the top of the list.
    Add Magento 2 Tax Classes for shipping, products, customers
  4.  Specify the tax class for each of the following (you may need to deactivate the Use system value option):
    • Tax Class for Shipping;
    • Default Tax Class for Product;
    • Default Tax Class for Customer.
  5.  That’s it, click Save Config when finished.

How to Add Tax Rules in Magento 2

In Magento 2, you can easily add tax classes for customers and products and then assign them to individual customers and products or use them in tax rules. You can do that while creating new tax rules. You can also specify new tax rates while creating a Magento 2 tax rule. Below, we explore both processes. Follow these steps to create a Magento tax rule:

  1. Go to the Admin sidebar and proceed to Stores -> Taxes -> Tax Rules.
  2. Click the Add New Tax Rule button.
    Add Magento 2 Tax Rules
  3. Specify the name of the new Magento 2 tax rule.
  4. And choose a tax rate.
    Add Magento 2 Tax Rules: tax rule information
  5. Click the Add New Tax Rate button to create a new tax rate in Magento 2.
    • Specify a Tax Identifier;
    • Decide whether a zip code should define a range of your new tax rate;
    • Select a state;
    • Choose a country;
    • Specify a new Magento 2 tax rate;
    • Click Save
      Add Magento 2 Tax Rules: new tax rates
  6. Now, let’s see how to add a Magento 2 tax class:
    • Expand the Additional Settings section.
    • Click Add New Tax Class under Customer Tax Class.
    • Specify the Name of the new tax class.
    • Now, you can add the new class to the list of available customer tax classes by clicking the checkmark.
    • Apply the same actions to the Product Tax Class section.
    • Specify Priority and Sort Order.
    • You can also enable the Calculate Off Subtotal Only feature.
      Add Magento 2 Tax Rules: additional settings

That’s how you add new Magento 2 tax rules. Don’t forget to save it before proceeding to the next task.

How to Add Magento 2 Tax Rate

Now, let’s explore an alternative way of adding a tax rate in Magento 2. This time, you don’t need to create new Magento tax rules. Go to Stores > Tax Zones and Rates and click the Add New Tax Rate button. You are already familiar with this screen:

Add Magento 2 Tax rates

The available settings are pretty simple and are self-explanatory. Configure and save your new Magento 2 tax rate. 

Now, let’s export the tax table to see how it looks in Magento 2 CSV format and break down the tax attributes we will need to import taxes.

How to Export Magento 2 Tax Rates

To export a tax table navigate to System > Import and Export Tax Rates and click the Export Tax Rates button. You will get a CSV table with your store taxes. The table comes with the following tax attributes:

Attribute name Reference Values Values example
Code Tax Identifier Any characters allowed by Magento 2 for the Tax Name New Tax Name
Country Country Country name as per Magento 2 country table United States
State State Name of the state as per Magento 2 state table Alabama
Zip/Post Code Zip/Post Code Only numerals allowed 12345
Rate Rate Percent Only numerals allowed 10
Zip/Post is Range Zip/Post is Range 1 – Yes, the Zip/Post code ranges from to

0 – No, the Zip/Post code is not a range

Range From Range From Only numerals allowed 12345
Range To Range To Only numerals allowed 54321

How to Import Magento 2 Taxe Rates

Knowing all the tax attributes and values, you can now import taxes from the same page System > Import and Export Tax Rates. It is a part of the Magento 2 tax configuration that can help you reduce manual tax rate management. The taxes should be imported in a Magento 2 formatted CSV table. You can get the pre-formatted table from Google Sheet Master Table: Tax Rates Import Table in Google Sheet.

import Magento 2 Tax rates CSV

The Tax Rates Google Sheets spreadsheet comes with a short description of every attribute and data validation for the columns where appropriate. The FireBear team has composed this Master Table to make sure Magento 2 merchants have all the necessary information to make import procedures in a matter of minutes instead of days. More information on this Google Sheet can be found in this post: Magento 2 Google Sheet Import post

Now, back to the import. For taxes, Magento 2 has a corresponding section called Import and Export Tax Rates. It is available under System > Import and Export Tax Rates

import Magento 2 Tax rates

You can import tax rates to Magento 2 as follows:

  1. Click the Browse button;
  2. Navigate to the Magento 2 tax rate import table;
  3. Hit Import Tax Rates.

If the table has been composed properly, your newly added taxes will be available within the Magento 2 store.

How to Automate Magento 2 Import of Taxes

If you are looking to automate import and export processes, pay attention to the Improved Import and Export extension by FireBear Studio. It not only provides the ability to use cron-based schedules but also supports such file formats as XML, JSON, Excel, and OpenOffice and lets you import Magento 2 data from Google Sheets, Dropbox, Google Drive, over FTP, or via API.  The extension also lets you import the Magento 2 FPT tax.

It is one of the must-have extensions for your Magento 2. Why? Here is the list of use cases:

  • Update your product catalog automatically every week – ask your supplier to post updates in the Google Sheets and configure an import job.
  • Integrate your ERP or CRM systems with Magento 2 using Rest API support of the extension.
  • Migrate from M1, Shopify, and Prestashop, or transfer all data from your old Magento 2 in a few clicks – the import jobs support attribute mapping and come with the mapping presets.
  • Upload your custom-formatted Excel, CSV, and XML tables with products or customers to Magento 2. For CSV and Excel, the extension offers separator mapping, and it comes with XSLT transformation support for XML.

The use of the extension is limited only by your wishes. For the full list of features visit the Improved Import and Export product page and check out the explicit Magento 2 import Guide List we have composed for you.

Final Words

As you can see, the Magento 2 tax configuration is simple and intuitive. It won’t take much time if you want to add new tax classes or add Magento 2 tax rules. Even the built-in import and export interface works well when you need to import tax rates to Magento 2. However, if you need more extended import and export functionality that covers not only taxes but also other entities, pay attention to the Improved Import & Export extension. It can help you import FPT taxes and other entities to your website in a matter of a few clicks.

Get Improved Import & Export extension for Magento 2