Home › Finance › 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
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
amount | number | yes | Net price (mode=add_vat) or gross VAT-inclusive price (mode=remove_vat). Range: ≥ 0, ≤ 1000000000 | |
vat_rate_percent | number | % | default 20 | VAT rate in percent; standard rates in the EU range from 17 % to 27 %. Range: ≥ 0, ≤ 100 |
mode | enum: add_vat | remove_vat | default add_vat | Whether amount is net (add) or gross (remove). |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
net_amount | number | Price before VAT. | |
vat_amount | number | net_amount × rate. | |
gross_amount | number | net_amount + vat_amount. | |
vat_fraction_of_gross | number | rate / (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
- API:
GET https://tttkmbb.com/api/v1/calculate/vat(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/vat · Markdown: https://tttkmbb.com/finance/vat.md · JSON definition: https://tttkmbb.com/finance/vat.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="vat" - OpenAPI operationId:
calculate_vat - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
- Wikipedia – Value-added tax (reference)
- GOV.UK – VAT rates (government)
- European Commission – VAT (rates and rules in the EU) (government)
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
- Sales Tax Calculator — US-style sales tax with the same arithmetic.
- Margin and Markup Calculator — Set a net selling price from cost before adding VAT.