WWorkCalc

Search calculators

Search by name, category, or keyword

How to Calculate Sales Tax (and Reverse It)

By WorkCalc Team · August 10, 2026

Sales tax math looks simple until you’re staring at a receipt trying to work backward from a total that already includes it. Adding tax to a price is one operation. Pulling the pre-tax price back out of a tax-included total is a different one, and using the wrong one is a common source of off-by-a-few-cents errors. Here’s how both directions actually work.

Adding tax to a price

When a price doesn’t include tax yet, sales tax is calculated as a percentage of that price, then added on top. If a $100 item carries a 7% sales tax rate, the tax itself is $7.00, and the total you pay is $107.00. That’s the straightforward direction: multiply the price by the tax rate, then add the result to the original price.

The tricky part comes when you’re handed the other number instead. A receipt or invoice often shows only the final total, the amount that already has tax baked in. If you need to know what the item cost before tax, or how much of that total was actually tax, you can’t just multiply the total by the tax rate and subtract; the tax wasn’t calculated on the total, it was calculated on the pre-tax price. Reversing it requires dividing, not subtracting a percentage.

The formula

Adding tax:
Tax Amount   = Price Before Tax × (Tax Rate ÷ 100)
Total        = Price Before Tax + Tax Amount

Reversing tax:
Price Before Tax = Total ÷ (1 + Tax Rate ÷ 100)
Tax Amount        = Total − Price Before Tax

Both directions share the same multiplier, 1 plus the tax rate expressed as a decimal. Going forward, you multiply the pre-tax price by that multiplier to land on the total. Going backward, you divide the total by that same multiplier to land back on the pre-tax price. It’s the same relationship run in opposite directions, which is why one formula can’t substitute for the other.

Worked example: price before tax to total

Say you have a $100.00 item and a 7% sales tax rate. Using the forward formula:

  • Tax amount: $100.00 × (7 ÷ 100) = $7.00
  • Total with tax: $100.00 + $7.00 = $107.00

That’s it: the tax rate applies to the price you started with, and the total is just the price plus that tax amount.

Worked example: total to price before tax

Now flip it. Say a receipt shows a total of $107.00, tax included, and you know the sales tax rate was 7%. You want to know what the item cost before tax and how much of that $107.00 was tax.

The multiplier is 1 + (7 ÷ 100) = 1.07. Divide the total by it:

  • Price before tax: $107.00 ÷ 1.07 = $100.00
  • Tax amount: $107.00 − $100.00 = $7.00

Notice this lands exactly back on the numbers from the first example, because reversing the calculation should always undo it cleanly. If you instead took 7% of $107.00 (which is $7.49) and subtracted that, you’d get $99.51 before tax, which is wrong. That $0.49 gap is the whole reason a separate reverse formula exists.

Why you can’t just subtract the tax rate

The mistake above is easy to make and easy to miss, since $99.51 looks close enough to $100.00 that it might pass a casual glance. But the tax rate was always meant to apply to the pre-tax price, not to the tax-included total, so applying it to the total overstates the tax amount and understates the price before tax. The gap grows with the tax rate: at 7% it’s about half a percent off, but at a 10% combined rate it’s closer to a full percent, enough to matter on a large purchase or when you’re reconciling books rather than just estimating.

The good news is that combined tax rates don’t require any extra steps, just a different input. Most places that charge sales tax layer a state rate on top of city or county rates, and sometimes a special district rate on top of that. Rather than calculating each layer separately, add them together first and use that single combined percentage in either formula. A state rate of 4.5% plus a city rate of 2.5% is just a 7% rate for calculation purposes; the formula doesn’t need or want the components broken out, since sales tax doesn’t compound layer on layer, it’s just a sum of rates applied once to the same base price.

One more thing worth knowing: sales tax rates and rules vary a lot by location, and some categories of goods (groceries, prescription drugs, certain services) are partially or fully exempt in many states. The math here assumes you already know the correct combined rate for your purchase; getting that rate right is a separate, jurisdiction-specific question from applying it correctly once you have it.

FAQ

Why doesn’t subtracting the tax rate from a total work? Because the tax was calculated as a percentage of the pre-tax price, not of the total. Once tax is added, the total is a larger base than the original price, so applying the tax rate directly to the total and subtracting produces a smaller, incorrect pre-tax price. Dividing the total by (1 + tax rate) is the operation that actually reverses the original multiplication.

How do I handle combined state and local sales tax rates? Add the state, county, and city (or district) rates together into one combined percentage, then use that single number in either formula. Sales tax layers are summed, not compounded, so a 4.5% state rate plus a 2.5% city rate is simply a 7% rate applied once to the price.

Does the reverse calculation always give back the exact original price? Yes, as long as you use the same tax rate that was applied going forward. Dividing a tax-included total by (1 + tax rate) is the mathematical inverse of multiplying the pre-tax price by that same factor, so the two directions should always land on matching numbers, aside from ordinary rounding to the nearest cent.

Use the Sales Tax Calculator to run your own numbers.

Related calculators