# Commerce shipping tax rate based on tax rate of line items

I have a shop with products that have 6% VAT & products with 21% VAT. The VAT rate that is applied to the shipping cost should depend on the VAT rate of the line item with the highest subtotal (excl VAT).

So the tax rate applied to the shipping cost can be either 6% or 21%, depending on what is ordered.

So for example:

```1 Item X (6%): €14 (incl) = €13.2 (excl)
1 Item Y (21%): €15 (incl) = €12.4 (excl)
The VAT applied to the shipping cost should be 6% (value item x > value item y)```
```1 Item X (6%): €14 (incl) = €13.2 (excl)
2 Items Y (21%): €15 x 2 (incl) = €24.8 (excl)
The VAT applied to shipping cost should be 21% (value items y > value item x)```

I'm guessing you would need an adjuster for this scenario, but have really no idea to how to solve this or how to even get started? Anyone has any idea how to achieve this?

Thanks!

• Could you link to the VAT regulation that supports this use case? Trying to understand the law/regulations behind this so we can look to support it. Thanks. Jul 13, 2022 at 9:27
• Unfortunately not, I only have a briefing from the accounting department. I did find a blog post explaining the situation (although they pick the lowest tax rate and not the highest as defined by my client). From how I understand it, in theory, the tax on the shipping should be calculated (and divided) based on what you order. But to keep it manageable, you are allowed to pick 1 rate and apply it to the shipping cost. blogbe.vgd.eu/en/optimal-management/tax/… Thanks!
– Fred
Jul 13, 2022 at 10:15
• @LukeHolder Do you think it is at all possible to somehow adjust the shipping cost tax based on what is ordered? Thanks!
– Fred
Aug 5, 2022 at 9:06
• Having exactly the same requirement for a Client in Germany Nov 21, 2022 at 15:48