# Totalling Algorithms

## 1. Highest tax rate in cart

In the above image the 20% tax rate is used for the shipping as it is the highest tax rate.

## 2. Lowest Tax Rate in Cart

In the above image the 10% tax rate is used for the shipping as it is the lowest tax rate.

## 3. Flat Tax Rate

The tax rate used for “Flat tax rate on taxable cart” is based on the selected “Tax class for shipping” via System > Configuration > Tax > Tax Classes.

In the above example the tax rate of the product is 10%, whereas the flat tax rate applied to shipping is 5%. This will only affect products that have a tax class assigned.

## 4. Highest value in the cart

In the above image the 20% tax rate is used for the shipping as it is assigned to the product with the greatest value.

## 5. Weight Proportion in Cart

The cart contains 1 x sofa piece (2lb) and 1 x phone (0.5lb) for a total of 2.5lb. The shipping is a flat rate of \$10.
• Proportion of cart weight of the sofa piece is 0.8 therefore the proportion of shipping charge is \$8 taxed at the sofa piece’s tax rate of 10% = \$0.80
• For the phone, the proportion of weight is 0.2 therefore the proportion of shipping charge is \$2 at a tax rate of 18% = \$0.36
• This gives a shipping tax total of \$1.16