Functional Weave
Code in Rust

retail.sales-tax-us@1.1.1

README.md

12,986 bytes · view raw

# retail.sales-tax-us

Status: needs review before publishing: local jurisdictions and product taxability are not modelled.

US sales tax on a taxable amount: the state's base rate, looked up by date
from `data/state-rates.json`, plus a local rate the caller supplies, applied
to the amount and rounded half up to the cent.

## Rates per million

US rates routinely have three or four decimal places: New York City is 8.875%,
Missouri's state rate is 4.225%, some New Mexico local rates are 4.5625%. Basis
points (hundredths of a percent) cannot hold those, so rates here are **parts
per million**: 7.25% is 72500, 8.875% is 88750. Tax is `amount x combined
rate / 1,000,000`, rounded half up once, on the amount given (so pass the
invoice's taxable total to round per invoice, or each line to round per line;
states differ, and most allow either as long as it is consistent).

## What the caller must supply

- **The local rate.** Counties, cities and special districts add their own
  rates, there are thousands of them, and which apply depends on the exact
  delivery address (or, in some states, the seller's location). That lookup is
  out of scope; pass their combined rate in `localRatePerMillion`.
- **Whether the item is taxable at all, and at what rate.** Groceries,
  clothing, prescription drugs and digital goods are exempt or reduced in many
  states. Pass only the taxable amount.
- **Whether you must collect.** Economic nexus thresholds (after *South Dakota
  v. Wayfair*, 2018) differ by state.


## State base rates

The data is the statewide general sales tax rate of every state and DC, each
read from that state's own revenue department (or, where its site refused
automated access, from the state's statute) on 3 October 2026. Only the
statutory state-level rate is used: no average local rate, combined rate or
other figure compiled by a third party. Local rates stay the caller's input,
as they always were.

None of those sources shows a statewide general rate changing during 2026
(Louisiana's rise to 5% took effect on 2025-01-01), so the rows are dated from
2026-01-01, the start of the period they were checked for, not from when each
rate was enacted. An earlier date of sale is refused rather than answered with
a rate that may not have applied. Load older rates as new dated rows before
relying on history.

California, Utah and Virginia include the local portions every location in
the state levies: California's statewide 7.25% (as CDTFA states it), Utah's
4.85% state rate plus the 1.00% local option and 0.25% county option (6.10%;
Utah's Publication 25 lists the three, and every row of its rate chart carries
all three), and Virginia's 5.3% (4.3% state plus 1% local, as Virginia Tax's
rate table states it). Do not add them again in the local rate. Alaska,
Delaware, Montana, New Hampshire and Oregon have no state sales tax (Alaska
and Montana allow local ones). Hawaii's 4% is the general excise tax, which is
levied on the seller and commonly passed on at a slightly higher effective
rate; pass the difference as local if you do.

**Not verified from a live official page:** Alaska and New Hampshire. Both
states' sites refused automated access on the day of the check. Alaska's 0% is
from the Office of the State Assessor's own page as archived on 2026-01-21
("The State of Alaska does NOT levy a sales tax"); a 2026 bill proposing a
statewide sales tax was not confirmed as passed or failed on an official page.
New Hampshire's 0% could only be seen in search-result extracts of the
Department of Revenue Administration's pages. Both rows say UNVERIFIED in
their note. Check them by hand before relying on them.

## Sources

Each state's rate, from the state's own publication, checked 2026-10-03:

| State | Rate | Source | Page |
|---|---|---|---|
| AL | 4% | Alabama Department of Revenue, "State Sales and Use Tax Rates" | https://www.revenue.alabama.gov/sales-use/state-sales-use-tax-rates/ |
| AK | 0% | Alaska Office of the State Assessor, "Alaska Sales Tax Information" (**unverified live**; archived copy of 2026-01-21) | https://www.commerce.alaska.gov/web/dcra/OfficeoftheStateAssessor/AlaskaSalesTaxInformation.aspx |
| AZ | 5.6% | Arizona Department of Revenue, "Understanding Use Tax" (and the TPT rate table, 2026-01-01) | https://azdor.gov/individuals/income-tax-filing-assistance/understanding-use-tax |
| AR | 6.5% | Arkansas DFA, "State Sales & Use Tax Rates" | https://www.dfa.arkansas.gov/office/taxes/excise-tax-administration/sales-use-tax/sales-use-tax-rates/state-sales-use-tax-rates/ |
| CA | 7.25% | CDTFA, "California City & County Sales & Use Tax Rates" | https://www.cdtfa.ca.gov/taxes-and-fees/sales-use-tax-rates.htm |
| CO | 2.9% | Colorado Department of Revenue, "Sales Tax Guide" | https://tax.colorado.gov/sales-tax-guide |
| CT | 6.35% | Connecticut DRS, "Sales and Use Tax Information" | https://portal.ct.gov/drs/sales-tax/tax-information |
| DE | 0% | Delaware Division of Revenue, "Step 4: Learn About Gross Receipts Taxes" | https://revenue.delaware.gov/business-tax-forms/doing-business-in-delaware/step-4-gross-receipts-taxes/ |
| DC | 6% | DC Office of Tax and Revenue, "Sales & Use Tax" | https://otr.cfo.dc.gov/page/sales-use-tax |
| FL | 6% | Florida Department of Revenue, "Florida Sales and Use Tax" | https://floridarevenue.com/taxes/taxesfees/Pages/sales_tax.aspx |
| GA | 4% | Georgia Department of Revenue, "Tax Rates" | https://dor.georgia.gov/taxes/business-taxes/sales-use-tax/tax-rates |
| HI | 4% | Hawaii Department of Taxation, "General Excise Tax (GET) Information" | https://tax.hawaii.gov/geninfo/get/ |
| ID | 6% | Idaho State Tax Commission, "Sales and Use Taxes: Basics Guide" | https://tax.idaho.gov/taxes/sales-use/online-guide/ |
| IL | 6.25% | Illinois Department of Revenue, "PIO-101, Illinois Sales & Use Tax Matrix" | https://tax.illinois.gov/research/taxinformation/sales/rot/pio-101.html |
| IN | 7% | Indiana Department of Revenue, "Sales Tax" | https://www.in.gov/dor/i-am-a/business-corp/sales-tax/ |
| IA | 6% | Iowa Department of Revenue, "Sales & Use Tax Guide" | https://revenue.iowa.gov/taxes/tax-guidance/sales-use-excise-tax/sales-use-tax-guide |
| KS | 6.5% | Kansas Department of Revenue, "Sales (Retailers)" | https://www.ksrevenue.gov/bustaxtypessales.html |
| KY | 6% | Kentucky Department of Revenue, "Sales & Use Tax" | https://revenue.ky.gov/Business/Sales-Use-Tax/Pages/default.aspx |
| LA | 5% | Louisiana Department of Revenue, "What is the state sales tax rate?" | https://revenue.louisiana.gov/tax-education-and-faqs/faqs/sales-tax-reform/what-is-the-state-sales-tax-rate/ |
| ME | 5.5% | Maine Revenue Services, "Sales and Use Tax Rates & Due Dates" | https://www.maine.gov/revenue/taxes/sales-use-service-provider-tax/rates-due-dates |
| MD | 6% | Comptroller of Maryland, "Business Tax Tip #8" (and Tax-General Article 11-104) | https://www.marylandcomptroller.gov/content/dam/mdcomp/tax/legal-publications/tips/business/bustip8.pdf |
| MA | 6.25% | Massachusetts General Laws, chapter 64H, section 2 | https://malegislature.gov/Laws/GeneralLaws/PartI/TitleIX/Chapter64H/Section2 |
| MI | 6% | Michigan Department of Treasury, "Sales and Use Taxes" | https://www.michigan.gov/taxes/business-taxes/sales-use-tax |
| MN | 6.875% | Minnesota Department of Revenue, "Taxes and Rates" | https://www.revenue.state.mn.us/guide/taxes-and-rates |
| MS | 7% | Mississippi Department of Revenue, "Sales Tax Rates" | https://www.dor.ms.gov/business/sales-use-tax/sales-tax-rates |
| MO | 4.225% | Missouri Department of Revenue, "Sales/Use Tax" | https://dor.mo.gov/taxation/business/tax-types/sales-use/ |
| MT | 0% | Montana Department of Revenue, "Sales Tax Guidance for Montana Business and Residents" | https://revenue.mt.gov/taxes/general-sales-tax |
| NE | 5.5% | Nebraska Department of Revenue, "Nebraska Sales and Use Tax" | https://revenue.nebraska.gov/businesses/nebraska-sales-and-use-tax |
| NV | 6.85% | Nevada Department of Taxation, "Sales & Use Tax Publications" | https://tax.nv.gov/news-publications/sales-use-tax-publications/ |
| NH | 0% | New Hampshire DRA, "Does New Hampshire have a sales tax?" (**unverified**: the page refused automated access) | https://www.revenue.nh.gov/faq/does-new-hampshire-have-sales-tax |
| NJ | 6.625% | New Jersey Division of Taxation, "Rates and Boundaries" | https://www.nj.gov/treasury/taxation/salestax.shtml |
| NM | 4.875% | New Mexico Taxation and Revenue Department, "Local Option Taxes" | https://www.tax.newmexico.gov/governments/municipal-county-governments/local-option-taxes/ |
| NY | 4% | New York State Department of Taxation and Finance, "Find sales tax rates" | https://www.tax.ny.gov/bus/st/rates.htm |
| NC | 4.75% | North Carolina Department of Revenue, "Sales and Use Tax Rates" | https://www.ncdor.gov/taxes-forms/sales-and-use-tax/sales-and-use-tax-rates |
| ND | 5% | North Dakota Office of State Tax Commissioner, "Sales and Use Tax" | https://www.tax.nd.gov/business/sales-and-use-tax |
| OH | 5.75% | Ohio Revised Code section 5739.02 | https://codes.ohio.gov/ohio-revised-code/section-5739.02 |
| OK | 4.5% | Oklahoma Tax Commission, "Sales and Use Tax" | https://oklahoma.gov/tax/businesses/sales-use-tax.html |
| OR | 0% | Oregon Department of Revenue, "Sales Tax in Oregon" | https://www.oregon.gov/dor/programs/businesses/pages/sales-tax.aspx |
| PA | 6% | Pennsylvania Department of Revenue, "Sales, Use and Hotel Occupancy Tax" | https://www.pa.gov/en/agencies/revenue/resources/tax-types-and-information/sales-use-and-hotel-occupancy-tax.html |
| RI | 7% | Rhode Island General Laws section 44-18-18 | http://webserver.rilegislature.gov/Statutes/TITLE44/44-18/44-18-18.htm |
| SC | 6% | South Carolina Department of Revenue, "Sales Tax" | https://dor.sc.gov/tax/sales |
| SD | 4.2% | South Dakota Department of Revenue, "Sales & Use Tax" | https://dor.sd.gov/businesses/taxes/sales-use-tax/ |
| TN | 7% | Tennessee Department of Revenue, "Sales and Use Tax" | https://www.tn.gov/revenue/taxes/sales-and-use-tax.html |
| TX | 6.25% | Texas Comptroller, "Sales and Use Tax" | https://comptroller.texas.gov/taxes/sales/ |
| UT | 6.10% | Utah State Tax Commission, "Publication 25 – Sales and Use Tax General Information" (Rev. 9/26), chart 2, and "Combined Sales and Use Tax Rates" (2026-10-01) | https://files.tax.utah.gov/tax/forms/pubs/pub-25.pdf |
| VT | 6% | Vermont Department of Taxes, "Sales and Use Tax" | https://tax.vermont.gov/business/sales-and-use-tax |
| VA | 5.3% | Virginia Tax, "Retail Sales and Use Tax" and "5.3% Virginia Sales Tax Table" | https://www.tax.virginia.gov/retail-sales-and-use-tax |
| WA | 6.5% | Washington Department of Revenue, "Retail sales tax" | https://dor.wa.gov/taxes-rates/retail-sales-tax |
| WV | 6% | West Virginia Code 11-15-3, and Tax Division "TSD 100" (Rev. July 2026) | https://code.wvlegislature.gov/11-15-3/ |
| WI | 5% | Wisconsin Department of Revenue, "DOR Tax Rates" | https://www.revenue.wi.gov/Pages/FAQS/pcs-taxrates.aspx |
| WY | 4% | Wyoming Department of Revenue, Excise Tax Division, "Excise Tax FAQs" | https://excise-tax-div.wyo.gov/general-administrative/excise-tax-faqs |

The Streamlined Sales Tax Governing Board's rate files were considered and
not used: the Board says they are "available for any business to use at no
charge", but publishes no licence to redistribute them.

See also the Tax Foundation's annual table of state and local sales tax rates
(https://taxfoundation.org/data/all/state/sales-tax-rates/), a useful
cross-check. None of its figures are used here: its licence is
non-commercial.

## Changes

1.1.0 re-sources every state rate from the state's own publication, in place
of the Tax Foundation table 1.0.x copied, whose licence does not allow
commercial redistribution. Every rate, and so every answer, is the same as
1.0.1; only the sources and the notes in the data changed.

## Before you rely on this

**Not professional advice.** This capability calculates tax figures from published rules. It is a software component for developers, not tax advice. Rules change and every rate here has an effective date. Check that the dates cover your case. Verify results against the official sources listed above, and have an US sales-tax specialist review how you use it, before anyone relies on the output. Provided "as is" under its licence, without warranty.

**Unreviewed.** This capability's implementations agree in every language and pass its published test vectors, which were worked out from the official sources cited. But no qualified US sales-tax specialist has yet checked those vectors, or confirmed that the capability covers the cases it claims. Treat it as a draft. Do not use it for real people, money or decisions without your own expert review. Once a qualified reviewer signs off, this notice is replaced with their name, qualification and the date. Each new version needs fresh sign-off.

1.1.1 marks it unreviewed. The code and the tests are unchanged.