us-car-sales-tax
Car sales tax, title and registration fees for U.S. states, offline. Full out-the-door cost calculators for Texas, California, Florida, New York and Pennsylvania, with every county and city rate. The car sales tax rule of all 50 states is included too: rate, local taxes and trade-in credit. Pure Python, no dependencies, about 100 KB of data from official state DMV and revenue department sources (2026). It also runs as an MCP server for AI assistants.
It uses the same rules and numbers as the calculators on carsalestax.com. The tests check the package against 600 results from the site's own calculator.
pip install us-car-sales-tax
import car_sales_tax as cst
r = cst.calculate("TX", 35000, trade_in=10000)
r["tax"], r["fees"], r["total"] # (1562.5, 128.5, 26691.0)
r["lines"][0] # {'key': 'tax', 'label': 'Motor vehicle sales tax (6.25%)', 'amount': 1562.5}
# Texas private sale: tax on the higher of the price or 80% of the standard presumptive value
cst.calculate("TX", 9000, purchase="private", spv=15000)["tax"] # 750.0
# Local rates: California cities, Florida county surtax (first $5,000 only), New York counties, Pennsylvania
cst.calculate("CA", 40000, place="Los Angeles", trade_in=10000)["tax_rate"] # 0.1025 (no trade-in credit in CA)
cst.calculate("FL", 30000, place="Miami-Dade")["tax"] # 1850.0
cst.local_rates("NY")[:2] # [{'place': 'Albany', 'rate': 0.08}, ...]
cst.state_rules("GA")["tax"] # 'Title ad valorem tax (no sales tax)'
[s["st"] for s in cst.all_states() if s["rate"] == "0%"] # ['AK', 'MT', 'NH', 'OR']
cst.monthly_payment(30000, 6, 60) # 579.98
calculate() options: purchase ("new", "used" or "private"), trade_in, doc_fee, place, financed, ev,
weight (lb; FL and NY registration), plate_transfer, out_of_state_title, new_resident, spv (Texas),
emissions_county (Texas title fee), model_year_age (California smog fees).
Command line:
$ car-sales-tax CA 40000 --place "Los Angeles" --trade-in 10000 --doc-fee 85
$ car-sales-tax TX 9000 --purchase private --spv 15000
$ car-sales-tax --rules OH
$ car-sales-tax --states
$ car-sales-tax --places FL
MCP server
The package includes a Model Context Protocol server (stdio, no dependencies). It gives Claude, ChatGPT, Cursor and other MCP clients four tools:
calculate_car_cost: out-the-door cost in TX, CA, FL, NY or PA, line by line, with an optional loan paymentget_state_car_tax: the car sales tax rule of any statecompare_states: all 50 states sorted by ratelist_local_rates: the county and city rates for CA, FL, NY and PA
{
"mcpServers": {
"car-sales-tax": { "command": "uvx", "args": ["us-car-sales-tax", "--mcp"] }
}
}
It is listed in the official MCP Registry as com.carsalestax/car-sales-tax.
Data and licence
Code: MIT. Data: CC BY 4.0, credit "carsalestax.com"; see DATA-LICENSE.md for the sources. The amounts are estimates, not tax advice. County fees and dealer charges vary, so check the final figures with your state's DMV. More details and the official source for each fee are at https://carsalestax.com/methodology/.
Metadata
Release files for us-car-sales-tax 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| us_car_sales_tax-0.1.0.tar.gz | 33.2 kB | Without provenance | Details for us_car_sales_tax-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| us_car_sales_tax-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for us_car_sales_tax-0.1.0-py3-none-any.whl |
Total release size: 67.8 kB
Release files / us_car_sales_tax-0.1.0.tar.gz
| Download URL | us_car_sales_tax-0.1.0.tar.gz |
|---|---|
| Size | 33.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d0b2d0850ce23c78b85877a6259c0e3d73ca0fdd1972b785990dc63aefbbe5ff
|
|
BLAKE2b-256 checksum How to use checksums |
195fce6844f7617d8b7ef9901a706d82ff90272e63c63d41a046b1672b3a2eda
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|
Release files / us_car_sales_tax-0.1.0-py3-none-any.whl
| Download URL | us_car_sales_tax-0.1.0-py3-none-any.whl |
|---|---|
| Size | 34.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
292ca7e523a56cacd5616f88f156207a789db25e3630072160bcae906a0ab0d8
|
|
BLAKE2b-256 checksum How to use checksums |
5baf920eaf6b27d9ddc8cadee2ba44a20cd0c8f7ba71dd911fabdcbc270816fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|
Security for us-car-sales-tax 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.