Ecommerce sales tax software has to do more than multiply a total by one percentage: in the US, the correct tax depends on where the buyer is, what is being sold, who the buyer is and what the store is registered to collect. This article covers what the software needs to support. It is a requirements guide, not tax advice.
Tax rules differ by state and locality and change over time. Confirm every tax decision with an accountant or the relevant official tax authority before you build or launch.
Why US sales tax is a software problem
There is no single national sales tax. States set their own rules, and many cities, counties and special districts add their own on top. For a store selling across state lines, that means the tax on one order can differ from the tax on an identical order shipped a few miles away. Several things vary independently:
- Location: the rate depends on the delivery address, and in some places on the seller's address, depending on how that state sources the sale.
- Product type: food, clothing, digital downloads, software and services are treated differently from state to state.
- Shipping and fees: some places tax shipping or handling charges, others do not.
- Buyer status: resellers and some organizations may be exempt with proper documentation.
- Seller obligations: whether you owe tax in a state at all is a question usually called nexus, which an adviser should answer for your business.
Because every one of these can change an order total, tax belongs in your requirements from the first sprint rather than being bolted on before launch.
Calculating tax at checkout: your options
The checkout needs a tax figure before payment is taken, and the customer should see it before they commit. There are three common approaches:
- A fixed rate or a small rate table kept in your own database. This is reasonable only when you sell into a very small number of places and an accountant has confirmed the rates.
- A rate lookup by address using a data feed or a platform feature, which returns a combined rate for a destination.
- A tax calculation service that takes the cart, the addresses and the product tax categories and returns line-by-line tax.
Whichever you choose, design the checkout so that tax is computed from a validated shipping address, recalculated whenever the address, cart, discount or shipping method changes, and stored on the order as a set of line items rather than a single number. If your payment flow is separate, our notes on adding Stripe or PayPal to a web application cover how the order total and the charged amount need to stay in sync.
Ecommerce sales tax software: tax services versus manual rates
A tax calculation service is software, so it has the usual trade-offs. A manual rate table gives you full control and no recurring fee, but you own the job of keeping it correct as jurisdictions change boundaries and rates. A service keeps rate and rule data current for you, and often handles product categories and address matching, but you take on a dependency, a per-transaction or subscription cost, and the need to handle its failures.
| Question | Manual rates | Tax service |
|---|---|---|
| Who keeps rates current? | You, on a schedule you must set | The provider |
| Product categories | Custom mapping you maintain | Usually built in, still needs your mapping |
| Failure behavior | Fully under your control | You must decide what happens if the service is down |
| Reporting support | Whatever you build | Often includes exports; check what |
| Best fit | Few locations, simple catalog | Many states, mixed products |
Whatever you pick, put the tax calculation behind one interface in your code. That way, swapping a provider later is a contained change rather than a rewrite. Decide up front what happens when the lookup fails: block checkout, fall back to a stored estimate, or queue the order for review. Each has consequences, and an accountant should weigh in on the fallback.
Exemptions and resale
Some buyers do not pay sales tax on some purchases, typically resellers and certain nonprofit or government customers, but only when the proper paperwork exists and the state recognizes it. The software questions are practical:
- Can an account be flagged as exempt, with the reason and the jurisdictions it applies to?
- Where are exemption certificates stored, who reviewed them and when do they expire?
- Does the checkout skip tax only for approved, current accounts, and never because a customer ticked a box?
- Does the order record that tax was waived, and on what basis?
An exemption workflow is usually an admin screen, a file upload, a status field and an audit trail. It is small to build and expensive to get wrong, so agree the rules with your adviser before you write them down as requirements.
Records and reporting
Collecting tax is only half the job: someone has to report and remit it, usually per state and often per period. Your software should make that bookkeeping easy to produce:
- Store taxable amount, tax amount, jurisdiction and rate for each order line.
- Keep the tax data on refunds and partial returns, so credits reverse the original tax correctly.
- Never recompute historical tax from today's rates; store what was charged.
- Offer an export by period and jurisdiction that your accountant can use directly.
- Keep records for as long as your adviser says you need them, and make sure backups include them.
If you sell through marketplaces as well as your own store, report the two separately, since who collects the tax can differ. Your accountant will know how to treat each channel.
Testing scenarios
Tax bugs often surface only in unusual combinations, so write test cases deliberately instead of trying a couple of orders by hand. A useful starting set:
- One order to the seller's own state, one to a different registered state, one to a state where the store does not collect.
- A cart with a taxable item and an item with a different treatment.
- Free shipping, paid shipping and a shipping-only change after the address is edited.
- A discount code that applies to one line, and a coupon that applies to the whole cart.
- An exempt customer and a customer whose certificate has expired.
- A full refund, a partial refund and an order with an exchange.
- A rate service timeout, and an address that cannot be matched.
Have your accountant supply expected tax figures for a handful of these. Your tests then check the software against a source you trust, not against its own output.
When to involve an accountant
Involve one before you finalize requirements, not after launch. Ask them where the business needs to collect, how products should be categorized, how shipping and discounts are treated, what exemption evidence is needed and what records to keep. Their answers become configuration and acceptance criteria. If you are comparing the cost of tax features against the rest of a build, our overview of what drives the cost of custom software explains why integration work like this is rarely free.
Stores serving other regions face the same shape of problem under different rules; the GST-ready checkout and VAT-ready store articles are good contrast reading.
Putting it together
Write tax into the requirements as a set of behaviors: calculate from a validated address, store line-level tax, support exemptions with evidence, reverse tax on refunds and export by jurisdiction. Then pick manual rates or a service to fit your catalog. If you want to talk through how this fits a build, our software development for US businesses page describes how we work, and you can check packages for typical engagement shapes.
Frequently asked questions
Can software calculate all US sales tax?
Software can calculate most of it when it is fed correct addresses, product categories and exemption data, and a calculation service can remove a lot of manual rate upkeep. It cannot decide your registration obligations or categorize unusual products for you. Those judgments come from an accountant, and the software then applies them consistently.
What is nexus (in plain terms)?
Nexus is the connection between a seller and a state that can create an obligation to register and collect that state's sales tax. What counts varies by state and can include physical presence or sales activity into the state. Ask an accountant to assess your situation and confirm current rules with each state's tax authority.
How do I handle exempt customers?
Build an account-level exemption flag that only an admin can set after reviewing the customer's documentation. Store the certificate, the jurisdictions it covers and an expiry date, skip tax at checkout only for approved accounts, and record the basis on each order. Your accountant should define which evidence is acceptable.