Issue with 2-Decimal Precision in VAT Calculation for Tax-Inclusive Pricing

Assalamu Alaikum,

We’ve encountered a technical challenge related to VAT calculation for tax-inclusive prices, in compliance with ZATCA’s guideline that requires rounding the subtotal to two decimal places before calculating VAT at 15%.

Scenario:
In the case of a grocery store selling multiple quantities of VAT-inclusive items, it becomes mathematically impossible to calculate an exact subtotal that leads to a final total price (including VAT) with 2-decimal rounding. Here’s a real-world example:

- Unit price (tax inclusive): 100 SAR
- Quantity: 13
- Expected total price: 1300.00 SAR

We are trying to find a net subtotal (P) such that:
P + round(P × 0.15, 2 decimals using half-up) = 1300.00
After exhaustive checks:

  • P = 1130.43 → VAT = 169.56 → Total = 1299.99
  • P = 1130.44 → VAT = 169.57 → Total = 1300.01
    It is mathematically impossible to hit exactly 1300.00 SAR unless more precision is allowed in the subtotal (beyond 2 decimals).

The Core Issue:
Because of the rounding of the subtotal before VAT is applied, grocery stores (or any high-volume retail environment) cannot guarantee that the system will output exactly 1300.00 SAR in such VAT-inclusive bulk sale scenarios, while staying within the 2-decimal constraint.

We would like to know:
Considering an invoice may have multiple line items with the same use case, what is the recommended approach to submit the invoices and avoid getting warnings?

We would appreciate any clarification.
Thank you,