How are price calculations performed?

Prev Next

The basic principle

Discount and tax are calculated separately for each invoice line item and rounded to two decimal places only once, at the end. A line item is one line on the invoice, that is, one item with its quantity.

The calculation follows this order:

  1. A discount is applied to the unit price and rounded to the cent.

  2. Discounted unit price × quantity gives the line item amount.

  3. Net and tax are calculated from the line item amount and rounded once.

  4. The line items are added up to the invoice total.

Intermediate values are not rounded in advance. As a result, the tax per line item deviates from the exact value by at most half a cent, regardless of the quantity.


Gross prices and net prices

Which amount is fixed depends on whether a product is set up with a gross price or a net price. The other amount is calculated from it.

Gross price (common for consumers)

Net price (common for business customers)

Fixed

Gross = gross price × quantity

Net = net price × quantity

Net

Gross / (1 + tax rate), rounded

fixed

Tax

Gross − net

Net × tax rate, rounded

Gross

fixed

Net + tax

Example with a gross price: 100 items at 0.65 €, 19% VAT.

  • Gross: 100 × 0.65 € = 65.00 €

  • Net: 65.00 / 1.19 = 54.6218 → 54.62 €

  • Tax: 65.00 − 54.62 = 10.38 €


Discounts

A percentage discount is applied to the unit price and rounded to the cent. This way, the invoice shows a traceable discounted unit price, and the customer pays the same amount for every item.

Example: a 13% discount on 4.99 € results in 0.6487 €, rounded to 0.65 € discount per item. The discounted unit price is 4.34 €.

Tax is then always calculated from the discounted line item amount, never from the unit price.


Calculation example

An order with two items, a 13% discount and 7% VAT costs 46.88 €, of which 43.81 € is net and 3.07 € is tax.

Line item 1

Line item 2

Total

Gross unit price

4.99 €

8.99 €

Quantity

9

1

Discount per item (13%)

0.65 €

1.17 €

Discounted unit price

4.34 €

7.82 €

Total discount

5.85 €

1.17 €

7.02 €

Gross

39.06 €

7.82 €

46.88 €

Net (gross / 1.07)

36.50 €

7.31 €

43.81 €

Tax (gross − net)

2.56 €

0.51 €

3.07 €

Calculation for line item 1: 9 × 4.34 € = 39.06 € gross. 39.06 / 1.07 = 36.5047, rounded to 36.50 € net. Tax: 39.06 − 36.50 = 2.56 €.

Cross-check: 43.81 € × 7% = 3.0667 €, rounded to 3.07 €. This matches the tax shown on the invoice.


Single purchase and combined purchase

With gross prices, the customer always pays the same amount, whether they buy an item individually or several times in one order. The split into net and tax can differ by a few cents.

Example: line item 1 from the calculation example (discounted unit price 4.34 €, 7% VAT).

9 orders of 1 item each

1 order of 9 items

Gross

9 × 4.34 € = 39.06 €

39.06 €

Net

9 × 4.06 € = 36.54 €

36.50 €

Tax

9 × 0.28 € = 2.52 €

2.56 €

Both are correct. Each invoice is calculated on its own and rounded once. Because rounding differences do not add up evenly, several small invoices can result in a slightly different split in total than one large invoice.

With net prices, it is the other way round: the net amount is identical, the gross amount can differ by a few cents.

0.55 € net, 19% VAT

3 orders of 1 item each

1 order of 3 items

Net

1.65 €

1.65 €

Tax

3 × 0.10 € = 0.30 €

1.65 × 19% = 0.31 €

Gross

1.95 €

1.96 €


E-invoices (XRechnung, ZUGFeRD)

E-invoices follow the European standard EN 16931. It requires the tax per tax rate to be calculated from the sum of the net amounts and rounded once (rule BR-CO-17).

The calculation described above meets this rule. In the calculation example, 43.81 € × 7% results in exactly the 3.07 € shown on the invoice.

For the requirements and the download of e-invoices, see the article Electronic invoicing: requirements and administration.


Frequently asked questions

Why isn't the tax simply the tax per item × quantity?
The tax per item is already rounded. If you multiply it by the quantity, the rounding error grows with it. For 100 items at 0.65 €, this would result in 10.00 € instead of the correct 10.38 € tax.

The sum of my individual invoices differs by one cent from the combined invoice. Is this an error?
No, as long as the amount paid is the same for gross prices. Net and tax may differ by a few cents depending on how the items are split across orders.

How large can a rounding difference be?
At most half a cent per line item and tax rate, regardless of the quantity.

How do I recognize a genuine calculation error?
If the tax of a line item deviates by more than half a cent from net × tax rate. Or if, with gross prices, the customer pays different amounts for the same items depending on how they are split across orders.