How sales tax calculator works
This calculator handles two sales tax scenarios. In standard mode, it adds tax to a price: the tax amount is the price times the rate divided by 100, and the final price is the original plus the tax. For example, 100 at 8.5% tax gives 8.50 in tax and a final price of 108.50.
In tax-inclusive mode, the price already includes tax. The calculator extracts the tax by dividing the price by (1 + rate/100) to find the pre-tax amount, then subtracting. For example, if 108.50 includes 8.5% tax, the pre-tax price is 100 and the tax is 8.50.
This is useful for shopping, invoicing, and VAT calculations. Sales tax rates vary widely by jurisdiction; check your local rate. The calculator rounds to two decimal places.