Log in
Model

UnitBaseCalculator

Magento\Tax\Model\Calculation\UnitBaseCalculator

What it does

This calculator handles tax calculations on a per-unit basis for quote items in Magento 2.

Developers use this class when tax needs to be calculated for individual product units, supporting both tax-included and tax-excluded pricing scenarios.

It manages complex tax rounding, discount application, and multiple tax rate calculations to ensure accurate per-item tax amounts.