How to Calculate Sales Tax: A Simple Guide

August 6, 2026

How to Calculate Sales Tax: A Simple Guide

Sales tax math is simple arithmetic, but the part people actually get stuck on is knowing the right rate to use — since it varies not just by state, but often by county and city too. Here is both the calculation itself and how to figure out which rate actually applies.

The sales tax formula

Sales tax amount = price × tax rate (as a decimal)

Total price = price + sales tax amount

A worked example

A $150 purchase with a combined 8.25% sales tax rate:

Tax amount = 150 × 0.0825 = $12.38
Total price = 150 + 12.38 = $162.38

Working backward: finding the pre-tax price from a total

If you know the final total and the tax rate but need the original price (useful for checking a receipt or budgeting):

Pre-tax price = Total price / (1 + tax rate)

A $162.38 total at 8.25% tax: 162.38 / 1.0825 = $150.00

Why sales tax rates vary so much

In the United States, sales tax is set at the state level, but many states also allow counties and cities to add their own local sales tax on top, which is why the same state can have noticeably different combined rates depending on exactly where a purchase happens. A handful of states — Delaware, Montana, New Hampshire, and Oregon — have no state sales tax at all, and Alaska has no state sales tax but allows local sales taxes in some areas.

Common exemptions worth knowing about

Many states exempt certain categories from sales tax entirely, or tax them at a reduced rate — groceries, prescription medications, and clothing are common examples, though exactly which categories are exempt (and at what rate) varies significantly by state. Always check your specific state and local rules rather than assuming a blanket rate applies to everything.

Tip: for online purchases, the sales tax rate applied is typically based on the shipping destination, not the seller's location, following rules established after the 2018 South Dakota v. Wayfair Supreme Court decision.

Calculating tax across multiple items or a full cart

For a single item, the formula above is quick enough to do by hand. For a full shopping cart with several items, especially if some are tax-exempt and others are not, manually tracking the calculation gets error-prone fast.

CalcMastermind's Sales Tax Calculator handles this instantly, including reverse calculations to find a pre-tax price from a known total.

The bottom line

Sales tax math itself is straightforward multiplication, but getting the right rate for your specific state, county, and city — and knowing what might be exempt — is where the real complexity lives.