Metadata-Version: 2.4
Name: canatax
Version: 2.0.0
Summary: An easy-to-use, dependency-free Canadian sales and income tax calculator.
Home-page: https://github.com/firstflush/canatax
Author: Michael Pearce
Author-email: firstflush@protonmail.com
License: MIT
Project-URL: Homepage, https://github.com/firstflush/canatax
Project-URL: Bug Tracker, https://github.com/firstflush/canatax/issues
Project-URL: Buy Me a Coffee, https://www.buymeacoffee.com/FirstFlush
Keywords: canada tax cpp ei qpp gst hst pst qst income sales payroll
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Topic :: Office/Business :: Financial :: Accounting
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-python
Dynamic: summary

# 🇨🇦 Canatax – The Canadian Tax Calculator

**Canatax** is a dependency-free Python package for calculating **Canadian income** and **sales taxes**, including all federal and provincial deductions. It supports **CPP, EI, QPIP, QPP**, and automatically applies **GST, PST, HST, or QST** based on the province or territory.

📦 Zero dependencies.  
🧮 Always current.  
🧊 Frozen-rate models built for accuracy.


## 🚀 Features

### Income Tax Calculation
- Calculates:
  - **Federal tax**
  - **Provincial/territorial tax**
  - **CPP or QPP** (based on province)
  - **EI or EI (Quebec)**
  - **QPIP** (Quebec parental leave)
- Returns a structured `IncomeTaxEstimate` with:
  - Individual line items
  - Total deductions
  - Net after-tax income

### Sales Tax Estimation
- Calculates:
  - **GST**, **PST**, **HST**, and **QST**
- Returns a `SalesTaxEstimate` with:
  - Breakdown by tax type
  - Total tax
  - After-tax amount


## 📦 Installation

```bash
pip install canatax
```


## 💼 Usage

### Income Tax

```python
from canatax import IncomeTaxCalculator

estimate = IncomeTaxCalculator.calculate(income=80000, province="BC")

print(estimate.province)
print(estimate.federal_tax)
print(estimate.provincial_tax)
print(estimate.cpp)
print(estimate.qpp)
print(estimate.qpip)
print(estimate.ei)
print(estimate.total_tax)
print(estimate.net_income)
```

### Sales Tax

```python
from canatax import SalesTaxCalculator

estimate = SalesTaxCalculator.calculate(amount=100.00, province="QC")

print(estimate.province)
print(estimate.gst)
print(estimate.qst)
print(estimate.pst)
print(estimate.hst)
print(estimate.tax_total)
print(estimate.after_tax)
print(estimate.before_tax)
```


## 📘 API Overview

- `IncomeTaxCalculator.calculate(income, province)`  
  → returns `IncomeTaxEstimate`
- `SalesTaxCalculator.calculate(amount, province)`  
  → returns `SalesTaxEstimate`

Both calculators also support manual instantiation with `._calculate()` as an instance method if preferred.


## 🤝 Contributing

Bug fixes and suggestions are welcome! Open an issue or submit a pull request.


## 🔒 License

MIT – Free for personal or commercial use. Go nuts.


## ☕ Support

If you found this useful and want to support future development,  
you can [buy me a coffee](https://www.buymeacoffee.com/FirstFlush). It helps keep the lights on and the tax brackets fresh.
