Skip to content
PithLab

↑↓ to move · Enter to open · Esc to close

VAT Calculator API

Add VAT (or sales tax/GST) to a net price, or remove it from a gross, tax-inclusive price.

POST /api/v1/tools/vat-calculatorMCP vat_calculatorCalculators

Add VAT or GST to a net price, or take it out of a tax-inclusive price, at any rate. See the net amount, the tax and the gross total side by side.

Input

Send these as a JSON object. Unknown fields are rejected.

mode
add: amount is net, tax goes on top. remove: amount is gross (tax included), tax is taken out. (string, one of add, remove, default "add")
amount
The price, in currency units. (number, 0 to …, required)
rate
Tax rate in percent (0 to 100), e.g. 20. (number, 0 to 100, required)
curl https://pithlab.com/api/v1/tools/vat-calculator \n  -H "Authorization: Bearer $PITHLAB_KEY" \n  -H "Content-Type: application/json" \n  -d '{"mode":"remove","amount":120,"rate":20}'
Example response
{
  "ok": true,
  "result": {
    "net": 100,
    "tax": 20,
    "gross": 120,
    "rate": 20,
    "text": "120.00 includes 20.00 VAT at 20%, so the net amount is 100.00"
  }
}