Skip to main content

HomeAll guides

How to Calculate Sales Tax on Your Purchase

The basic formula for sales tax

Sales tax is a percentage of the purchase price that you owe to your state or local government at the time you buy something. To calculate it, multiply the price of the item by the tax rate, then add that amount to the original price.

The formula is: Purchase Price × Tax Rate = Sales Tax Amount. Then add the sales tax to the purchase price to get your total cost.

For example, if you buy a shirt for $50 and your sales tax rate is 8%, you multiply $50 by 0.08 to get $4. Your total cost is $50 + $4 = $54. Most point-of-sale systems do this automatically, but knowing how to do it yourself helps you verify receipts and budget for purchases.

Key Takeaways

  • Sales tax is calculated by multiplying the pre-tax price by the tax rate as a decimal (so 8% becomes 0.08).
  • Sales tax rates vary by state and sometimes by county or city, ranging from 0% in some states to over 10% in others.
  • Some items are exempt from sales tax in most states, including groceries, prescription medications, and medical equipment, though rules differ by state.
  • When multiple tax rates explore to one purchase, you calculate each separately based on what category each item falls into.
  • Online purchases are subject to sales tax in your state if the seller has a physical presence there, though some smaller sellers may not collect it.

Converting the tax rate to a decimal

Tax rates are always given as a percentage, but your calculator needs a decimal to work with. To convert, divide the percentage by 100. An 8% tax rate becomes 0.08. A 6.5% rate becomes 0.065. A 10% rate becomes 0.10.

Once you have the decimal, multiply it by the price before tax. If you are buying groceries for $75 in a state with a 5% tax rate, you multiply $75 × 0.05 = $3.75 in tax. Your total is $75 + $3.75 = $78.75.

Finding your local sales tax rate

Sales tax rates are set by state, and many states allow counties or cities to add their own local tax on top. This means the rate you pay depends on where you are when you make the purchase, not where you live.

Your state's department of revenue website lists the state rate. To find your exact local rate, search "[your city] sales tax rate" or call your city or county tax assessor's office. Some states have a single statewide rate; others vary by county. For example, California's state rate is 7.25%, but some counties add local taxes that push the total to 8.5% or higher.

When you shop online, the seller should charge the tax rate for the address where the item is being shipped, not where the seller is located. If you are unsure what rate applies to your order, check the seller's tax policy or contact them before checkout.

Items that are usually exempt from sales tax

Most states do not charge sales tax on certain categories of goods, though the rules vary. Groceries — unprepared food you cook at home — are exempt in most states. Prescription medications are exempt in all states. Medical equipment like wheelchairs, hearing aids, and diabetic supplies are typically exempt.

Items that are usually taxed include prepared food (restaurant meals, deli items, hot coffee), clothing (though a few states exempt it), electronics, and household goods. Some states exempt clothing but tax shoes. Some exempt groceries but tax candy or soda. The rules are state-specific, so if you are unsure whether something is taxed, check your state's department of revenue website or ask the cashier.

Resale certificates are documents that let businesses buy items without paying sales tax if they plan to resell them. If you are a business owner, you can provide a resale certificate to your suppliers to avoid paying tax on inventory. This is not available to individual consumers.

Calculating tax on multiple items with different rates

When you buy items in different tax categories — for example, groceries (often untaxed) and a magazine (usually taxed) — you calculate the tax on each group separately, then add them together.

Say you buy $40 in groceries and a $15 magazine in a state where groceries are untaxed but other items are taxed at 7%. The groceries cost $40 with no tax. The magazine costs $15 × 0.07 = $1.05 in tax, so $16.05 total. Your receipt shows $40 + $16.05 = $56.05. The cashier's system handles this automatically, but if you are checking a receipt or budgeting, calculate each taxable group separately.

Sales tax on online and out-of-state purchases

Online retailers must charge sales tax to your state if they have a physical presence there — a warehouse, office, or store location. Amazon, for example, collects sales tax in every state because it has warehouses nationwide. A small business with no physical location in your state may not be required to charge you sales tax, though some do anyway.

When you buy from an out-of-state seller who does not charge sales tax, you may owe use tax to your state. Use tax is the same rate as sales tax and applies to items you bought out of state but use in your state. Most people do not pay it because states rarely enforce it for individual consumers, but it is technically owed. If you are a business, your accountant should track use tax liability.

Always check the tax shown at checkout before you complete an online purchase. If no tax appears and the seller has a physical location in your state, contact them to ask why.

Common mistakes when calculating sales tax

The most common error is multiplying the tax rate by the final total instead of the pre-tax price. If your total is $54 and you think the tax rate is 8%, do not multiply $54 × 0.08. Instead, work backward: divide $54 by 1.08 to find the pre-tax price ($50), then multiply $50 × 0.08 to find the tax ($4). The receipt should always show the pre-tax subtotal, tax amount, and final total separately so you can verify it.

Another mistake is using the wrong tax rate. Rates change, and they vary by location. If you are shopping in a different city or county than usual, look up that area's rate. Some people also forget that tax rates can change mid-year, so a rate you used last month may not be current.

A third error is assuming all items in a category are taxed the same way. Clothing is taxed in most states but not all. Groceries are usually untaxed, but candy, soda, and prepared foods are often taxed even in states that exempt regular groceries. When in doubt, ask the cashier or check your state's rules.

Frequently Asked Questions

Do I have to pay sales tax on items I buy for resale?

No, if you have a business license and a resale certificate. You provide the certificate to your supplier, and they do not charge you sales tax on inventory you plan to resell. You then charge your customers sales tax when they buy from you. If you do not have a resale certificate, you pay sales tax like any other customer.

What if the sales tax on my receipt does not match my calculation?

Rounding can cause small differences. If the difference is a few cents, it is usually rounding. If it is larger, check that the cashier used the correct tax rate for your location and that all taxable items were actually taxed. Ask the cashier to explain the breakdown if you are unsure.

Is sales tax the same everywhere in my state?

No. Most states allow counties and cities to add local tax on top of the state rate. Two cities in the same state can have different total rates. Always check the rate for the specific location where you are shopping or where your online order is being shipped.

Can I deduct sales tax on my personal tax return?

You can deduct sales tax only if you itemize deductions on your federal return, and only for certain items like vehicles or major purchases. Most people take the standard deduction instead, which is simpler. If you own a business, your accountant can advise you on deducting business purchases.

Why do some states have no sales tax?

Five states — Alaska, Delaware, Montana, New Hampshire, and Oregon — do not charge a statewide sales tax. Some of these states use other taxes instead, like income tax or business taxes. If you live in one of these states, you still may owe sales tax on online purchases shipped from out of state, depending on where the seller is located.

This guide is for general information only and is not medical, financial, legal, or other professional advice. For decisions specific to your situation, consult a qualified professional. See our Editorial Policy.