After July 2021, the 2.3.x release line no longer received quality updates or user guide updates. PHP 7.3 reached end of support in December 2021, and Adobe Commerce 2.3.x reached end of support in September 2022. We strongly recommend upgrading to Adobe Commerce 2.4.x to help maintain PCI compliance.

Import/Export Tax Rates

This site contains archived merchant documentation for a version of Adobe Commerce and Magento Open Source that has reached end-of-support. The documentation available here is intended for historical reference only and is not maintained. The Adobe Commerce Merchant Documentation for current releases is published on the Adobe Experience League.

If you conduct business in several states and ship a large quantity of product, entering tax rates manually can be very time consuming. It is faster and more efficient to download tax rates by ZIP code and import them into Magento. The following example shows how to import a set of state-specific tax rates downloaded from the a trusted source. Avalara provides tax rate tables, that you can download at no charge, for every ZIP code in the United States.

If you are interested in automating your sales and use tax compliance and reporting, Magento versions 2.2.4+ and 2.3.0+ offer Vertex Cloud as a trusted, built-in option. You can also find Magento-trusted options on the Adobe Commerce Partners site.

Step 1: Export the Magento Tax Rate Data

  1. On the Admin sidebar, go to System > Data Transfer > Import/Export Tax Rates.

  2. Click Export Tax Rates.

  3. Look for the file in the download location for your web browser.

  4. Save and open the file in a spreadsheet.

    This example uses OpenOffice Calc.

    The exported Magento tax rate data includes the following columns:

    • Code
    • Country
    • State
    • Zip/Post Code
    • Rate
    • Range From
    • Range To
    • A column for each store view

    Exported data - tax rates Exported Tax Rate Data

  5. Open the new tax rate data in a second instance of the spreadsheet, so you can see them side by side.

  6. In the new tax rate data, take note of any additional tax rate data that you might need to set up in your store before the data is imported.

    For example, the tax rate data for California also includes:

    • TaxRegionName
    • CombinedRate
    • StateRate
    • CountyRate
    • CityRate
    • SpecialRate

    If you need to import additional tax zones and rates, you must first define them from the Admin of your store and update the tax rules as needed. Then, export the data and open the file in OpenOffice Calc, so it can be used for reference. However, to keep this example simple, we import only the standard tax rate columns.

Step 2: Prepare the Import Data

You have two spreadsheets open, side by side. One contains the Magento export file structure, and the other contains the new tax rate data that you want to import.

  1. To create a place to work in the spreadsheet with the new tax rate data, insert as many blank columns at the far right as needed to add data from the Magento export file. Use cut-and-paste to add the data and then rearrange the columns so they match the order of the Magento export data file.

  2. Rename the column headers to match the Magento export data.

  3. Delete any columns that have no data.

    Otherwise, the structure of the import file should match the original Magento export data.

  4. Before saving the file, scroll down and make sure that the tax rate columns contain only numeric data.

    Any text found in a tax rate column will prevent the data from being imported.

  5. Save the prepared data as a .CSV file.

    When prompted, verify that a comma is used as a Field delimiter and double quotes as the Text delimiter. Then click OK.

Step 3: Import the Tax Rates

  1. On the Admin sidebar, go to System > Data Transfer > Import/Export Tax Rates.

  2. Click Browse and choose the CSV tax rate file that you prepared to import. Then, click Import Tax Rates.

    It might take several minutes to import the data. When the process is complete, the The tax rate has been imported message appears. If you receive an error message, correct the problem in the data and try again.

  3. On the Admin sidebar, go to Stores > Taxes > Tax Zones and Rates.

    The imported rates appear in the list.

  4. Use the page controls to view the new tax rates.

    Data import tax rates Imported Tax Rates

  5. Run some test transactions in your store with customers from different ZIP codes to make sure that the new tax rates work correctly.