Extra Tax Classes In Magento 2: Set Up Tax Rules & Product Tax

Extra Tax Classes In Magento 2: Set Up Tax Rules & Product Tax

Are you looking to optimize your eCommerce store with extra tax classes in Magento 2? Adding extra tax classes can help manage different tax classes when creating new tax rules and rates.

This tutorial provides a step-by-step guide to set up Magento 2 tax classes for customers.

Key Takeaways

  • Learn how to configure default product tax classes when creating a product with local tax laws.
  • Understand how tax classes can be assigned to customer groups and products.
  • Gain insights into how to assign a product class with zero tax subtotal.
  • Get an overview of how to configure tax rates in the default tax class for products.
  • Discover how to specify the tax according to the product calculated in the tax calculation.

What Are Extra Tax Classes In Magento 2?

Explanation of extra tax classes in Magento 2

Extra tax classes in Magento 2 are custom categories used to define multiple tax rates for specific products or customer classes.

Magento 2's tax class system supports intricate, multi-regional tax configurations. By using extra tax classes, store owners ensure compliance with local tax regulations. For example:

  • Tax classes can be established for each state or country where you conduct sales.
  • Within each geographic tax class, further subdivisions can be made based on product type.
  • Different customer groups, such as wholesale and retail, can each have their own tax classes.

New tax classes in Magento 2 offer detailed control over tax applications. For example, you could create separate tax classes for:

  • Digital goods vs. physical products
  • Food items vs. non-food items
  • Luxury goods vs. essential items

Benefits Of Implementing Extra Tax On Shipping

1. Compliance with tax regulations

Avoid legal penalties and maintain good standing with tax authorities. Collect and remit taxes on shipping fees as required by local laws and regulations. Implement this when your business has a tax obligation on shipping charges.

2. Accuracy in tax calculations

Magento 2 enables you to create distinct tax classes for shipping methods. Some regions have separate tax regulations for shipping charges, distinct from those for products. Additionally, different product types might be subject to specific shipping tax rules. For example, you can set up:

  • A "Standard Shipping" tax class with standard sales tax.
  • An "Oversized Item Shipping" tax class with a different rate.
  • A "Digital Product Shipping" tax class with no tax.

This setup ensures compliance with intricate shipping tax regulations. It helps you avoid overcharging or undercharging customers.

3. Flexibility for different shipping scenarios

Create multiple tax classes for shipping to handle different product types and delivery methods. Accommodates cases where shipping may be taxed differently. Implement this if your store has diverse shipping needs requiring distinct tax treatments.

4. Ease of Accounting and Reporting

Magento tracks shipping taxes as a separate line item in sales reports and exports. Simplify accounting by having shipping taxes broken out for reporting and remittance. It is helpful for bookkeeping, especially during tax filing and audit periods. Separating shipping taxes as a distinct line item helps you to:

  • Promptly verify the correct shipping tax collected on each order.
  • Provide a breakdown of product tax versus shipping tax during a tax audit.
  • Assess your true shipping costs and adjust pricing or policies as needed.
  • Simplify compliance with jurisdictions that require distinct reporting of shipping taxes.

4 Steps To Add New Tax Rate In Magento 2?

  1. Navigate to Stores > Tax Zones and Rates.

Navigating to Tax Zones and Rates in Magento 2

  1. Click on the 'Add New Tax Rate' button.

Adding a new tax rate in Magento 2

Check the example below to configure and save your new tax rate.

Configuring and saving new tax rate in Magento 2

  1. Export the tax table to view it in Magento 2 CSV format.
  2. Examine the tax attributes needed for importing taxes.

How To Export Magento 2 Tax Rate?

  1. Go to System > Import and Export Tax Rates.

Import and export tax rates in Magento 2

  1. Click on the 'Export Tax Rates' button.

Exporting tax rates in Magento 2

Check the example below to generate a CSV file containing your store's tax information.

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

7 Steps To Configure Magento 2 Tax Rates For Import?

  1. Navigate to System > Import and Export Tax Rates.
  2. Obtain the pre-formatted table from the Google Sheet Master Table.
  3. Import the CSV file.

Obtaining pre-formatted table for tax rates

  1. Navigate back to System > Import and Export Tax Rates.
  2. Click on the 'Browse' button.

Browse button for importing tax rates in Magento 2

  1. Go to the Magento 2 tax rate import table.
  2. Select 'Import Tax Rates'.

How To Automate Classes For Customers?

1. Automate Product Catalog Updates

Schedule automatic weekly updates to your product catalog. Ask your supplier to post updates in Google Sheets and configure an import job.

2. ERP and CRM Integration

Integrate your ERP or CRM systems with Magento 2 using the extension's REST API support.

3. Data Migration

Migrate from M1, Shopify, and Prestashop, or transfer data from your old Magento 2 store. The import jobs support attribute mapping and include mapping presets.

4. Custom Data Uploads

