How the Sales Tax & VAT Calculator Works
The calculator runs one consumption-tax identity in three directions. In Add tax mode the typed amount is the net (tax-exclusive) price: tax = net × rate ÷ 100 and gross = net × (1 + rate ÷ 100). In Remove tax (reverse) mode the amount is the tax-inclusive total: net = gross ÷ (1 + rate ÷ 100) and tax = gross − net. In Find rate mode you supply the net price and the total and it derives rate = (gross − net) ÷ net × 100. The rate can be any US sales-tax or EU/UK VAT percentage or a custom value, and the math is a pure function in a small, unit-tested engine that returns the net, tax and gross live as you type.
- Add tax: tax = net × rate ÷ 100; gross = net × (1 + rate ÷ 100)
- Remove tax: net = gross ÷ (1 + rate ÷ 100); tax = gross − net
- Find rate: rate = (gross − net) ÷ net × 100
- Same identity run forwards (add), backwards (reverse) or solved for the rate
- All math is client-side JavaScript with no server round-trip
