Add or remove VAT, at any rate
Add VAT to a price that excludes it, or work the tax back out of a price that already includes it, at any rate you type in. Going backwards is a division rather than a subtraction, and that is the arithmetic most people get wrong. Paste a column of prices and it does the whole invoice.
Line by line
| Line 1 | $12.99 | $2.60 | $15.59 |
| Line 2 | $4.49 | $0.90 | $5.39 |
| Line 3 | $31.50 | $6.30 | $37.80 |
| Line 4 | $8.75 | $1.75 | $10.50 |
| Total | $57.73 | $11.55 | $69.28 |
An estimate, not legal advice. Rules vary by jurisdiction and change over time. Check the current position with a qualified professional before relying on it.
How it works
What this works out
VAT is charged as a percentage of the price before tax. That makes adding it easy and taking it back off harder than it looks, because the percentage on a VAT-inclusive price is a fraction of a number that is no longer in front of you.
The tool does both directions and shows all three figures — the price before VAT, the tax, and the price including it — so whichever one you started with, the other two are there. It also states the VAT fraction for the rate, which is the number tax authorities publish so the sum can be done on a receipt without a calculator at all.
It holds no rates, and that is the point. This page used to carry the standard rate of 32 European countries. A table like that is wrong somewhere for most of the year, because rates move at short notice and mid-year, and a stale rate on a page somebody trusts is worse than no rate at all. Those rates now live in a tool for each country — UK VAT, German VAT and Irish VAT so far — each with its own bands, its own rounding rule and its own dated sources. What is left here is the arithmetic, which is the same in every country and cannot go out of date. It is the right page for a rate nothing here covers, for a historic rate, and for a band read straight off an invoice.
The method
Adding VAT is a multiplication: the tax is the rate applied to the price before tax, and the total is the two added together.
Removing it is a division. A price of 120 that includes 20% VAT is 120% of the price before tax, so the price before tax is 120 divided by 1.2. The equivalent shortcut is the VAT fraction: the rate divided by 100 plus the rate. At 20% that is 20/120, or one sixth, so the tax in any 20% VAT-inclusive price is a sixth of it. HM Revenue & Customs publishes it in VAT Notice 700 and every other authority publishes its own; the tool shows it in lowest terms for whatever rate you type, which is often less tidy than one sixth — 19% gives 19/119, and 13.5% gives 27/227.
Only the VAT is rounded, and the third figure is derived from the other two. That is a deliberate choice rather than an oversight. A price of 12.03 including 20% VAT is exactly 10.025 before tax and 2.005 of tax; round both to the nearest penny on their own and you get 10.03 and 2.01, which add to 12.04 — a penny more than the price on the receipt. Rounding the tax and subtracting cannot produce that, so the three numbers always reconcile.
The arithmetic is done in decimal, not in binary floating point. 19% of 13.50 is exactly 2.565 and rounds to 2.57, but the nearest double to 2.565 sits fractionally below it, so a naive implementation reports 2.56. On a page whose entire output is a tax figure, one penny is the whole product.
There is also a rounding option, and it is offered rather than chosen because this page belongs to no country. Some authorities let a trader issuing invoices round the VAT down to a whole penny rather than to the nearest, on the grounds that it is tax-neutral: the supplier’s output tax and the customer’s input tax move together. Others do not. Which applies to you is a rule you file under, so the tool exposes the choice instead of making it.
A worked example
The figures below carry no currency symbol on purpose. VAT arithmetic does not depend on the currency, so the tool follows whichever currency your locale uses, and a worked example that hard-coded one would contradict the result panel on every other locale.
Adding. 100 before VAT at 20%:
| VAT | 20.00 |
| Price before VAT | 100.00 |
| Price including VAT | 120.00 |
| VAT fraction | 1/6 |
Removing. A receipt for 179.99 that includes 20% VAT:
| VAT | 30.00 |
| Price before VAT | 149.99 |
| Price including VAT | 179.99 |
Checked against the VAT fraction:
vat = 179.99 x 20 / 120
= 179.99 / 6
= 29.998333...
= 30.00 to the nearest penny
net = 179.99 - 30.00
= 149.99
Taking 20% off 179.99 instead gives 143.99, which is 6.00 short. That gap is the reason this tool exists.
The penny cases. 13.50 plus VAT at 19% is 2.57 of tax and 16.07 in total — not the 2.56 a floating-point calculation reports. And 12.03 including 20% VAT is 2.01 of tax on 10.02, the two adding back to 12.03 exactly.
A column of prices, and why the total is not what a spreadsheet says
Paste a column into the price list and the table applies the rate to every line. The example the tool starts with is four VAT-inclusive prices at 20%:
| Line | Before VAT | VAT | Including VAT |
|---|---|---|---|
| Line 1 | 10.82 | 2.17 | 12.99 |
| Line 2 | 3.74 | 0.75 | 4.49 |
| Line 3 | 26.25 | 5.25 | 31.50 |
| Line 4 | 7.29 | 1.46 | 8.75 |
| Total | 48.10 | 9.63 | 57.73 |
The total tax is 9.63, and one sixth of 57.73 is 9.62. Both are correct
arithmetic and only the first is the right answer for an invoice, because
rounding does not distribute over addition: a VAT invoice states a tax amount
per line, so the total it has to reconcile against is the one built from those
rounded figures. A spreadsheet that keeps full precision down the column and
rounds SUM once reports the second, and the gap grows with the number of
lines rather than with their size.
These are the same numbers asserted in this tool’s test file, so if the formula ever changes without this page changing with it, the build fails.
Before you read on
Four VAT-inclusive lines total 57.73 at 20%. Adding the tax line by line gives 9.63. One sixth of 57.73 is 9.62. Which figure belongs on the invoice?
9.63. Both are correct arithmetic and only one is the right answer for an invoice, because rounding does not distribute over addition: a VAT invoice states a tax amount per line, so the total it has to reconcile against is the one built from those rounded figures. A spreadsheet that keeps full precision down the column and rounds SUM once reports 9.62, and the gap grows with the number of lines rather than with their size.
gross = net + vatThe only relationship there is. Everything below is this rearranged.
vat = net x rate / 100The tax was charged on the net — the figure you do not have when you are holding a receipt.
gross = net x (100 + rate) / 100Substitute. A 20%-inclusive price is 120% of the net, which is why subtracting 20% cannot get back to it.
vat = gross x rate / (100 + rate)Rearrange for the figure you can compute. At 20% that is 20/120 — one sixth — and the rate over 100 plus the rate at every other rate there is.
What it does not do
It does not know any country’s rates, and that is deliberate rather than unfinished — see above. It does not decide which band a supply falls in, handle the reverse charge, margin schemes, the flat rate scheme, partial exemption or import VAT, and it does not convert currencies. Every line in the price list is taxed at the same rate, so a mixed-rate invoice has to be run once per band.
For a country whose bands, rounding rule and sources are worth stating properly, there is a tool for it rather than an option on this one. For an ordinary percentage of a number, without the inclusive-price arithmetic, a percentage calculator is the plainer tool and the right one.
The formula
Adding VAT to a price that excludes it:
vat = round(net x rate / 100)
gross = net + vat
Removing VAT from a price that includes it, by the VAT fraction:
vat = round(gross x rate / (100 + rate))
net = gross - vat
where
rate = the rate as a percentage, so 20 rather than 0.2
round = to the nearest 0.01, or towards zero when
"round the VAT down" is chosen
At 20% the VAT fraction is 20/120, which is one sixth.
Only the VAT is rounded. The third figure is derived from
the other two, so net + vat = gross to the penny, always.
Down a pasted column, each line is rounded and the totals
are the sums of the rounded lines — never the rounding of
the summed lines, which is a different number.
What it assumes
- The rate is whatever you type. This tool holds no rate table for any country, which is the reason nothing on this page can go out of date and the reason it cannot tell you which rate applies to your supply.
- Rounding is applied to the VAT, and the third figure is derived from the other two. Rounding all three independently would leave them a penny apart whenever both halves fall on a half-penny, which is how an invoice ends up not adding to its own total.
- The currency is presentational and no exchange rate is applied anywhere. VAT arithmetic is the same in pounds, euros or dollars, so the tool follows whichever currency your locale uses rather than pinning one — which is why the worked examples below quote bare figures. A symbol written into the prose would contradict the result panel for every reader outside one country.
- In the price list, a comma is removed as a grouping separator and never read as a decimal point. A pasted "1,234" is one thousand two hundred and thirty-four here. Deciding this from your locale instead would make the same list total two different ways on two machines.
- Which rounding rule is correct is a rule of the tax authority you file with, not a preference. Both options are offered because this page belongs to no country and is in no position to choose one for you.
Common questions
How do I remove VAT from a price?
Divide the total by 1 plus the rate, or multiply it by the VAT fraction. At 20% the fraction is 20/120, which is one sixth: 120 including VAT is 100 before VAT and 20 of tax. At 19% divide by 1.19, at 23% by 1.23. Set the tool to "remove" and it does whichever applies.
Why is taking 20% off not the same as removing 20% VAT?
Because the 20% was charged on the smaller number. Adding 20% to 100 gives 120, but taking 20% off 120 gives 96 — the percentage is a fifth of the net going up and a sixth of the gross coming down. The error is the rate squared: at 20% the naive answer is 4% below the true price before VAT, and at 23% it is 5.3% below.
Why does this tool no longer list countries?
Because a list of 32 national rates is a list that is wrong somewhere for most of the year, and a stale rate is a confidently wrong answer rather than a missing one. The rates moved to a tool per country, each with that country's own bands, rounding rule, sources and dates. What is left here is arithmetic, which is identical everywhere and cannot expire — so this is the right page for a rate no tool covers, a historic rate, or a band read straight off an invoice.
Are the prices I type sent anywhere?
No. The arithmetic runs in this browser tab and there is no server to send it to. There is no rate table to fetch either, so the tool works offline once the page has loaded.
Why does your VAT differ by a penny from my spreadsheet?
Two usual causes. The spreadsheet may be doing the sum in binary floating point: 19% of 13.50 is exactly 2.565 and should round to 2.57, but the nearest double sits just below it, so a float calculation reports 2.56. Or, on a column of prices, the spreadsheet is rounding the total once instead of rounding each line — which is a different number, and not the one an invoice states.
Which rate should I be using?
That depends on where the supply takes place and which band it falls in, and neither is arithmetic. Goods bought in person are taxed where they are sold; digital services sold to consumers in the EU are taxed at the customer's rate; business-to-business sales across a border are usually reverse-charged, so no VAT is added at all. The country tools linked below each publish their own bands with the authority and the date.
Sources
Method written and checked by Tessalor on Jul 31, 2026.