Upload custom-formatted Excel, CSV, and XML tables with products or customers to Magento 2. It offers separator mapping for CSV & Excel and XSLT transformation support for XML.

Difference Between Vertex & Standard Magento Tax Classes

Attribute Vertex Tax Classes Standard Tax Classes
Source Provided by the Vertex tax extension bundled with Magento 2 since version 2.2.4 Part of Magento's core functionality
Purpose Integrates with Vertex, a cloud-based tax solution, for automating sales & use tax compliance Provides basic product and customer tax categorization within Magento's default tax settings.
Configuration Configured under Stores > Configuration > Sales > Tax > Vertex Tax Classes. Set up under Stores > Configuration > Sales > Tax > Tax Classes
Pre-defined classes Includes classes like Vertex_Taxable Goods and Vertex_Refund Adjustments Includes Taxable Goods, None, Retail Customer, Wholesale Customer, etc.
Calculation logic Works with Vertex tax calculation and address validation APIs. Determines accurate taxes based on jurisdiction Relies on Magento's default tax calculation logic based on tax rules. Tax rules incorporate a combination of product/customer classes and rates.
Additional features Manages exception certificates, generates signature-ready PDF returns, supports cross-border VAT determination Limited to basic tax calculations within Magento.
Integration Requires configuring a Vertex account and enabling the Vertex integration in Magento Works out-of-the-box with Magento's native tax functionality

Troubleshooting Solutions For Tax Calculation Issues

Issue Troubleshooting Steps
Tax not calculating correctly - Verify shipping origin matches tax rule country
- Ensure catalog prices are set to 'Excluding Tax' if entering prices without tax
- Check customer tax class if the tax rule matches the customer group tax class
- Confirm 'Tax Calculation Method Based On' setting is correct for the region
Taxes not calculating at all - Check site is not in development mode
- Clear Magento cache
- Reindex data
- Verify tax configuration settings
Tax amounts differ from the expected - Confirm tax zones, rates, and rules are set up properly
- Check if multiple conflicting tax rules are applying
- Verify FPT attribute is assigned correctly to products
- Test calculations as guest and logged-in customer
FPT (Fixed Product Tax) issues - Ensure 'Enable FPT' is set to "Yes"
- Check FPT attribute is created and applied to products
- Verify no conflicting tax rules affect FPT
- Confirm currency settings for FPT
Rounding errors in tax amounts - Set 'Tax Calculation Method Based On' to "Row Total"
- Configure consistent tax settings for shipping, discounts
- Consider using a 3rd party tax service for complex scenarios
Tax not showing in cart/checkout - Check if tax is applied before or after the discount in the settings
- Verify product prices include or exclude tax as needed
- Confirm display settings for tax in cart and sales documents
Slow tax calculations - Upgrade to the latest Magento version for performance improvements
- Review and optimize tax rules and settings
- Consider 3rd party tax services for faster calculations
VAT number not saving on registration - Check vat_id customer attribute settings in the database
- Verify VAT number validation is enabled
- Test the registration process and check for errors
Issues after Magento 1 to 2 migration - Import tax zones and rates to Magento 2
- Manually recreate tax rules in Magento 2
- Verify migrated tax data and settings
- Test tax calculations thoroughly after migration


1. How do I know which tax class to use?

It depends on your product and the class of the customer. Refer to your local tax laws to include tax in order total.

2. How do I update a tax rate?

Navigate to Stores > Tax Zones and Rates. Select the tax rate you want to update and click on 'Save'.

3. Can I display a full tax summary in the order total?

Yes, you can configure Magento 2 to display a full tax summary in the order total. This setting can be adjusted in the tax configuration section. It allows customers to see a breakdown of taxes applied to their purchases.

4. How does Magento calculate tax for products assigned to different tax classes in the same shopping cart?

Magento calculates the appropriate tax according to each product's assigned tax class. The tax calculation method works on the basis of local tax calculations. It ensures accurate tax calculation for each item in the shopping cart of each customer.

5. Can I configure Magento 2 tax rules to use different rates based on the shipping destination?

Yes, Magento 2 tax configuration allows you to configure tax classes to a customer class. Configure the default tax for products to display a full tax summary.



Adding extra tax classes in Magento 2 can improve your store's tax management system. It helps you to:

  • Ensure compliance with different tax classes.
  • Apply the correct tax rules and calculations to your customers and products.
  • Set different tax classes and add tax classes based on the tax zones and rates tool.
  • Accurately calculate the taxes during the checkout process.
  • Streamline manual tax rate management.

Consider dedicated Magento hosting plans to incorporate a combination of product classes assigned to a customer class.

Dikshya Shaw
Dikshya Shaw
Technical Writer

Dikshya leverages her content marketing and writing proficiency to deliver fresh, insightful content. Her meticulous research ensures industry expertise and emerging trends within the Magento landscape.

Get the fastest Magento Hosting! Get Started