Log in
Model

TaxCalculation

Magento\Tax\Model\TaxCalculation

What it does

TaxCalculation is the core model responsible for calculating taxes on quotes and orders in Magento 2.

Developers use this class when they need to compute tax amounts, rates, and details for items, including handling parent-child item relationships and various tax calculation algorithms.

It's typically used during checkout, order creation, or when displaying product prices with tax.

Public Methods

  • calculateTax()
  • getDefaultCalculatedRate()
  • getCalculatedRate()
  • _resetState()