Personal Finance2 min read

How to Calculate Sales Tax on Any Purchase

De Van Do

May 19, 2026

Sales tax is straightforward to calculate once you know the rate -- and most states post their rates publicly. The trickier calculation is the reverse: you have a receipt total and want to know what the pre-tax price was. Here is how to do both.

Calculating Tax on a Purchase (Forward)

Formula: Tax Amount = Purchase Price x (Tax Rate / 100)

Total with Tax = Purchase Price + Tax Amount

Or more directly: Total = Purchase Price x (1 + Tax Rate / 100)

  • $250 item at 8% tax: $250 x 1.08 = $270 total. Tax paid: $20.
  • $55 item at 9.5% tax: $55 x 1.095 = $60.23 total. Tax paid: $5.23.
  • $1,200 laptop at 7.25% tax: $1,200 x 1.0725 = $1,287 total. Tax paid: $87.

Finding the Pre-Tax Price (Reverse)

If you only have the total and the tax rate:

Pre-Tax Price = Total / (1 + Tax Rate / 100)

  • You paid $324 total at 8% tax: $324 / 1.08 = $300 pre-tax. Tax paid: $24.
  • Receipt shows $47.85 at 6.5% tax: $47.85 / 1.065 = $44.93 pre-tax. Tax: $2.92.

How State and Local Rates Combine

Your actual sales tax rate is almost always a combination of a state rate plus one or more local rates. They simply add together to form the combined rate you pay.

Example: California state rate 7.25% + Los Angeles County district rate 2.5% = 9.75% combined rate. Apply the combined rate to the purchase price as a single number.

What Gets Taxed and What Doesn't

Sales tax does not apply uniformly to everything. Most states exempt:

  • Unprepared groceries (in about 32 states)
  • Prescription medications (in most states)
  • Some clothing items (Pennsylvania, New Jersey, and others)

Prepared food (restaurant meals, hot takeout) is generally taxable even in states that exempt groceries. Digital goods and services are taxed inconsistently and rules vary by state.

Online Purchases

Since the 2018 Supreme Court ruling in South Dakota v. Wayfair, major online retailers collect sales tax in all states that have one. Smaller retailers may not -- but technically you owe "use tax" on those purchases to your home state regardless, a rule rarely enforced on individuals.

To calculate exactly what you will pay on any purchase, our Sales Tax Calculator adds tax or strips it out in one step.

About the author

De Van Do

De Van Do has a background in technology and maintains MyPctCalculator as part of a small network of free calculator sites covering percentages, loans, insurance, and taxes. Read more on the About page.

Editorial note: This article is for general educational purposes only and does not constitute financial, medical, or professional advice. Examples use rounded figures for illustrative clarity. Individual results may vary. Always consult a qualified professional for important decisions.

Try these related calculators