Contents

Chapter 1

Features

This chapter covers the core features and capabilities of Tax Calculator.

Features

  • 45+ country tax rates with standard and reduced tiers
  • All 50 US state sales tax rates (including zero-tax states)
  • 6 product categories with rate adjustments (digital, physical, food, education, etc.)
  • 5 buyer types with exemption rules (individual, business, nonprofit, reseller, etc.)
  • Tax-inclusive and tax-exclusive calculation modes
  • Multi-item invoice tax calculation with per-line breakdowns
  • Formatted currency output for USD, EUR, GBP, JPY, CAD, AUD
  • No API calls — all rates stored locally for offline use
  • Python stdlib only — zero dependencies

Quick Start

bash
# 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-states
Chapter 2

CLI Reference

Follow this guide to get Tax Calculator up and running in your environment.

CLI Reference

FlagDescription
--action, -aAction to perform (required)
--countryISO 3166-1 alpha-2 country code (e.g. US, DE, AU)
--stateState/province code (required for US)
--amountAmount in cents
--categoryProduct category (default: digital_goods)
--buyer-typeBuyer type for exemptions (default: individual)
--tax-inclusiveAmount already includes tax (EU-style)
--inputJSON file with invoice line items
--verbose, -vEnable debug logging

Product Categories

CategoryDefault RateNotes
digital_goodsStandardSoftware, ebooks, SaaS
physical_goodsStandardTangible products
servicesStandardConsulting, freelance work
foodReducedGroceries (where reduced rates exist)
educationExemptCourses, training materials
healthcareExemptMedical products and services
Chapter 3
🔒 Available in full product

Buyer Types

You’ve reached the end of the free preview

Get the full Tax Calculator and unlock everything.

All Chapters

Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.

Full Tool Suite

Access all interactive tools with complete data, all workload profiles, and the full scenario library.

Source Files

Downloadable source code, configuration files, and working examples from every chapter.

Lifetime Updates

Free updates for life. Every new chapter, tool, and improvement included.

Buy Now — $29 →
📦 Free sample included — download another copy for the full product.
Tax Calculator v1.0.0 — Free Preview