# 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.

- Calculator id: `vat` · Category: Finance (`finance`) · Tool name: `calculate_vat`
- Canonical page: https://tttkmbb.com/finance/vat · This document: https://tttkmbb.com/finance/vat.md · JSON definition: https://tttkmbb.com/finance/vat.json

## Purpose

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.

**Use when:** 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).

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `amount` | number |  | required | Net price (mode=add_vat) or gross VAT-inclusive price (mode=remove_vat). (min 0, max 1000000000) |
| `vat_rate_percent` | number | % | optional, default 20 | VAT rate in percent; standard rates in the EU range from 17 % to 27 %. (min 0, max 100) |
| `mode` | enum: add_vat \| remove_vat |  | optional, default "add_vat" | Whether amount is net (add) or gross (remove). |

## Output

| Field | 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. |

## Formula

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

## Data Sources

- Wikipedia – Value-added tax — https://en.wikipedia.org/wiki/Value-added_tax (reference, retrieved 2026-09-23)
- GOV.UK – VAT rates — https://www.gov.uk/vat-rates (government, retrieved 2026-09-23)
- European Commission – VAT (rates and rules in the EU) — https://taxation-customs.ec.europa.eu/taxation/vat_en (government, retrieved 2026-09-23)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/vat?amount=…`
- `POST https://tttkmbb.com/api/v1/calculate/vat` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/vat · OpenAPI operationId `calculate_vat` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "vat", "inputs": {…}}`

## Example

- 100 net plus 20 % VAT: inputs `{"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: inputs `{"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
```

## Limitations

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). All values are computed from the formula above; no measurement or live data is involved.

## 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

- [Sales Tax Calculator](https://tttkmbb.com/finance/sales-tax.md) — US-style sales tax with the same arithmetic.
- [Margin and Markup Calculator](https://tttkmbb.com/finance/margin-markup.md) — Set a net selling price from cost before adding VAT.
