Taxes are never fun, whether you’re paying or collecting them. However, when you’re running an eCommerce store with Magento, Taxes are brain pain talking point.

Let’s (OSCP will) explore how taxes work in Magento…

Magento Setup Taxes:

Magento allows you to apply different tax rates to different states or countries depending on your settings. Before setting up your taxes, make sure that you are familiar with the tax requirements of your locale. Then, you can complete the tax configuration as needed for your store.

If you buy a product from a Magento store, the sales tax you pay depends on “Tax Rules” and “Tax Zones and Rates”

1. Tax Rules: Tax rules put all the taxation elements together: product tax classes, customer tax classes, and tax zones and rates. Each tax rule consists of a customer tax class, a product tax class, and a tax rate.

Step 1: Fill the tax Rule Information

1. On the Admin Panel, Stores > Taxes > Tax Rules.

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

3. Under the Tax Rule Information section, set Name for the new rule.

4. From the tax rate list, choose one of them to enable for the rule. However, for each the existing tax rate, you can edit it as the following:

  • Tap the Edit icon on the row.
  • Edit the tax rate information on the Tax Rate page, then click Save.

To enter the tax rate, follow one of the methods:

Method 1: Enter Tax Rates Manually

  • Click on Add New Tax Rate.
  • Complete the Tax Rate form.
  • Save to complete.

Method 2 : Import Tax Rates

  • Under Adding Settings section
  1. Click on Choose File to upload the CSV file from your browser.
  2. Click on ` Import Tax Rates`
  • Hit the Export Tax Rates to export file

Step 2: Configure the Additional Settings:

  • On the Tax Rule page, open Additional Settings section,
  1. Choose the Customer Tax Class area to which the rule applies.
  1. Tap the Edit icon to modify the form and then Save it.
  2. If you need to create a new tax class, click on Add New Tax Class to fill the necessary information and then Save it.

2. Choose the Product Tax Class to which the rule applies.

  1. Tap the Edit icon to modify the form and then Save it.
  2. If you need to create a new tax class, click on Add New Tax Class to fill the necessary.

3. Set the Priority to determine this tax to be applied first when more than one tax is enabled

4. To calculate the tax according to the order subtotal, mark the Calculate off Subtotal only checkbox.

5. Set the Sort Order to arrange them in the list of the tax rules.

6. Click Save Rule to complete.

With the shopping cart of each customer, Magento examines and determines an appropriate amount of tax accordingly to the class of the customer, the class of the commodities in the cart, and the geographic region.

1.1 Tax Classes:

A. Configuring Tax Classes

To configure Tax Classes:

1. On the admin Sidebar, click Stores

2. Under Settings, choose Configuration.

3. In the Panel on the left under Sales, choose Tax

4. Expand the Tax Classes section. Then choose the tax class for each of the following:

a. Set the class for shipping

b. Default Tax Class for Product

c. Default Tax Class for Customer

5. When complete, click Save Config.

B. Adding New Tax Classes

  • Log in to your admin account.
  • Under Taxes, choose Tax Rules.
  • Click Add New Tax Rule. Then, expand the Additional Settings section.
  • Under Customer Tax Class, click Add New Tax Class.
  • Enter the Name of the new tax class in the text box. Then, click the checkmark to add the new class to the list of available customer tax classes.

C. Set Up the default Tax Destination for Calculation

  • On the Admin sidebar, click Stores.
  • Under Settings, choose Configure.
  • In the panel on the left under Sales, choose Tax.
  • Expand the Default Tax Destination Calculation section. Then, do the following
  1. Set Default Country to the country upon which tax calculations are based
  2. Set Default State to the state or province that is used as the basis of tax calculations.
  3. Set Default Post Code to the ZIP or postal code that is used as the basis of local tax calculations.
  • When complete, click Save Config.

1.2 Price Display Setting

1.Click to expand the Price Display Settings section. Then, do the following:

a. Set Display Product Prices in Catalog to one of the following:

  • Excluding Taxation
  • Including Taxation
  • Including and Excluding Taxation

b. Set Display Shipping Prices to one of the following:

  • Excluding Taxation
  • Including Taxation
  • Including and Excluding Taxation

2. Click to expand the Shopping Cart Display Settings section.

3. Click to expand the Orders, Invoices, Credit Memos Display Settings section. Then, select how prices and taxes are displayed in orders, invoices, and credit memos.

4. When complete, click the Save Config button.

2. Tax Zones and Rates: Tax rates generally apply to transactions that take place within a specific geographical area. The Tax Zones and Rates tool enables you to specify the tax rate for each geographical area from which you collect and remit taxes. Because each tax zone and rate have a unique identifier, you can have multiple tax rates for a given geographic area (such as places that do not tax food or medicine, but do tax other items).

To define a new Tax Rate

1. On the Admin sidebar, click Stores.

2. Under Taxes, choose Tax Zones and Rates.

3. In the upper-right corner, click Add New Tax Rate.

4. Enter a Tax Identifier.

5. To apply the tax rate to a single ZIP or postal code, enter the code in the Zip/Post Code field.

6. The asterisk wild card () can be used to match up to ten characters in the code. For example, 90 represents all ZIP codes from 90000 through 90999.

7. To apply the tax rate to a range of ZIP or postal codes, do the following:

a. Mark the Zip/Post is Range check box. Then in the Range From and Range To fields, enter the first and last ZIP or postal code to define the range.

b. Choose the State where the tax rate applies.

c. Choose the Country where the tax rate applies.

d. Enter the Rate Percent that is used for the tax rate calculation.

8.When complete, click Save Rate.