Sales Tax Calculator
Calculate sales tax and total price for purchases. Works with any tax rate for US states, countries, or custom rates.
Sales Tax Formula
| Calculation | Formula | Tax AmountPrice × (Tax Rate / 100) Total PricePrice + Tax Amount Pre-tax PriceTotal / (1 + Tax Rate / 100)
US State Sales Tax Rates (2024)
StateRateStateRate California7.25%Texas6.25% New York4%Florida6% Tennessee7%Oregon0% | Washington | 6.5% | Delaware | 0% |
*Local taxes may add 1-4% more*
Implementation
``javascript
function calculateSalesTax(price, taxRate) {
const taxAmount = price * (taxRate / 100);
const total = price + taxAmount;
return { taxAmount, total };
}
function reverseCalculate(totalWithTax, taxRate) {
const preTaxPrice = totalWithTax / (1 + taxRate / 100);
const taxAmount = totalWithTax - preTaxPrice;
return { preTaxPrice, taxAmount };
}
``
Tax-Free States
Oregon, Montana, New Hampshire, Delaware, and Alaska have no state sales tax (though Alaska allows local taxes).