Sales Tax Calculator Widget
Add a sales tax calculator to your website. Shoppers and sellers enter a price with the state rate and any local rate for the delivery address, and see the tax, the total and the state and local portions - or work backwards from a total that already includes tax.
Live preview
Exactly what your visitors will seeUnder the widget on your page: Powered by A2Z Tools
Embed code
<iframe src="https://a2z.tools/embed/w/sales-tax-calculator" title="Sales Tax Calculator by A2Z Tools" width="100%" height="550" style="border:0;width:100%" loading="lazy" allow="clipboard-write"></iframe>
A plain iframe. Works everywhere, including site builders that strip scripts. Adjust height if your content needs more room.
<div data-a2z-widget="sales-tax-calculator" data-height="550"></div> <script async src="https://a2z.tools/embed.js"></script>
Adds a small script (what it does) that sizes the widget to fit its content, loads it lazily and keeps it isolated from your page's CSS.
Works with
How it works
US sales tax is set by each state and, in many states, by counties, cities and special districts on top, and it is charged on the pre-tax price. The widget therefore starts with no rate: the visitor enters the state rate and the combined local rate for the address, it adds the two into a combined rate and applies it as the A2Z Sales Tax Calculator does, then splits the tax back into its state and local parts. In reverse mode it divides a tax-inclusive total by (1 + combined rate) to recover the pre-tax price. It carries no rate tables: rates depend on the exact address and product and change - California's tax agency, for example, publishes a new city and county rate list as local rates change.
Calculation method
- Combined rate C = state rate + local rate (in %)
- Sales tax = price x C / 100; total = price + tax
- Tax included: pre-tax price = total / (1 + C / 100)
- State portion = tax x state rate / C; local portion = tax - state portion
- Rounding: calculated unrounded, displayed to the cent
Worked examples
State plus local rate
Inputs: Price 250; state rate 6% and local rate 1.5% entered by the user
Result: Tax 18.75 (state 15.00, local 3.75); total 268.75
Combined 7.5%, split in proportion to the two rates.
Backing tax out of a receipt
Inputs: Total 107.25 including tax; state rate 7.25%, no local rate
Result: Pre-tax price 100.00; tax 7.25
107.25 / 1.0725.
Sales tax rates and rules vary by location and product and change. Enter the current rate; this is a calculator, not tax advice.
Limitations
- Holds no rates; it cannot tell which state, county, city or district rates apply to an address.
- Does not handle product exemptions, sales-tax holidays, use tax, caps on local tax or shipping taxability.
- No marketplace-facilitator or economic-nexus rules: whether a seller must collect tax is a separate question.
Where publishers use it
- US ecommerce and dropshipping guides on charging sales tax at checkout
- Car, furniture and electronics buying guides showing the out-the-door price
- Small-business bookkeeping blogs explaining how to back tax out of receipts
- Personal-finance pages budgeting for a large purchase
Questions
Why doesn't the widget know my state's rate?
Combined rates depend on the state, county, city and special districts of the delivery address, and on what is being sold, and they change during the year. Built-in tables would go stale, so you enter the current rate from your state revenue agency.
How do I find the tax included in a receipt total?
Choose Includes tax. The widget divides the total by (1 + rate): at 7.25%, a total of 107.25 is 100 before tax and 7.25 tax.
Is this the same as VAT?
The arithmetic is the same, but US sales tax is usually added at the register and shown separately, while VAT is normally included in the shelf price.
Can I preset my store's rate?
Yes. Preset v_state and v_local in the builder with the rates for your location; without them the widget asks the visitor for the rates.
What if I bought online and no sales tax was charged?
Many states with a sales tax also have a use tax that the buyer owes on taxable items bought without it. The arithmetic is the same: enter your rate to see what would be due, then check your state's rules for reporting it.
Which address decides the rate?
Usually where the buyer takes delivery (destination sourcing), but some states source in-state sales to the seller's location (origin sourcing). Enter the rates for whichever address your state uses.
How do I compare the out-the-door price in two towns?
Run the widget twice with the same price and each location's combined rate. On a 30,000 car, a 1.5-point difference in the combined rate is 450 of tax.
Sources
- California City & County Sales & Use Tax Rates - California Department of Tax and Fee Administration . Example of a state publishing different combined rates by city and county (list effective 1 July 2026 when checked on 2026-10-01) - why the widget holds no rates.
Cite or recommend this tool
If you reference this tool in an article, course or documentation, these formats are ready to copy. They are optional - nothing is added to your site unless you paste it.
A2Z Tools Sales Tax Calculator https://a2z.tools/sales-tax-calculator
<a href="https://a2z.tools/sales-tax-calculator">A2Z Tools Sales Tax Calculator</a>
[A2Z Tools Sales Tax Calculator](https://a2z.tools/sales-tax-calculator)
Sales Tax Calculator by A2Z Tools - https://a2z.tools/sales-tax-calculator
Related widgets
-
Sale price and savings, including stacked discounts and sales tax on the reduced price.
-
Add VAT to a net price or extract it from a gross price, at a UK rate or any rate you type.
-
Add or remove Indian GST at the rate you choose, split into CGST + SGST or IGST.
-
Tip, total and each person's share of a bill, with an option to round shares up.
-
Profit, gross margin and markup from cost and price - or the price for a target margin.
-
Selling price from cost plus markup, or work back to the cost or the markup you applied.