Calculate Tax
GEThttps://api-sales-tax.dataandapis.com/v1/calculate
Calculate Tax is an endpoint of the Sales Tax & VAT API. VAT and GST rates for 52 countries, US state sales tax for all 50 states, and a calculator.
Send your key in the X-Api-Key header. Each call costs 1 token; a free key includes 500 tokens a month.
Request
Query parameters
| Parameter | Example | |
|---|---|---|
| amount | 100 | Required |
| country | DE | Optional |
| inclusive | false | Optional |
| rate | 8.25 | Optional |
| state | CA | Optional |
Example request
curl
curl "https://api-sales-tax.dataandapis.com/v1/calculate?amount=100&country=DE&inclusive=false&rate=8.25&state=CA" \
-H "X-Api-Key: YOUR_API_KEY"Node.js
const res = await fetch("https://api-sales-tax.dataandapis.com/v1/calculate?amount=100&country=DE&inclusive=false&rate=8.25&state=CA", {
headers: { "X-Api-Key": process.env.DATAANDAPIS_KEY },
});
const data = await res.json();Python
import os, requests
r = requests.get(
"https://api-sales-tax.dataandapis.com/v1/calculate?amount=100&country=DE&inclusive=false&rate=8.25&state=CA",
headers={"X-Api-Key": os.environ["DATAANDAPIS_KEY"]},
)
data = r.json()Example response
Example response
{
"ok": true,
"as_of": "2026-09",
"rate": 19,
"rate_source": "Germany VAT standard rate",
"amount_is_inclusive": false,
"net": 100,
"tax": 19,
"gross": 119,
"disclaimer": "Rates are state/country base rates as of 2026-09; local surcharges and category-specific rates may apply. Verify before relying on them for tax filings."
}
