Reverse tax done properly
Taking tax out divides by 1 plus the rate. The wrong answer, subtracting the rate from the total, is shown beside the right one with the gap in money.
Add sales tax, VAT, or GST to a price, take it back out of a total the right way, find the rate from a receipt, and itemise lines with exact-cent rounding.
$108.25 including sales tax. Sales tax is $8.25 at 8.25%.
United States: there is no national sales tax. States, counties, and cities set their own rates, so the rate depends on where the sale takes place. Enter each one as its own row.
An exact half of the smallest unit rounds up, so 0.125 becomes 0.13.
$100.00 plus $8.25 of sales tax at 8.25%.
Your rate next to the example rates, each worked on the price before sales tax.
| Rate | Example | Sales tax | Total |
|---|---|---|---|
| 8.25%Your rate | Your rates combined | $8.25 | $108.25 |
| 5% | Canada GST, India GST | $5.00 | $105.00 |
| 10% | Australia GST, Japan consumption tax | $10.00 | $110.00 |
| 15% | New Zealand GST | $15.00 | $115.00 |
| 18% | India GST | $18.00 | $118.00 |
| 19% | Germany VAT | $19.00 | $119.00 |
| 20% | UK VAT, France VAT | $20.00 | $120.00 |
4 lines: $3.08 sales tax, total $60.53. Rounding each line gives $0.01 less sales tax than rounding the total.
Quantity × unit price on each line, taxed or exempt, using the rate above. Both rounding methods are worked out so you can see where they part.
Rounding each line gives $0.01 less sales tax than rounding once on the subtotal, because each line's fraction of a cent is rounded separately. That is why two receipts for the same basket can disagree.
Pick what you know and what you need. Every result shows its working, so you can check it against a receipt rather than trust a single number.
Add tax to a price, take it out of a tax-inclusive total, or find the rate from a subtotal and a total. Switch the label between sales tax, VAT, and GST to match your paperwork; the maths stays the same.
Type a rate to four decimal places, start from an example, or stack rates such as state, county, and city. Mark a rate compound only when it is charged on the taxes above it.
Read the formula and the cent-exact result, compare other rates side by side, then list items with quantities and exemptions and download them as CSV.
Taking tax out divides by 1 plus the rate. The wrong answer, subtracting the rate from the total, is shown beside the right one with the gap in money.
Amounts are held as whole cents (or whole yen) and every division is rounded once, on purpose, so floating-point drift never reaches a total.
Stack up to five rates, round each tax line or the combined tax once, and mark any rate that is charged on the taxes before it.
Line items show the tax both ways and the difference between them, which explains most one-cent disagreements between receipts.
From a subtotal and a total, get the rate, the band of rates that print the same tax, and the simplest rate inside that band.
Choose whether an exact half goes up or to the even neighbour, and every result, line, and CSV row follows the choice.
Multiply the price before tax by the rate as a decimal, then add the result to the price. At 8.25%, a $100.00 item carries $100.00 × 0.0825 = $8.25 of tax, so the total is $108.25. The same two steps work for VAT and GST.
Divide the tax-inclusive price by 1 plus the rate. At 20% VAT, £120.00 ÷ 1.20 = £100.00 before VAT, and the VAT is the £20.00 difference. Put another way, at 20% the VAT is one sixth of an inclusive price, because 20 ÷ 120 = 1/6.
Because the 20% was charged on the price before VAT, not on the total. Taking 20% of £120.00 removes £24.00 and leaves £96.00, and adding 20% back to £96.00 gives £115.20, not £120.00. The correct price before VAT is £100.00, so subtracting the rate takes off £4.00 too much.
In the United States, sales tax is set by states and local governments and is generally collected once, on the final sale to the consumer. VAT and GST are collected at each step of the supply chain; registered businesses reclaim the tax on what they buy, so the full tax ends up in the price the end customer pays. GST is the name Australia, New Zealand, Canada, India, and others use for their VAT-style tax. On a single price the arithmetic is identical, which is why the label switch on this page changes words, not maths.
When state, county, and city taxes all apply to the same price, add the rates: 6% + 1% + 0.5% is 7.5%. A compound rate is different, because it is charged on the price plus the taxes before it, so 5% followed by a compound 10% comes to 15.5%, not 15%. Quebec charged its QST on top of GST this way until 2013; today the two are worked out side by side on the same price.
It depends on the seller's system and, in some places, on the rules for invoices. Rounding each line and rounding the subtotal once can differ by a cent or more, because each line's fraction of a cent is rounded on its own. In the example lines on this page, three taxed lines at 8.25% come to $3.08 of tax when each line is rounded and $3.09 when the subtotal is rounded once.
Subtract the subtotal from the total to get the tax, divide the tax by the subtotal, and multiply by 100. A $54.11 total on a $49.99 subtotal is $4.12 of tax, and 4.12 ÷ 49.99 × 100 is about 8.24%. Because the printed tax was rounded to the cent, any rate from about 8.23% to 8.25% gives the same receipt, so the calculator shows that band instead of pretending to a precision the receipt does not have.
A tax-exclusive price is quoted before tax and the tax is added at the till, which is how US shelf prices usually work. A tax-inclusive price already contains the tax, which is the norm for consumer prices in the UK, the EU, and Australia. Use Add tax for an exclusive price and Remove tax for an inclusive one; the line items accept either.
Three choices move the last cent: rounding each line or the total, rounding each tax separately or the combined tax once, and how an exact half is rounded. Half up sends 0.125 to 0.13; banker's rounding sends it to the even neighbour, 0.12, so halves cancel out over many sums. Set those three to match the receipt and the totals should agree.
The examples are standard rates at the time of writing and are there to save typing, not to replace the tax authority. Rates change, many goods carry reduced or zero rates, and which items are taxable, exemptions, and registration thresholds all depend on the place. Confirm the current rate with the relevant authority, and treat the results as arithmetic, not tax advice.
Explore the growing collection for calculations, documents, writing, and everyday work.