---
title: Calculate VAT and GST API
slug: calculate-vat-gst
url: https://apyhub.com/freedailypro/service/calculate-vat-gst
provider: FreeDailyPro
categories: [Verification Kit]
tags: [vat-calculation, gst-calculation, sales-tax, invoice-tax, tax-rate, receipt-validation]
auth: api_key
version: 1.4.0
service_type: sync
endpoints: 1
atoms: 10
mcp: true
---

# Calculate VAT and GST API

Calculate VAT or GST from amount, rate, country, VAT amount, or invoice lines. Handles tax-inclusive amounts and country/province rate lookup.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/freedailypro/calculate-vat-gst/vat-gst` | What it does Calculates VAT or GST for an amount using either a provided rate, a country lookup, or… | 10 |

## Endpoint reference

### Calculate VAT or GST on an amount using a 61-entry country and province rate table

`POST https://api.eu.apyhub.com/freedailypro/calculate-vat-gst/vat-gst` · 10 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `lines` | body | array of object | no | Invoice lines at different rates: returns a subtotal per rate (byRate) and a grand total. Use instead of amount. |
| `lines[].amount` | body | number | yes | The line amount (net, or gross when amountIncludesTax is true). |
| `lines[].ratePct` | body | number | no | This line's rate in percent. Defaults to the top-level ratePct or the country's standard rate. |
| `amount` | body | number | no | The amount, in any currency. Send this, or vatAmount, or lines. |
| `country` | body | string | no | Country name (for example Germany, United Kingdom, Australia, Singapore, UAE). Looks up the standard VAT/GST rate. Canada has one entry per province group, e.g. 'Canada - Ontario HST'. The error for… |
| `ratePct` | body | number | no | VAT/GST rate in percent. Required unless country is sent. Takes priority over country. |
| `vatAmount` | body | number | no | The VAT amount shown on a receipt: returns the net and gross it implies at the rate (needs a rate above 0). Use instead of amount. |
| `amountIncludesTax` | body | boolean | no | true when amount already includes the tax (the tax is taken out of it). |

#### Quickstart

Calculate VAT or GST from a single amount using the tax rate for a country.

```bash
curl -X POST "https://api.eu.apyhub.com/freedailypro/calculate-vat-gst/vat-gst" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"amount":100,"country":"Germany"}'
```

#### What you'll get back

Returns a JSON object. 

```json
{
  "result": {
    "net": 100,
    "tax": 19,
    "gross": 119,
    "ratePct": 19,
    "country": "Germany"
  }
}
```

## About

## What it does
VAT and GST Calculator computes sales tax amounts from a single amount, a VAT/GST rate, a country name, a VAT amount, or a set of invoice lines. It returns a structured calculation based on the values you send, using the built-in country and province rate table when you provide a country.

Send `amount` and either `ratePct` or `country` to calculate tax on a net amount. Set `amountIncludesTax` to `true` when the amount already includes tax and you want the tax backed out. If you already know the tax line from a receipt, send `vatAmount` and the calculator returns the net and gross it implies. For invoices with different rates, send `lines` with per-line `amount` values and optional `ratePct` overrides.

Use it when you need to quote taxes in checkout flows, validate tax values on invoices, or normalize receipts from different jurisdictions. The service supports a 59-entry country and province rate table, including countries such as Germany, the United Kingdom, Australia, Singapore, UAE, and Canadian province groups.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/freedailypro/service/calculate-vat-gst
