VAT Calculator
Add or remove VAT/tax from a price. Supports custom tax rates for any country.
Common rates:
VAT Calculator (Value Added Tax) helps you add or remove VAT from a price quickly and accurately. VAT is a consumption tax applied to goods and services in over 160 countries, and the standard rate varies significantly — from 5% in some regions to 27% in Hungary. Understanding how to calculate VAT is essential for businesses issuing invoices, shoppers comparing prices, and anyone working with international pricing.
To add VAT: enter the pre-tax (net) price and the VAT rate, and the tool gives you the VAT amount and the total (gross) price. To remove VAT: enter the price including tax (gross) and the VAT rate, and the tool extracts the pre-tax price and the VAT amount — this is called reverse VAT calculation or VAT deduction.
Common VAT rates include 20% in the UK, 19% in Germany, 20% in France, 22% in Italy, and 21% in Spain, though many categories of goods and services attract reduced rates. Always check the applicable rate for your specific product or service category.
Frequently Asked Questions
Code Implementation
def add_vat(net: float, rate: float) -> dict:
"""Add VAT to a net (pre-tax) price."""
vat_amount = net * (rate / 100)
gross = net + vat_amount
return {"net": net, "vat": vat_amount, "gross": gross, "rate": rate}
def remove_vat(gross: float, rate: float) -> dict:
"""Extract VAT from a VAT-inclusive (gross) price."""
net = gross / (1 + rate / 100)
vat_amount = gross - net
return {"net": net, "vat": vat_amount, "gross": gross, "rate": rate}
# Example: Add 20% VAT
r1 = add_vat(net=100, rate=20)
print(f"Net: ${r1['net']:.2f}")
print(f"VAT: ${r1['vat']:.2f} ({r1['rate']}%)")
print(f"Gross: ${r1['gross']:.2f}")
print()
# Example: Remove 20% VAT from £120 inclusive price
r2 = remove_vat(gross=120, rate=20)
print(f"Gross: ${r2['gross']:.2f} (VAT inclusive)")
print(f"VAT: ${r2['vat']:.2f} ({r2['rate']}%)")
print(f"Net: ${r2['net']:.2f} (ex VAT)")
# Common VAT rates reference
print("\nCountry VAT Rates:")
rates = {"UK": 20, "Germany": 19, "France": 20, "Australia": 10, "Japan": 10}
for country, rate in rates.items():
r = add_vat(100, rate)
print(f" {country} ({rate}%): ${r['gross']:.0f} on $100")Comments & Feedback
Comments are powered by Giscus. Sign in with GitHub to leave a comment.