Finance Utilities

Calculate Vat

Calculate VAT (Value Added Tax) on any amount with configurable tax rates. Access via MCP in Cursor, Claude Code, and other AI tools, or REST API at `/v1/finance/vat`. Pass a base amount and VAT rate to get inclusive/exclusive totals. Essential for financial calculations in e-commerce, accounting, and invoicing applications where precise tax computation matters.

API Endpoint

GET /v1/finance/vat

Code Examples

curl "https://tinyfn.io/v1/finance/vat" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/finance/vat', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests

response = requests.get('https://tinyfn.io/v1/finance/vat',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's finance tools:

{
  "mcpServers": {
    "tinyfn-finance": {
      "url": "https://tinyfn.io/mcp/finance",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

How do I calculate VAT inclusive and exclusive amounts?

Pass the base amount and VAT rate (as percentage). The tool returns both VAT-inclusive total and VAT-exclusive amount, plus the VAT amount itself.

What VAT rates does the calculator support?

Any custom VAT rate as a percentage. Common rates like 20% (UK), 19% (Germany), or 10% (reduced rates) all work. No predefined rate limits.

Can MCP tools in Cursor automatically calculate VAT for invoices?

Yes, AI agents can call this tool to compute VAT on invoice line items, handling multiple rates and currencies in automated accounting workflows.

Does the VAT calculator handle reverse calculations?

The tool calculates from base amounts. For reverse VAT (finding pre-tax amount from VAT-inclusive total), divide the inclusive amount by (1 + VAT rate).

What's the difference between VAT inclusive and exclusive pricing?

VAT exclusive shows the base price before tax. VAT inclusive shows the final price including tax. This tool computes both from your base amount.

Try Calculate Vat Now

Get your free API key and start using Calculate Vat in seconds.

Get Free API Key