This chapter covers the core features and capabilities of Tax Calculator.
# Run the full demo
python src/tax_calculator.py --action demo
# Calculate tax for a US purchase
python src/tax_calculator.py --action calculate --country US --state CA --amount 9999
# Calculate VAT for a German purchase
python src/tax_calculator.py --action calculate --country DE --amount 5000
# Look up a country's tax rules
python src/tax_calculator.py --action lookup --country GB
# Calculate tax on a food product (reduced rate)
python src/tax_calculator.py --action calculate --country FR --amount 2000 --category food
# Calculate for a nonprofit (exempt)
python src/tax_calculator.py --action calculate --country US --state NY --amount 9999 --buyer-type nonprofit
# Process invoice from JSON
python src/tax_calculator.py --action invoice --country GB --input examples/invoice_items.json
# List all supported countries
python src/tax_calculator.py --action list-countries
# List US state rates
python src/tax_calculator.py --action list-us-statesFollow this guide to get Tax Calculator up and running in your environment.
| Flag | Description |
|---|---|
--action, -a | Action to perform (required) |
--country | ISO 3166-1 alpha-2 country code (e.g. US, DE, AU) |
--state | State/province code (required for US) |
--amount | Amount in cents |
--category | Product category (default: digital_goods) |
--buyer-type | Buyer type for exemptions (default: individual) |
--tax-inclusive | Amount already includes tax (EU-style) |
--input | JSON file with invoice line items |
--verbose, -v | Enable debug logging |
| Category | Default Rate | Notes |
|---|---|---|
digital_goods | Standard | Software, ebooks, SaaS |
physical_goods | Standard | Tangible products |
services | Standard | Consulting, freelance work |
food | Reduced | Groceries (where reduced rates exist) |
education | Exempt | Courses, training materials |
healthcare | Exempt | Medical products and services |
Get the full Tax Calculator and unlock everything.
Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.
Access all interactive tools with complete data, all workload profiles, and the full scenario library.
Downloadable source code, configuration files, and working examples from every chapter.
Free updates for life. Every new chapter, tool, and improvement included.