Free, open-source US sales tax calculation.

Self-host. Pay $0 per transaction. Calculate sales tax for all 50 states + DC + Puerto Rico with statutory citations.

Apache 2.0 · No accounts · No tracking

What it does

Calculate

Point-of-sale and invoice tax for every US jurisdiction, with per-jurisdiction breakdown and statutory citations on every rule.

Self-host

Docker Compose; runs anywhere. PostgreSQL or MariaDB. No phone-home. The data ships with the engine; refresh on your schedule.

Free forever

Apache 2.0 license. No per-transaction fees. No usage tiers. The Streamlined Sales Tax data is public; this is the calculator that wraps it.

Coverage

All 52 jurisdictions tier-1 maintained. Every US state, plus DC and Puerto Rico. Statewide rate is live everywhere; per-county / per-city is loaded from the Streamlined Sales Tax quarterly files for the 24 SST member states; deeper sub-state modeling for non-SST states is on the roadmap.

ALAKAZARCACOCTDEDCFLGAHIIDILINIAKSKYLAMEMDMAMIMNMSMOMTNENVNHNJNMNYNCNDOHOKORPARISCSDTNTXUTVTVAWAWVWIWYPR

Self-host in 5 minutes

The whole engine ships as a single Docker Compose file. Three commands and you have a private API at http://localhost:8080:

git clone https://github.com/ejosterberg/open-sales-tax
cd open-sales-tax
docker compose --profile postgres up -d
docker compose --profile postgres run --rm api alembic upgrade head
docker compose --profile postgres run --rm api python -m opensalestax data load-zcta

Then visit http://localhost:8080/v1/docs for the Swagger UI, or POST against /v1/calculate directly.

Why this exists

Commercial sales-tax APIs (Avalara, TaxJar, Stripe Tax) charge per transaction or per address lookup. For a small online store running 1,000 orders a month, that's hundreds of dollars a year for math that derives from public data.

OpenSalesTax wraps the same public data into a free, self-hostable HTTP API with statutory citations on every rule. Use it for your own checkout, your in-house bookkeeping, or to validate what your commercial vendor returns.