Easily add or remove Value Added Tax from any price.
Add VAT to Net Amount
Remove VAT from Gross Amount
Calculation Summary
Net Amount:
0.00
VAT Amount (0%):
0.00
Gross Total:
0.00
Understanding VAT Calculations
Value Added Tax (VAT) is a consumption tax placed on a product whenever value is added at a stage of production and at final sale. Whether you are a business owner needing to issue invoices or a consumer trying to find the real cost of a product, understanding how to add and remove VAT is essential.
How to Add VAT to a Price
To calculate the gross price (total including tax) when you have the net price, you use the following formula:
Gross Price = Net Price × (1 + (VAT Rate / 100))
Example: If a service costs 100 and the VAT rate is 20%, the calculation is 100 × 1.20 = 120. The VAT amount is 20.
How to Remove VAT from a Total
If you have a total price and want to know what the original cost was before tax, you cannot simply subtract the percentage. You must divide by the tax factor:
Net Price = Gross Price / (1 + (VAT Rate / 100))
Example: If a product costs 120 including 20% VAT, you calculate 120 / 1.20 = 100. The VAT removed is 20.
Common VAT Rates
While rates vary by country, many use a standard rate for most goods and services and a reduced rate for essentials like food or books. Always ensure you are using the correct local rate for your specific industry.
function calculateVat() {
var amount = parseFloat(document.getElementById('vatAmount').value);
var rate = parseFloat(document.getElementById('vatRate').value);
var type = document.getElementById('calcType').value;
if (isNaN(amount) || isNaN(rate)) {
alert("Please enter valid numbers for both amount and rate.");
return;
}
var net, vat, gross;
if (type === "add") {
net = amount;
vat = net * (rate / 100);
gross = net + vat;
document.getElementById('label-initial').innerText = "Net Amount (Excl. VAT):";
document.getElementById('label-total').innerText = "Gross Total (Incl. VAT):";
document.getElementById('val-initial').innerText = net.toFixed(2);
document.getElementById('val-vat-only').innerText = vat.toFixed(2);
document.getElementById('val-total').innerText = gross.toFixed(2);
} else {
gross = amount;
net = gross / (1 + (rate / 100));
vat = gross – net;
document.getElementById('label-initial').innerText = "Gross Amount (Incl. VAT):";
document.getElementById('label-total').innerText = "Net Total (Excl. VAT):";
document.getElementById('val-initial').innerText = gross.toFixed(2);
document.getElementById('val-vat-only').innerText = vat.toFixed(2);
document.getElementById('val-total').innerText = net.toFixed(2);
}
document.getElementById('val-rate-display').innerText = rate;
document.getElementById('vat-result-box').style.display = "block";
// Smooth scroll to result
document.getElementById('vat-result-box').scrollIntoView({ behavior: 'smooth', block: 'nearest' });
}