retail.sales-tax-us Unreviewed
US sales tax on a sale: the state's base rate from dated data plus a local rate the caller supplies.
1.1.1 · published 2026-10-03 by charlie · Anterra
Pinned by 22 tests, run in TypeScript, Python and Rust.
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.
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 in its README, 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.
What it does
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.
For example
sales_tax_us($100.00, CA, 0, 2026-09-01)→ state CA, state rate per million 72,500, local rate per million 0, combined rate per million 72,500, taxable $100.00, tax $7.25, total $107.25 California's 7.25% base on 100.00sales_tax_us($100.00, CA, 15,000, 2026-09-01)→ state CA, state rate per million 72,500, local rate per million 15,000, combined rate per million 87,500, taxable $100.00, tax $8.75, total $108.75 California with a 1.5% local district ratesales_tax_us($19.99, NY, 48,750, 2026-09-01)→ state NY, state rate per million 40,000, local rate per million 48,750, combined rate per million 88,750, taxable $19.99, tax $1.77, total $21.76 New York City's 8.875% needs more precision than basis points
The function
The same function in TypeScript, Python and Rust, pinned by the same tests. Pick your language; the choice follows you around the registry.
pub fn sales_tax_us(amount: &Money, state: &str, local_rate_per_million: i64, on_date: &str) -> UsSalesTax
| amount | Money | the taxable amount in USD; negative for a refund |
| state | string | USPS code: CA, NY, TX, DC |
| local_rate_per_million | int | county, city and district rates combined, per million: 4.875% is 48750 |
| on_date | date | the date of sale |
| returns | UsSalesTax |
The type it declares, generated into your project
/// The rates that applied and the tax.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct UsSalesTax {
pub state: String,
/// 7.25% is 72500
pub state_rate_per_million: i64,
pub local_rate_per_million: i64,
pub combined_rate_per_million: i64,
pub taxable: Money,
/// rounded half up to the cent
pub tax: Money,
pub total: Money,
}
Your code names it in one line, in the file that uses it
fune!(retail.sales-tax-us@^1); // then call sales_tax_us(…)
Imports name this capability’s declared dependencies, which fune builds next to it in your project; each one links to its page.
use super::funejson::Value; ← the fune runtime: the JSON value the test vectors use; fune build keeps it only where a signature takes one
use super::math_round_div::round_div; ← from math.round-div ^1.0.0 · built alongside by fune
use super::money_amount::{money, money_from_value, money_to_value, Money}; ← from money.amount ^1.0.0 · built alongside by fune
use super::retail_sales_tax_us_data::{STATE_RATES, STATE_RATES_HISTORY}; ← this capability’s own data, compiled from data/state-rates.json into the same file by fune build
fn is_iso_date(value: &str) -> bool {
let bytes = value.as_bytes();
bytes.len() == 10
&& bytes[4] == b'-'
&& bytes[7] == b'-'
&& bytes
.iter()
.enumerate()
.all(|(i, b)| i == 4 || i == 7 || b.is_ascii_digit())
}
fn state_rate(state: &str, on_date: &str) -> i64 {
if !STATE_RATES.iter().any(|r| r.state == state) {
panic!("unknown US state \"{}\"", state);
}
let mut best: Option<(&str, i64)> = None;
for r in STATE_RATES {
if r.state != state || on_date < r.valid_from {
continue;
}
if let Some(to) = r.valid_to {
if on_date > to {
continue;
}
}
if best.map_or(true, |(from, _)| r.valid_from > from) {
best = Some((r.valid_from, r.rate_per_million));
}
}
if let Some((_, rate)) = best {
return rate;
}
if STATE_RATES_HISTORY != "full" {
let mut earliest: Option<&str> = None;
for r in STATE_RATES {
if r.state == state && earliest.map_or(true, |e| r.valid_from < e) {
earliest = Some(r.valid_from);
}
}
if let Some(earliest) = earliest {
if on_date < earliest {
panic!(
"no sales tax rate for {} on {}: this build was installed with history={}, so it only carries rates from {}. Reinstall with history=full for older sales.",
state, on_date, STATE_RATES_HISTORY, earliest
);
}
}
}
panic!("no sales tax rate for {} on {}", state, on_date)
}
/// US sales tax: the state's base rate on the date of sale plus the caller's
/// local rate, applied once and rounded half up to the cent.
///
/// # Panics
/// Panics on a malformed date, a non-USD amount, an unknown state, a local
/// rate outside 0..1000000, or a date no rate covers.
pub fn sales_tax_us(amount: &Money, state: &str, local_rate_per_million: i64, on_date: &str) -> UsSalesTax {
if !is_iso_date(on_date) {
panic!("onDate must be an ISO date (YYYY-MM-DD), received \"{}\"", on_date);
}
if amount.currency != "USD" {
panic!("US sales tax is charged in USD, received {}", amount.currency);
}
if !(0..1000000).contains(&local_rate_per_million) {
panic!(
"localRatePerMillion must be from 0 to 999999, received {}",
local_rate_per_million
);
}
let state_rate_per_million = state_rate(state, on_date);
let combined = state_rate_per_million + local_rate_per_million;
let tax = money(round_div(amount.minor * combined, 1000000, "half-up"), "USD");
UsSalesTax {
state: state.to_string(),
state_rate_per_million,
local_rate_per_million,
combined_rate_per_million: combined,
taxable: amount.clone(),
total: money(amount.minor + tax.minor, "USD"),
tax,
}
}
pub fn us_sales_tax_to_value(t: &UsSalesTax) -> Value {
Value::obj(vec![
("state", Value::str(&t.state)),
("stateRatePerMillion", Value::Int(t.state_rate_per_million)),
("localRatePerMillion", Value::Int(t.local_rate_per_million)),
("combinedRatePerMillion", Value::Int(t.combined_rate_per_million)),
("taxable", money_to_value(&t.taxable)),
("tax", money_to_value(&t.tax)),
("total", money_to_value(&t.total)),
])
}
pub fn fune_vector(args: &[Value]) -> Value {
us_sales_tax_to_value(&sales_tax_us(
&money_from_value(&args[0]),
args[1].as_str(),
args[2].as_i64(),
args[3].as_str(),
))
}Install
fune build
With that line in your source, in a Rust project (language rust in fune.project), fune build resolves it and its 2 dependencies, pins them in fune.lock, downloads only the Rust package of each, and builds the code above into your project’s .fune/build, one readable file per capability with a header linking back here. A crate’s build.rs runs it before every compile. Or pin a range in fune.project and build in one step:
fune add retail.sales-tax-us
The manifest, vectors and README with only the Rust implementation. Install it without the registry with fune add ./retail.sales-tax-us-1.1.1-rust.fune, or fetch it from a terminal with fune pull retail.sales-tax-us@1.1.1:rust.
The whole function, every language, is one file too: retail.sales-tax-us-1.1.1.fune, 45,087 bytes, sha256 941ed9edd74dd652b16ec02a4f70e835b7eedcfa4ea77db167bbd6c01ff9bc6d. It installs into a project of any language.
Customise it in your app
The seams this capability offers. Put a marker directly above a function of your own and fune build wires it into the built code; the package on the registry is not changed, the built file’s header lists it under CUSTOMISED, and fune hooks lists every hook in the project. How hooks work.
before — your function gets the arguments and returns them, changed or not, or throws to refuse the call.
// fune: before retail.sales-tax-us
after — your function gets the result and the arguments, and returns the final result.
// fune: after retail.sales-tax-us
replace — inside this capability’s code only, calls to a dependency go to your function, with the same signature. Other capabilities that use it are unaffected; write in * to replace it everywhere.
// fune: replace math.round-div in retail.sales-tax-us
// fune: replace money.amount in retail.sales-tax-us
step — your function runs at a numbered point inside the function’s body, receives the in-scope values it names as parameters, and may return replacements. List the points with fune show retail.sales-tax-us --steps.
// fune: step retail.sales-tax-us after <n|label>
Tests
A version published now needs at least 8 tests for every function, and one that expects the error for each function that throws; the registry refuses it otherwise. fune verify --all runs each case in TypeScript, Python and Rust, and a project runs them again with fune verify. This page lists the cases; it does not run them. The exact JSON is vectors.json.
| Case | Arguments | Expected | |
|---|---|---|---|
| California's 7.25% base on 100.00 | $100.00, CA, 0, 2026-09-01 | → | state CA, state rate per million 72,500, local rate per million 0, combined rate per million 72,500, taxable $100.00, tax $7.25, total $107.25 |
| California with a 1.5% local district rate | $100.00, CA, 15,000, 2026-09-01 | → | state CA, state rate per million 72,500, local rate per million 15,000, combined rate per million 87,500, taxable $100.00, tax $8.75, total $108.75 |
| New York City's 8.875% needs more precision than basis points | $19.99, NY, 48,750, 2026-09-01 | → | state NY, state rate per million 40,000, local rate per million 48,750, combined rate per million 88,750, taxable $19.99, tax $1.77, total $21.76 |
| an exact half cent rounds up: 6.25% of 0.40 is 2.5 cents | $0.40, TX, 0, 2026-09-01 | → | state TX, state rate per million 62,500, local rate per million 0, combined rate per million 62,500, taxable $0.40, tax $0.03, total $0.43 |
| Minnesota's 6.875% on 10.00 is 68.75 cents | $10.00, MN, 0, 2026-09-01 | → | state MN, state rate per million 68,750, local rate per million 0, combined rate per million 68,750, taxable $10.00, tax $0.69, total $10.69 |
| Missouri's 4.225% on 1.00 | $1.00, MO, 0, 2026-09-01 | → | state MO, state rate per million 42,250, local rate per million 0, combined rate per million 42,250, taxable $1.00, tax $0.04, total $1.04 |
| New Mexico with a four-decimal local rate: 8.3125% of 50.00 is 415.625 cents | $50.00, NM, 34,375, 2026-09-01 | → | state NM, state rate per million 48,750, local rate per million 34,375, combined rate per million 83,125, taxable $50.00, tax $4.16, total $54.16 |
| Oregon has no sales tax | $100.00, OR, 0, 2026-09-01 | → | state OR, state rate per million 0, local rate per million 0, combined rate per million 0, taxable $100.00, tax $0.00, total $100.00 |
| Alaska has no state tax but local ones | $20.00, AK, 50,000, 2026-09-01 | → | state AK, state rate per million 0, local rate per million 50,000, combined rate per million 50,000, taxable $20.00, tax $1.00, total $21.00 |
| the District of Columbia | $15.00, DC, 0, 2026-09-01 | → | state DC, state rate per million 60,000, local rate per million 0, combined rate per million 60,000, taxable $15.00, tax $0.90, total $15.90 |
Show the other 12 tests
| Case | Arguments | Expected | |
|---|---|---|---|
| Louisiana at 5% after its 2025 rise | $10.00, LA, 0, 2026-09-01 | → | state LA, state rate per million 50,000, local rate per million 0, combined rate per million 50,000, taxable $10.00, tax $0.50, total $10.50 |
| a refund gives negative tax, rounded away from zero | -$100.00, CA, 0, 2026-09-01 | → | state CA, state rate per million 72,500, local rate per million 0, combined rate per million 72,500, taxable -$100.00, tax -$7.25, total -$107.25 |
| a zero amount has zero tax | $0.00, WA, 0, 2026-09-01 | → | state WA, state rate per million 65,000, local rate per million 0, combined rate per million 65,000, taxable $0.00, tax $0.00, total $0.00 |
| the first day of the data | $100.00, CO, 0, 2026-01-01 | → | state CO, state rate per million 29,000, local rate per million 0, combined rate per million 29,000, taxable $100.00, tax $2.90, total $102.90 |
| an unknown state is an error | $1.00, XX, 0, 2026-09-01 | → | error: unknown US state "XX" |
| state codes are uppercase | $1.00, ca, 0, 2026-09-01 | → | error: unknown US state "ca" |
| the amount must be in dollars | £1.00, CA, 0, 2026-09-01 | → | error: US sales tax is charged in USD, received GBP |
| a negative local rate is an error | $1.00, CA, -1, 2026-09-01 | → | error: localRatePerMillion must be from 0 to 999999 |
| a date before the data is refused, not answered with today's rate | $1.00, CA, 0, 2025-12-31 | → | error: no sales tax rate for CA on 2025-12-31 |
| a malformed date is an error | $1.00, CA, 0, 2026-9-1 | → | error: onDate must be an ISO date (YYYY-MM-DD) |
| a trailing newline is not part of an ISO date (onDate) | $1.00, CA, 0, 2026-09-16 | → | error: onDate must be an ISO date (YYYY-MM-DD) |
| non-ASCII digits are not an ISO date (onDate) | $1.00, CA, 0, ٢٠٢٦-09-16 | → | error: onDate must be an ISO date (YYYY-MM-DD) |
More from the author
## 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.
Files
| Path | Bytes |
|---|---|
| README.md | 12,986 |
| data/state-rates.json | 10,580 |
| impl/python.py | 2,752 |
| impl/rust.rs | 3,882 |
| impl/typescript.ts | 2,566 |
| vectors.json | 6,685 |