Skip to main content

HomeAll guides

How to Calculate and Add Sales Tax to a Purchase

The basic formula for adding sales tax

To add sales tax to a purchase, multiply the pre-tax price by the sales tax rate, then add that amount to the original price. The formula is: Pre-tax price × Sales tax rate = Tax amount, then Pre-tax price + Tax amount = Total price.

For example, if you buy an item for $50 and the sales tax rate is 8%, you multiply $50 by 0.08 to get $4. Then you add $4 to $50 to reach a total of $54. Most point-of-sale systems and online checkout pages do this calculation automatically, but understanding the math helps you verify receipts or estimate costs before you reach the register.

The sales tax rate varies by location. Your state, county, and sometimes even your city each set their own rate, and these rates stack on top of each other. A state might charge 5%, a county might add 1%, and a city might add 0.5%, for a combined rate of 6.5%. Always check the rate for your specific location before calculating.

Key Takeaways

  • Multiply the item price by the tax rate (expressed as a decimal) to find the tax amount, then add that to the original price.
  • Sales tax rates vary by state, county, and city, so the rate where you live may differ from rates in other locations.
  • Some items are exempt from sales tax in most states, including groceries, prescription medications, and medical equipment, though rules differ by state.
  • Online retailers must collect sales tax based on where the item is being shipped, not where the business is located.
  • You can find your local sales tax rate on your state's Department of Revenue website or by searching for your city and county name plus "sales tax rate."

Converting a percentage to a decimal for the calculation

Sales tax rates are shown as percentages, but to use them in a math formula, you need to convert them to decimals. Divide the percentage by 100, or straightforward move the decimal point two places to the left. A rate of 8% becomes 0.08, a rate of 6.5% becomes 0.065, and a rate of 10% becomes 0.10.

Once you have the decimal, multiply it by the pre-tax price. If your item costs $75 and the rate is 7%, convert 7% to 0.07, then multiply: $75 × 0.07 = $5.25. Add $5.25 to $75 to get your total of $80.25. This same method works for any rate, whether it is a whole number or includes a decimal.

Finding your local sales tax rate

Your state's Department of Revenue website lists the statewide rate and often shows county and city rates as well. Search for "[Your State] Department of Revenue sales tax rates" to find the official page. Many states also offer a rate lookup tool where you enter your zip code and get the exact combined rate for your location.

If you cannot find your rate online, call your local tax assessor's office or city hall. They can tell you the state rate, county rate, and any city rate that applies to your address. Keep in mind that rates change occasionally, so if you are planning a large purchase, it is worth checking the current rate rather than relying on a number from several months ago.

Items that are often exempt from sales tax

Most states do not charge sales tax on groceries, prescription medications, and medical devices like wheelchairs or hearing aids. However, the definition of "groceries" varies: prepared foods, candy, and soft drinks are often taxed even though raw ingredients are not. Some states exempt clothing, while others tax it. A few states do not charge sales tax at all.

When you are unsure whether an item is taxed, check your receipt after purchase or ask the cashier before you buy. The receipt will show whether tax was added. If you are shopping online, the checkout page usually shows the tax calculation before you complete your order, so you can see what is being taxed and what is not.

How sales tax works in online shopping

Online retailers are required to collect sales tax based on where the item is being shipped, not where the business is located. If you live in a state with an 8% sales tax and order from an out-of-state retailer, you still pay 8% tax on the item when it arrives at your address. The retailer collects the tax and sends it to your state.

Some smaller online sellers are not required to collect sales tax, but you may still owe it to your state. This is called "use tax," and it applies to items you purchase out of state and bring into your state. Most people do not pay use tax voluntarily, but some states ask you to report it on your income tax return. The tax rate is usually the same as your local sales tax rate.

Calculating tax on multiple items

When you have a cart with several items, you can calculate the total tax in two ways. The first way is to add up all the pre-tax prices, then multiply that total by the tax rate. If you buy a $20 shirt, a $30 pair of pants, and a $15 hat, your subtotal is $65. Multiply $65 by 0.08 (if your rate is 8%) to get $5.20 in tax, for a total of $70.20.

The second way is to calculate tax on each item separately, then add all the taxes together. This method can produce a slightly different result if the tax rate has many decimal places, but for most everyday shopping, both methods give you the same answer. Point-of-sale systems and online checkout pages use the first method — they calculate tax on the subtotal rather than on each line item.

What to do if the tax amount on your receipt looks wrong

Check the receipt against the formula: pre-tax subtotal × tax rate = tax amount. If the numbers do not match, the cashier or the register may have made an error. Compare the tax rate shown on the receipt to the rate you know is correct for your location. Rates change occasionally, and an old rate might still be programmed into an older register.

If you find a mistake, show the receipt to the cashier or manager. Most stores will correct the charge on the spot. If you paid by card and left the store, contact the store within a few days and ask them to issue a refund for the overcharge. Keep your receipt as proof of the error.

Frequently Asked Questions

Do I add sales tax to the subtotal or to each item?

You add it to the subtotal. Add up the pre-tax price of all items, then multiply that total by the tax rate. This is how registers work, and it produces the same result as calculating tax on each item separately in most cases.

What if I buy something in one state and take it home to another state?

You pay sales tax in the state where you make the purchase. If you buy an item in a state with no sales tax and take it home to a state with sales tax, you do not owe tax on that purchase. However, if you order something online and have it shipped to your home state, you pay your home state's tax rate.

Can I return an item and get the sales tax back?

Yes. When you return an item, the store refunds both the item price and the tax. The refund appears on your receipt or credit card statement as a negative charge. If you paid cash, ask for a cash refund that includes the tax amount.

Why does the same item cost different amounts in different cities?

Because sales tax rates vary by location. A $50 item costs $54 in a city with 8% tax but $52.50 in a city with 5% tax. The item price is the same, but the tax added on top is different. Some cities also have local taxes that other cities do not.

Is there a quick way to estimate the total without doing the math?

Yes. If your tax rate is around 8%, multiply the subtotal by 1.08 to get the total with tax included. If it is 6%, multiply by 1.06. If it is 10%, multiply by 1.10. This skips the step of calculating tax separately and gives you the final amount in one multiplication.

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.