VAT Calculator

Use this calculator below to add or remove VAT using an online calculator.

Only numeric inputs are allowed. Click the fields to activate them for input.

How to add on VAT using the VAT Calculator

The calculator displayed above can be used to add VAT to the cost of products or services.

Step 1 – Enter the cost excluding VAT.

  • Example: Enter 100.

Step 2 – Enter the VAT percentage rate.

  • Example: Enter 20.

Step 3 – Now select the blue “Add VAT” button.

You should see the correct VAT amount and cost including VAT automatically calculated.

  • VAT Amount = 20.00
  • Total Cost Including VAT = 120.00

How to remove VAT using the VAT Calculator

The calculator displayed above can be used to remove VAT from the cost of products or services.

Step 1 – Enter the cost including VAT.

  • Example: Enter 240.

Step 2 – Enter the VAT percentage rate.

  • Example: Enter 20.

Step 3 – Now select the blue “Remove May” button.

You should see the correct VAT amount and cost including VAT automatically calculated.

  • VAT Amount = 40.00
  • Total Cost Including VAT = 200.00

Example VAT Calculation Formula for adding VAT

You can also manually calculate adding VAT by multiplying the ex VAT cost by 1 + VAT Percentage.

Example 1:

  • Ex VAT Cost = £20.00
  • VAT Percentage = 20%
  • VAT Calculation: £20.00 x 1.2 = £24.00 inc VAT

Example 2:

  • Ex VAT Cost = £20.00
  • VAT Percentage = 17.5%
  • VAT Calculation: £20.00 x 1.175 = £23.50 inc VAT

Example 3:

  • Ex VAT Cost = $500.00
  • VAT Percentage = 22%
  • VAT Calculation: $500.00 x 1.22 = $610.00 inc VAT

Example 4:

  • Ex VAT Cost = $1245.00
  • VAT Percentage = 12.8%
  • VAT Calculation: $1245.00 x 1.128 = $1,404.36 inc VAT

Example VAT Calculation Formula for removing VAT

You can also manually calculate removing VAT by diving the inc VAT cost by 1 + VAT Percentage.

Example 1:

  • Inc VAT Cost = £24.00
  • VAT Percentage = 20%
  • VAT Calculation: £24.00 / 1.2 = £20.00 ex VAT

Example 2:

  • Inc VAT Cost = £23.40
  • VAT Percentage = 17.5%
  • VAT Calculation: £23.40 / 1.175 = £19.57 ex VAT

Example 3:

  • Inc VAT Cost = $610.00
  • VAT Percentage = 22%
  • VAT Calculation: $610.00 / 1.22 = $500.00 ex VAT

Example 4:

  • Inc VAT Cost = $1404.36
  • VAT Percentage = 12.8%
  • VAT Calculation: $1404.36 / 1.128 = $1245.00 ex VAT

VAT Calculation Formula for the VAT amount only

You can also manually calculate adding VAT by multiplying the ex VAT cost by 0 + VAT Percentage.

Example 1:

  • Ex VAT Cost = £20.00
  • VAT Percentage = 20%
  • VAT Amount Only Calculation: £20.00 x 0.2 = £4.00

Example 2:

  • Ex VAT Cost = £20.00
  • VAT Percentage = 17.5%
  • VAT Amount Only Calculation: £20.00 x 0.175 = £3.50

Example 3:

  • Ex VAT Cost = $500.00
  • VAT Percentage = 22%
  • VAT Amount Only Calculation: $500.00 x 0.22 = $110.00

Example 4:

  • Ex VAT Cost = $1245.00
  • VAT Percentage = 12.8%
  • VAT Amount Only Calculation: $1245.00 x 0.128 = $159.36
VAT Calculator

How the VAT Calculator Works – Programming Perspective

Getting User Input

The tool uses two input fields:

<input id=”amount”> // for the base or total amount
<input id=”vatPercentage”> // for the VAT percentage

When a user types into these fields or uses the on-screen number pad, JavaScript captures those values.

Validating Input

if (!amountInput.value || !vatInput.value) {
alert(‘Both amount and VAT percentage are required.’);
}

if (isNaN(amountInput.value) || isNaN(vatInput.value)) {
alert(‘Only numeric values are allowed.’);
}

This ensures the values are not empty and are valid numbers.

Adding VAT Calculation

const result = amount + (amount * percentage / 100);

Breakdown:

  • amount * percentage / 100 → Calculates the VAT.
  • Adds that VAT to the original amount.
  • The result is displayed using:

Removing VAT Calculation

Triggered when the user clicks the “Remove VAT” button:

const result = amount / (1 + percentage / 100);

Breakdown:

  • Divides the amount by 1 plus the VAT rate, to get the net amount.
  • Result is shown the same way, rounded to 2 decimal places.

Copying Result

When the “Copy Result” button is clicked:

navigator.clipboard.writeText(resultDiv.textContent)

This copies the result text (e.g. “Result: 120.00”) to the clipboard.

Number Pad Input

  • Each button has a data-value, e.g. “7” or “.”.
  • When clicked, the value is appended to whichever input field is currently active (either amount or VAT):

activeInput.value += digit;

Summary

  • Input: User types or taps numbers.
  • Validation: JS checks for correct number formats.
  • Calculation: JS uses simple formulas for adding/removing VAT.
  • Output: Result is shown and can be copied.

All logic runs inside an event listener:

document.addEventListener(‘DOMContentLoaded’, function() { … });

FAQs about VAT Calculator

This tool helps you quickly add or remove VAT from a given amount based on a specified percentage. It’s ideal for business owners, freelancers, and consumers looking to perform VAT-related calculations easily.

Find more about how VAT works in the UK.

Simply enter the amount and the VAT percentage in the relevant fields, then click either “Add VAT” or “Remove VAT” depending on the calculation you need.

It calculates the gross amount by adding the entered VAT percentage to your base (net) amount.

It calculates the net amount by removing the specified VAT percentage from the total (gross) amount.

Yes, the calculator supports decimal values. Just use the dot (.) button on the number pad to enter decimal points.

The built-in number pad allows you to enter numbers into the amount or VAT fields by clicking the buttons. It’s especially helpful on devices without a physical keyboard.

Use the “Clear” button to empty the currently active input field, or the “Backspace” button to remove the last character entered.

Click directly on either the Amount or VAT Percentage input field to make it active for editing or using the number pad.

Yes! Click the “Copy Result” button and confirm the prompt to copy the calculated value to your clipboard.

No. This calculator runs completely in your browser and does not store any data or inputs you enter.

The calculator will show an alert message asking you to enter valid numeric values in both fields before performing any calculation.

Yes. The calculator is mobile-friendly and works well on smartphones and tablets with responsive design and touch-friendly buttons.

Yes, it is completely free to use without any registration or login required.

Disclaimer: DCP Web Designers are not liable for damage or loss of profits caused by using the VAT Calculator Tool on this page.