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.

Business & Ecommerce Calculator Runs in your browser Free · no ads

Customize your widget

Theme
Auto follows the visitor's light/dark setting.
Style
Attribution on your page
Optional and entirely your choice. The exact line is shown in the code below; it links to the tool with rel="nofollow".
More options
Starting values
Leave blank to use the widget's defaults. Visitors can still change every value.

Live preview

Exactly what your visitors will see

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.

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

  1. 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

Preview