calculate_vat_amount
Calculate VAT amounts from net or gross values. Returns net amount, VAT amount, gross amount, rate, and currency for pricing tools or checkout flows.
Instructions
Calculates VAT amounts from either a net (excluding VAT) or gross (including VAT) amount for a given VAT rate. Returns { net_amount, vat_amount, gross_amount, vat_rate, currency }. Use when building pricing tools, invoice calculators, or checkout flows that need to split gross prices into net + VAT components.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | The amount to calculate VAT for | |
| vat_rate | Yes | VAT rate as a percentage. Example: 23 for 23% | |
| amount_type | Yes | Whether the input amount is net (excluding VAT) or gross (including VAT) | |
| currency | No | Currency code. Example: 'EUR', 'GBP'. Defaults to 'EUR' |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| net_amount | Yes | ||
| vat_amount | Yes | ||
| gross_amount | Yes | ||
| vat_rate | Yes | ||
| currency | Yes |