A package to calculate income tax for Indian taxpayers
Project description
taxcalcindia
A lightweight Python package to calculate Indian income tax for individuals. Designed for local use and packaging on PyPI.
Table of Contents
- Highlights
- Installation
- Quick start
- Example notebook
- API pointers
- Contributing
- License
- Important notice
- Support the project
Highlights
- Compute tax under both the new and old regimes and recommend the cheaper regime.
- Support for salary, business, capital gains and other incomes.
- Common deductions and simple slab lookup.
- Small, well-documented models suitable for packaging and testing.
Installation
Install from PyPI:
pip install taxcalcindia
Quick start
Example usage:
from taxcalcindia import IncomeTaxCalculator, TaxSettings, SalaryIncome, Deductions
settings = TaxSettings(age=27, financial_year=2025)
salary = SalaryIncome(basic_and_da=500000, other_allowances=500000, bonus_and_commissions=350000)
deductions = Deductions(food_coupons=26400, professional_tax=2500)
calc = IncomeTaxCalculator(settings=settings, salary=salary, deductions=deductions)
result = calc.calculate_tax(is_comparision_needed=True, is_tax_per_slab_needed=True, display_result=False)
print(result)
Example notebook
A longer, runnable example is provided in the repository: example.ipynb. It contains multiple scenarios and is extended based on user requests.
API pointers
- Main calculator:
taxcalcindia.calculator.IncomeTaxCalculator - Input models:
- EmploymentType (Enum)
- TaxSettings (age, financial_year, is_metro_resident, employment_type)
- SalaryIncome (basic_and_da, hra, other_allowances, bonus_and_commissions, total, total_eligible_hra(settings))
- BusinessIncome (business_income, property_income, total)
- CapitalGainsIncome (short_term_at_normal, short_term_at_20_percent, long_term_at_12_5_percent, long_term_at_20_percent, total, total_capital_gains_tax)
- OtherIncome (savings_account_interest, fixed_deposit_interest, other_sources, total)
- Deductions (section_80c, section_80d, section_80gg, section_24b, section_80ccd_1b, section_80ccd_2, section_80eea, section_80u, section_80eeb, section_80e, section_80g_50percent, section_80g_100percent, section_80gga, section_80ggc, rent_for_hra_exemption, professional_tax, food_coupons, other_exemption, section_80tta, section_80ttb, total)
- Slab retrieval:
taxcalcindia.slabs.get_tax_slabs - Package exceptions:
taxcalcindia.exceptions.TaxCalculationException
Contributing
Contributions via PRs are welcome. Please:
- Follow standard Python packaging practices.
- Include tests for new features.
- Keep changes small and documented.
License
MIT — see LICENSE
Important notice
- Do NOT use this package as the sole source for filing income tax returns. This project is provided as an aid/reference only. Always audit calculations yourself or consult a government-approved tax professional or authorised tax-filing service before submitting returns. The creator is not responsible for any misfiled tax returns or financial/legal consequences arising from using this package.
If you find this project useful, A small cup helps a lot!
More from the developer
Reach out or explore other projects by the developer at: https://amraja.in/
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file taxcalcindia-0.1.2.tar.gz.
File metadata
- Download URL: taxcalcindia-0.1.2.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc84256bfd249e61453b6fce1a80b96a7e039c9d07a2977a6958edf738b55d0a
|
|
| MD5 |
3c6a2824d2e9d61b4fb29ecb7fe37c95
|
|
| BLAKE2b-256 |
cec400cf4d0d05e5670ccc19e53e02e75c1aa06c7a72342f9f57750e106b5b43
|
Provenance
The following attestation bundles were made for taxcalcindia-0.1.2.tar.gz:
Publisher:
release.yaml on amrajacivil/taxcalcindia
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
taxcalcindia-0.1.2.tar.gz -
Subject digest:
cc84256bfd249e61453b6fce1a80b96a7e039c9d07a2977a6958edf738b55d0a - Sigstore transparency entry: 799177779
- Sigstore integration time:
-
Permalink:
amrajacivil/taxcalcindia@390e95f50dca68897c89d2d1c6051b9334dd57b3 -
Branch / Tag:
refs/tags/0.1.2 - Owner: https://github.com/amrajacivil
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@390e95f50dca68897c89d2d1c6051b9334dd57b3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file taxcalcindia-0.1.2-py3-none-any.whl.
File metadata
- Download URL: taxcalcindia-0.1.2-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ad6916f48eb7791ca07d0c9bbda28f035d4d3c7f42a8686eb4bf9a5bf6a4d60
|
|
| MD5 |
a91bb74b8eaa9e0c7e6b3f3dfbbbf4eb
|
|
| BLAKE2b-256 |
551479b8b541f2ce9c5a25a9850afcc9f4c5ccb44a29c47eab20a1da6f864402
|
Provenance
The following attestation bundles were made for taxcalcindia-0.1.2-py3-none-any.whl:
Publisher:
release.yaml on amrajacivil/taxcalcindia
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
taxcalcindia-0.1.2-py3-none-any.whl -
Subject digest:
7ad6916f48eb7791ca07d0c9bbda28f035d4d3c7f42a8686eb4bf9a5bf6a4d60 - Sigstore transparency entry: 799177780
- Sigstore integration time:
-
Permalink:
amrajacivil/taxcalcindia@390e95f50dca68897c89d2d1c6051b9334dd57b3 -
Branch / Tag:
refs/tags/0.1.2 - Owner: https://github.com/amrajacivil
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@390e95f50dca68897c89d2d1c6051b9334dd57b3 -
Trigger Event:
push
-
Statement type: