t:ToolNivoFREE ONLINE TOOLSFile to PDF

INVOICE GUIDES

Invoice Tax and Discount Calculation: Worked Examples

A total is easier to trust when you can reproduce it. This guide explains the calculation order used by ToolNivo's invoice generator and shows the effect of discounts, tax, shipping and previous payments. It describes the tool's arithmetic, not the tax rules for a particular country.

The calculation order

  1. Round each unit price to the selected currency's decimal precision.
  2. Multiply each quantity by its rounded unit price, then round the line amount.
  3. Add the line amounts to produce the subtotal.
  4. Subtract the percentage or fixed-value discount.
  5. Calculate the entered tax percentage on the discounted subtotal. Include shipping in that base only if the taxable-shipping option is enabled.
  6. Add tax and shipping to obtain the total.
  7. Subtract Amount Paid to obtain the balance due.

Example with a percentage discount

Start with a USD 100.00 subtotal, a 10% discount, 20% tax, USD 5.00 shipping and USD 30.00 paid. With shipping excluded from the tax base, the discount is USD 10.00, the discounted subtotal is USD 90.00 and the tax is USD 18.00.

StepUSD
Subtotal100.00
Discount−10.00
Tax on 90.0018.00
Shipping5.00
Total113.00
Paid30.00
Balance due83.00

If you enable taxable shipping for the same example, the tax base becomes USD 95.00. Tax is USD 19.00, the total becomes USD 114.00 and the balance is USD 84.00. Use that option only when it matches the calculation you need.

Fixed discounts and decimal quantities

A fixed discount subtracts the entered currency amount rather than a percentage. On a USD 100.00 subtotal, a fixed USD 15.00 discount leaves USD 85.00 before tax and shipping. The editor rejects a discount larger than the subtotal instead of creating a negative discounted amount.

For 1.5 units at USD 19.99, the unrounded product is 29.985 and the rounded line amount is USD 29.99. ToolNivo uses decimal inputs and integer currency units internally, with half-up rounding. Enter 1.5 with a dot, not a comma or a thousands separator.

Currency precision and overpayments

JPY normally uses zero decimal places in the editor, USD uses two and KWD uses three. Changing the currency changes that precision and the displayed code; it does not fetch an exchange rate or convert your prices. Review all rates if you switch currencies after entering them.

If Amount Paid is greater than the total, the balance due becomes zero and the excess is shown as credit. It does not automatically refund money. Entering payment figures is manual: no bank or payment gateway is connected.

Check whether this model fits your invoice

The editor applies one tax percentage to its defined base. It is not a tax engine for mixed item-specific rates, compound taxes or tax-inclusive price extraction. Confirm the required calculation before using it for a transaction with different rules.

Frequently asked questions

Is discount applied before tax?

Yes, in this tool the discount reduces the subtotal before tax is calculated.

Can the balance due become negative?

No. Excess payment is shown as a separate credit and the balance is zero.

Does changing currency convert prices?

No. It changes the currency code and decimal precision only.