How to calculate sales tax

by TaxJar March 1, 2023

In the US when you make a purchase, or sell an item, you need to factor in sales tax. Why? Sales tax is levied at the state level. And the forty-six US states with a sales tax use the funds collected every time a consumer makes a purchase to fund state budget items like hospitals or schools.

Sales tax is a percentage of a sale. That means the amount of sales tax you are required to pay will always be based on the sale price of the item or items you’re buying. 

For example, if you buy a $10 item and the sales tax rate is 5%, then you’d pay .50 cents in sales tax on that item, for a total of $10.50 on the entire transaction. How’d we calculate that? Here’s how.

How do you calculate sales tax?

  1. Determine the cost of the item you are purchasing. 
  2. Determine the sales tax rate at the point of sale. The point of sale is wherever you are taking possession of the item. If you are ordering it online, the point of sale is the address where you are having the item shipped.
  3. Translate the sales tax rate to decimal format. For example, 7% would be .07 in decimal format.
  4. Multiply [Price of item] x [Sales tax rate in decimal format] = [Sales tax amount] 
  5. To get the total of the entire transaction, then do this: [Sales Tax Amount] + [Price of Item] = [Transaction Total]

Let’s look at an example:

Say you are buying a garden hose for $29.99 and the sales tax rate is 7.25%. 

Translate the 7.25% to a decimal. That’s .0725.

Then multiply $29.00 by .0725.

What do you get?

The amount of sales tax you’ll pay on this purchase is $2.10.

The total amount you will pay for your garden hose is the $29.99 sale price plus the $2.10 sales tax, or $32.09.

When do you need to calculate sales tax?

Maybe you’re getting ready to make a big purchase and you want to calculate exactly how much you’ll be paying out of pocket. (Or maybe you still remember the trauma of being at Toys R’ Us with your crisp birthday $20 bill and realizing that you can’t buy the $19.99 Little Scientist Microscope because of sales tax. Or is that just me?) 

But the most common reason you’d need to calculate sales tax is because you are a retailer making a sale. You have obligations to your customers and to the state to charge the right amount of sales tax every time. And in that case, TaxJar has your back! 

How retailers can automate sales tax calculations

The TaxJar API is a sales tax calculation engine for e-commerce merchants running their own storefront, shopping cart or marketplace. With the TaxJar API, TaxJar works within your online shopping cart to determine how much sales tax you should collect.

The TaxJar API takes your address, your buyer’s address, your sale and shipping amount, and the state’s specific sales tax rules into account to make sure you charge your customer the right amount of sales tax on every sale. Sell products like groceries or clothing that are taxed differently in different states? Need to collect sales tax on shipping? TaxJar has all those scenarios covered. 

TaxJar’s sales tax API clocks in at sub-18ms with 99.99% uptime. Our calculations are over 99% accurate and we offer an accuracy guarantee for all TaxJar API users.

Ready to get started calculate sales tax in your e-commerce store without worrying about moving the decimal? To learn more about TaxJar and start a free trial, visit TaxJar.com


Try TaxJar for free

TaxJar offers one platform to manage every aspect of sales tax compliance from calculations to reporting to filing. Try our sales tax compliance platform for 30 days, completely free with no obligation.