How to Calculate Sales Tax on Any Purchase
The basic formula for sales tax
Sales tax is a percentage of the purchase price that you add to the total at checkout. The calculation is straightforward: multiply the price of the item by the sales tax rate, then add that amount to the original price.
The formula is: Purchase Price × Sales Tax Rate = Sales Tax Amount, then add that to the purchase price to get your total. For example, if you buy something for $100 and the sales tax rate is 7%, you multiply $100 by 0.07 to get $7 in tax, making your total $107.
The sales tax rate varies by location. It depends on your state, county, and sometimes even your city. Some states have no sales tax at all, while others combine state and local rates that can reach 10% or higher. You can find your local rate on your state's department of revenue website or by asking a cashier.
Key Takeaways
- Sales tax is calculated by multiplying the item price by the tax rate as a decimal (so 7% becomes 0.07).
- Sales tax rates vary by state and locality, and some states have no sales tax while others exceed 10%.
- Most point-of-sale systems calculate tax automatically, but you can verify the math yourself using the basic formula.
- Certain items like groceries, prescription medications, and clothing may be taxed at a lower rate or not taxed at all, depending on your state.
- When shopping online, sales tax rules depend on where the seller is located and where you live, which is why the same item may cost different amounts in different states.
Converting the tax rate to a decimal
The most common mistake in calculating sales tax is forgetting to convert the percentage into decimal form. A 7% tax rate is not 7 — it is 0.07. To convert any percentage to a decimal, divide it by 100 or straightforward move the decimal point two places to the left.
So 7% becomes 0.07, 8.5% becomes 0.085, and 10% becomes 0.10. Once you have the decimal, multiply it by the purchase price. If you skip this step and multiply by 7 instead of 0.07, you will calculate a tax amount that is 100 times too high.
Working through a real example
Suppose you are buying groceries in a state where the sales tax rate is 6%. Your cart total before tax is $85.50. Here is how to calculate what you will pay at checkout:
- Write down the purchase price: $85.50
- Convert the tax rate to decimal form: 6% = 0.06
- Multiply: $85.50 × 0.06 = $5.13
- Add the tax to the original price: $85.50 + $5.13 = $90.63
Your final total is $90.63. You can reverse this to check your work: if you know the final total and the tax rate, divide the final total by (1 + the decimal rate). So $90.63 ÷ 1.06 = $85.50, which matches your original cart.
When items are taxed at different rates
Some states tax different categories of goods at different rates. Groceries and prescription medications are often taxed at a lower rate or not taxed at all, while clothing, electronics, and prepared food may be taxed at the full state rate. A few states tax clothing at a reduced rate or exempt it entirely.
When you have a mixed cart, calculate the tax for each category separately, then add all the tax amounts together. For example, if you buy $50 in groceries (taxed at 0%) and $30 in clothing (taxed at 8%), the tax on groceries is $0 and the tax on clothing is $2.40, for a total tax of $2.40 and a final total of $82.40.
Your receipt will usually break this down by category, so you can see which items were taxed and at what rate. If you are unsure whether a specific item is taxed in your state, check your state's department of revenue website or ask the cashier before you check out.
Sales tax on online purchases
Online sales tax rules are more complicated than in-store purchases because they depend on where the seller is located and where you live. Most online retailers now collect sales tax based on your shipping address, but the rate they charge is the rate in your state, not theirs.
If you order something online and it ships to your address, the retailer should charge your state's sales tax rate. However, some smaller sellers or marketplaces may not collect tax at all, which means you may owe tax when you file your state income tax return — though most states do not actively enforce this for individual purchases.
When you see a price listed online, check whether tax is included in that price or added at checkout. Some retailers show the final price with tax included, while others add it during the checkout process. The total you pay should be the same either way, but knowing which method a site uses helps you budget accurately.
Using a calculator or spreadsheet
For large purchases or when you are comparing prices across multiple items, a calculator or spreadsheet makes the math faster and reduces errors. Most smartphones have a built-in calculator app. If you are tracking multiple purchases, a spreadsheet like Google Sheets or Excel lets you enter the formula once and explore it to many rows at once.
In a spreadsheet, you can set up columns for Item, Price, Tax Rate, and Total. Then use a formula like =B2*(1+C2) to calculate the total including tax, where B2 is the price and C2 is the tax rate as a decimal. This is especially useful if you are budgeting for a project or comparing the true cost of items in different states.
Why stores round differently
When you buy multiple items, the total tax amount may include fractions of a cent. Stores round this to the nearest cent, but different systems may round up or down. If your calculated tax is $5.134, one system might round to $5.13 while another rounds to $5.14. This difference is usually just a penny, but it is why your receipt total might be a cent or two different from what you calculated by hand.
This rounding is normal and legal. You do not need to worry about it unless you notice a consistent pattern of rounding that favors the store. For most purchases, the difference is negligible, and your calculation method is correct even if the final penny differs from what the register shows.
Frequently Asked Questions
Do I have to pay sales tax on everything I buy?
No. Most states exempt groceries, prescription medications, and medical equipment from sales tax. Some states also exempt clothing or have a lower tax rate for certain items. The exemptions vary significantly by state, so check your state's rules for the specific items you are buying.
What if the sales tax rate changes during the year?
Sales tax rates can change, usually on January 1st or when a new local tax takes effect. If you are budgeting for the year, check your state's department of revenue website for any announced changes. Most point-of-sale systems update automatically, so you will see the new rate at checkout.
Can I deduct sales tax on my income tax return?
You cannot deduct sales tax on personal purchases. However, if you own a business, you may be able to deduct sales tax paid on business supplies or equipment. Consult a tax professional about what business expenses you can deduct.
Why do some states have no sales tax?
States choose their own tax systems. States like Alaska, Delaware, Montana, New Hampshire, and Oregon have no statewide sales tax. Some of these states use other taxes (like income tax or property tax) to fund services instead. If you live in a no-sales-tax state, you still pay tax on some services and may owe use tax on out-of-state purchases.
How do I calculate tax if I am buying something used or on sale?
Sales tax is calculated on the final price you pay, not the original price. If an item is on sale for $50 instead of $100, you calculate tax on the $50. If you are buying a used item, tax is calculated on whatever price you and the seller agree on. The formula stays the same — just use the actual amount you are paying.
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.