The Basic Formula: Price × Tax Rate = Tax Amount
Sales tax is calculated by taking the price of what you buy and multiplying it by the tax rate for your location. If an item costs $100 and your sales tax rate is 8%, you multiply $100 by 0.08 to get $8 in tax. The total you pay is $108.
The tax rate itself varies by state, county, and sometimes city. Some states have no sales tax at all. Others range from around 4% to over 10%, depending on where you live and what you're buying. The rate that applies to your purchase depends on where the sale happens — usually where the store is located, though online sales follow different rules that have changed in recent years.
Most stores calculate this automatically at checkout, so you see the final total on your receipt. But understanding how the math works helps you spot errors and know what you're actually paying.
Key Takeaways
- Sales tax is calculated by multiplying the item price by the tax rate as a decimal (so 8% becomes 0.08).
- The tax rate depends on your state, county, and sometimes city, and can range from 0% to over 10%.
- Some items are taxed at a lower rate or not taxed at all, depending on state rules about groceries, medicine, and clothing.
- When you buy multiple items, tax is usually calculated on each item separately, then added together.
- Online purchases are now taxed in most states, even when shipped from out of state, though the rules vary by location.
Converting the Tax Rate to a Decimal
The first step in any calculation is turning the percentage into a decimal. If your tax rate is 7%, divide 7 by 100 to get 0.07. If it's 9.5%, divide 9.5 by 100 to get 0.095. This decimal is what you multiply by the price.
This matters because it's easy to make a mistake. If you multiply $50 by 7 instead of 0.07, you'll get $350 in tax instead of $3.50. Stores and checkout systems do this conversion automatically, but if you're doing the math by hand or checking a receipt, this step is where errors often hide.
Calculating Tax on a Single Item
For one item, the math is straightforward. Take the price before tax, convert the tax rate to a decimal, and multiply them together.
Example: You buy a shirt for $40 in a state with 6% sales tax. Multiply $40 by 0.06. The tax is $2.40. Your total is $42.40.
The price you see on the shelf or online is usually the price before tax. Some stores in some states display the total including tax, but this is not standard. When you see a price tag, assume it does not include sales tax unless the store clearly says otherwise.
Calculating Tax on Multiple Items
When you buy several things at once, most states tax each item separately, then add all the taxes together. You add up the tax amounts, not the prices, and then add that total to the sum of all the prices.
Example: You buy a $20 shirt, a $30 pair of pants, and a $15 hat in a place with 8% tax. The shirt tax is $20 × 0.08 = $1.60. The pants tax is $30 × 0.08 = $2.40. The hat tax is $15 × 0.08 = $1.20. Total tax is $1.60 + $2.40 + $1.20 = $5.20. Your total is $65 + $5.20 = $70.20.
In practice, this is the same as adding up all the prices first ($65), then multiplying by the tax rate ($65 × 0.08 = $5.20). Either way, you get the same answer. Checkout systems use the second method because it's faster.
When Different Items Have Different Tax Rates
Some states tax groceries at a lower rate than other goods, or don't tax them at all. Some states don't tax clothing. A few states tax prepared food differently than raw ingredients. When items in your cart have different tax rates, the store calculates tax on each group separately.
Example: You buy $40 in groceries (taxed at 0%) and a $20 book (taxed at 7%). The groceries have no tax. The book tax is $20 × 0.07 = $1.40. Your total is $40 + $20 + $1.40 = $61.40.
Your receipt will usually show which items were taxed and which were not. If you see an item you thought would be taxed but wasn't, or vice versa, check your state's rules about that category. The store's system is programmed with the state's tax rules, so if something looks wrong, it's worth asking.
How Rounding Works on Your Receipt
When the tax amount comes out to a fraction of a cent, stores round to the nearest cent. Most round up at 0.5 cents and down below that, though the exact rule varies slightly by state. On a single item this difference is tiny, but it's why your receipt might show $5.21 in tax when your calculator says $5.205.
When you buy many items, rounding happens on each line, then all the rounded amounts are added together. This can create small differences between what you calculate by hand and what the register shows. These differences are almost always less than a penny and are not an error.
If you notice a difference of more than a cent or two, or if an entire item appears to be taxed wrong, ask the cashier or check your receipt against the store's posted tax rate. Most stores are happy to explain a charge.
Tax Calculation for Online and Out-of-State Purchases
Online retailers now collect sales tax in most states, even when the company is based elsewhere. The tax rate applied is usually the rate for your shipping address, not where the company is located. This changed over the past few years as states updated their laws.
Some online sellers still don't collect tax, particularly very small businesses or those in states with no sales tax. In those cases, you may owe tax when you file your state income tax return, though most people don't report it. The calculation is the same: price times your local tax rate.
When you see a price online, check whether tax is included in that price or will be added at checkout. Most major retailers add it at checkout, so the final total is higher than what you see on the product page.
Frequently Asked Questions
Why does my receipt show a different tax amount than what I calculated?
Rounding is the most common reason. Stores round each item's tax to the nearest cent before adding them up, which can create small differences from hand calculations. If the difference is more than a penny or two, ask the cashier to explain which items were taxed and at what rate.
Do I pay sales tax on everything I buy?
No. Most states don't tax groceries, medicine, or certain medical equipment. Some don't tax clothing. A few don't tax any services. The rules vary widely by state. Your receipt will show which items were taxed and which were not.
How do I find out what the sales tax rate is in my area?
Your state's Department of Revenue website lists the state rate. County and city rates are often posted on local government websites or the chamber of commerce site. You can also ask a cashier or call a store in your area.
If I buy something online from another state, do I pay their tax rate or mine?
You pay the tax rate for your shipping address, not the seller's location. Most large online retailers calculate this automatically. If a seller doesn't collect tax, you may owe it to your own state, though enforcement is rare for individual purchases.
Can I get sales tax refunded if I return something?
Yes. When you return an item, the store refunds both the price and the tax you paid on it. The refund appears as a credit on your receipt or back to your payment method.