Skip to content

How is sales tax calculated? Rates, sourcing, taxability and rounding

Sales tax looks like one multiplication: price times rate. In practice every part of that is a rule set by a state, and sometimes a city. Which rate applies depends on where the sale is sourced. Whether the item is taxable at all depends on the state’s definitions. The rate itself is usually a state rate plus one or more local rates. And the rounding has its own rule. A seller gets all four right on every invoice, in every state where it has nexus, or the difference comes out of its margin.

Topic
Sales tax
Reading time
6 min
Updated
A diagram of the idea. Point at it; nothing in it is anyone’s real numbers.

The rate is a stack

Forty-five states and the District of Columbia have a statewide sales tax. On top of that, most of those states let counties, cities and special districts (transit, stadium, hospital) add their own rates. The rate that applies to a sale is the sum for that exact location, not the state rate. California’s statewide rate of 7.25% is the highest base rate, but local add-ons push combined rates higher in many states with lower base rates.

Averages show how much the local layers matter. The Tax Foundation’s mid-2026 figures put the population-weighted national average combined rate at 7.53%, with Louisiana the highest average at 10.13%, followed by Tennessee, Washington, Arkansas and Alabama. Within one state, rates can differ across a street, because district boundaries don’t follow ZIP codes. That’s why sales tax software looks up the rate by full address, and why a ZIP-code rate table is the most common source of small, persistent errors.

Sourcing: origin or destination

Sourcing decides whose rate applies. Under destination sourcing, the rate is the one where the buyer receives the item; under origin sourcing, the one where the seller is. Most states are destination-based. A minority, Texas among them, use origin sourcing for sales by sellers located in the state, and California is a hybrid: state, county and city taxes follow the seller’s location, while district taxes follow the destination.

For a startup selling online, the practical rule is simpler: a remote seller, with nexus in a state but no location there, generally applies the destination rate, the customer’s address. Origin rules mostly matter for sales inside a seller’s home state. Services and digital products add another layer, since states source them by where the service is used or received, which is why you need the customer’s address on every sale even when nothing ships.

Taxable or exempt

Sales tax was built for tangible goods, and every state draws its own lines from there. Groceries, prescription drugs and clothing are commonly exempt or taxed at reduced rates. Services are mostly exempt, with long lists of exceptions. Digital products are where states diverge the most.

Software as a service is the question that catches startups. Many states don’t tax it. New York taxes it as prewritten software regardless of how it’s delivered. Washington taxes it as a digital automated service. Texas taxes it as a data processing service, with 20% of the charge exempt by statute, so on a $1,000 subscription the tax applies to $800. Some states tax SaaS only when sold to businesses, or only in certain cities. Bundles complicate it further: a subscription that includes taxable and non-taxable parts may be taxed in full unless the parts are priced separately.

Exemptions also depend on the buyer. A reseller, a nonprofit or a government agency may be exempt, but only with a valid exemption certificate on file. The certificate is your proof; without it, the tax you didn’t collect is yours.

Rounding: per line or per invoice

Tax is computed to more precision than a cent and then rounded. The states that follow the Streamlined Sales and Use Tax Agreement compute to the third decimal place and round up to the next cent when the third digit is greater than four, and let the seller choose to compute tax per item or per invoice. Other states have their own rules, but the same choice exists in most.

The choice changes the answer. Three items at $4.99 with an 8.25% rate: per line, each item’s tax is $0.411675, rounded to $0.41, for $1.23. Per invoice, $14.97 at 8.25% is $1.235025, rounded to $1.24. A cent per invoice, over a year of invoices, is a reconciliation difference between the tax you collected and the tax the return computes. Pick one method, use it everywhere, and make sure your billing system and your tax engine use the same one.

Discounts, shipping and other adjustments

The taxable price isn’t always the sticker price:

  • A discount you give reduces the taxable price in most states. A manufacturer’s coupon reimbursed by a third party often doesn’t.
  • Shipping and handling is taxable in some states, exempt when separately stated in others, and split in a few.
  • Refunds return the tax with the price; the tax credit belongs on the return for the period of the refund.
  • Bad debts on taxable sales can usually be deducted on a later return, under each state’s rules.

What a receipt or invoice must show

In most states the tax must be stated separately from the price, and the invoice should show enough to prove the calculation: the seller’s name, the date, each item and whether it’s taxable, the taxable subtotal, the tax amount and the total. Many states also expect the rate or the jurisdiction, and a few allow tax-included pricing in limited settings. If you charge tax in a state, keep invoices that show it; if you don’t, keep the reason (an exemption certificate, a non-taxable product, a non-nexus state).

Buyers have the mirror obligation. When a business buys something taxable for its own use and the seller didn’t charge tax, the buyer usually owes use tax at the same rate. Software bought from an out-of-state vendor that doesn’t collect is the common case for startups.

In the books

Tax collected is never revenue. It goes to a sales tax payable account, one per state if you file in several, and comes out when you pay the return. At each monthly close, reconcile that account: its balance should equal the tax on the returns about to be filed. A balance that drifts means a rate, a rounding method or a refund didn’t flow through the same way in billing and in the return.

Common questions

How do you calculate sales tax on an invoice?

Taxable price times the combined rate for the place the sale is sourced to: the state rate plus any county, city and special district rates. For most sales shipped or delivered to a customer that is the customer’s address. The result is rounded to the cent under the state’s rounding rule.

Is software as a service taxable?

It depends on the state. Many states don’t tax SaaS at all. New York treats it as taxable prewritten software; Washington taxes it as a digital automated service; Texas taxes it as a data processing service with 20% of the charge exempt, so tax applies to 80%. Others tax it only for business customers or only in some localities. Check each state where you have nexus.

Is shipping subject to sales tax?

Sometimes. Some states tax shipping and handling when the item shipped is taxable, some don’t tax a separately stated delivery charge, and some tax handling but not postage. If you charge shipping, its treatment is one more per-state setting.

What if a customer says they’re tax-exempt?

Get a valid exemption certificate from the buyer (a resale certificate, or a nonprofit or government exemption) at or before the sale, and keep it. Without one, the state generally treats the sale as taxable and the uncollected tax as yours.

Where does collected sales tax go in the books?

In a liability account, sales tax payable, never in revenue. It is money you hold for the state. Each return should tie to the change in that account, and the account should be near zero after you pay.

Terms in this guide

Each one has its own page in the founder glossary. Hover for the short version, or open the full entry.

Works in your QuickBooks Online or Xero file

Want this handled without thinking about it?

Lopifi is building AI bookkeeping that keeps your books closed on US GAAP as transactions happen, watches deadlines like the ones above, and has a CPA review everything each quarter, for $200 a month. We’re not open yet.

$200/month when we open. No card now.

General information for US companies, not tax, legal or accounting advice for yours. Rules and thresholds change; confirm the specifics with a CPA before you act on them.