HomeFinance › VAT Calculator

VAT Calculator

Adds VAT at a given rate to a net price, or removes it from a gross (VAT-inclusive) price, returning net, VAT and gross amounts.

When to use

You need the VAT-inclusive price for an invoice, or the net price and VAT portion of a gross amount, at a known rate such as 20 % (UK), 19 % (Germany) or 21 % (Netherlands).

Do not use when: You are dealing with US sales tax terminology (use sales-tax; the arithmetic is identical), or with multiple rates on one invoice (compute each line separately).

Formula

add_vat: vat = amount × rate/100, gross = amount + vat. remove_vat: net = amount / (1 + rate/100), vat = amount − net

Inputs

ParameterTypeUnitRequiredDescription
amountnumberyesNet price (mode=add_vat) or gross VAT-inclusive price (mode=remove_vat). Range: ≥ 0, ≤ 1000000000
vat_rate_percentnumber%default 20VAT rate in percent; standard rates in the EU range from 17 % to 27 %. Range: ≥ 0, ≤ 100
modeenum: add_vat | remove_vatdefault add_vatWhether amount is net (add) or gross (remove).

Outputs

OutputTypeUnitDescription
net_amountnumberPrice before VAT.
vat_amountnumbernet_amount × rate.
gross_amountnumbernet_amount + vat_amount.
vat_fraction_of_grossnumberrate / (100 + rate), e.g. 1/6 at 20 %: multiply a gross price by this to get the VAT.

Example

100 net plus 20 % VAT: {"amount":100,"vat_rate_percent":20,"mode":"add_vat"}{"net_amount":100,"vat_amount":20,"gross_amount":120,"vat_fraction_of_gross":0.166667}

119 gross, remove 19 % VAT: {"amount":119,"vat_rate_percent":19,"mode":"remove_vat"}{"net_amount":100,"vat_amount":19,"gross_amount":119}

GET https://tttkmbb.com/api/v1/calculate/vat?amount=100&vat_rate_percent=20&mode=add_vat

Machine access

Sources

FAQ

What is the VAT fraction?

The share of a gross price that is VAT: rate / (100 + rate). At 20 % it is 1/6, so the VAT in a 120 gross price is 20, not 24.

Which rate applies?

Standard rates apply to most goods; reduced or zero rates apply to items such as food, books or children's clothing depending on the country. Check the national tax authority's list.

Related calculators