Models Module

Data models and classes for tax calculations.

Models for tax calculation in India

class taxcalcindia.models.EmploymentType(*values)[source]

Bases: Enum

Employment type of the taxpayer.

Parameters:

Enum (str) – Description of the employment type.

PRIVATE = 'private'
GOVERNMENT = 'government'
SELF_EMPLOYED = 'self_employed'
class taxcalcindia.models.TaxSettings(age, financial_year=2025, is_metro_resident=True, employment_type=EmploymentType.PRIVATE)[source]

Bases: object

Tax settings for an individual taxpayer.

Parameters:
  • age (int)

  • financial_year (int)

  • is_metro_resident (bool)

  • employment_type (EmploymentType)

__init__(age, financial_year=2025, is_metro_resident=True, employment_type=EmploymentType.PRIVATE)[source]

Initialize tax settings for an individual taxpayer.

Parameters:
  • age (int) – Age of the taxpayer.

  • financial_year (int) – Financial year for tax calculation.

  • is_metro_resident (bool, optional) – Whether the taxpayer resides in a metro area. Defaults to True.

  • employment_type (EmploymentType, optional) – Employment type. Defaults to EmploymentType.PRIVATE.

Raises:
class taxcalcindia.models.SalaryIncome(basic_and_da=0, hra=0, other_allowances=0, bonus_and_commissions=0)[source]

Bases: object

Salary income details for the taxpayer.

__init__(basic_and_da=0, hra=0, other_allowances=0, bonus_and_commissions=0)[source]

Initialize salary income details for the taxpayer.

Parameters:
  • basic_and_da (int, optional) – Basic salary and DA. Defaults to 0.

  • hra (int, optional) – House Rent Allowance. Defaults to 0.

  • other_allowances (int, optional) – Other allowances. Defaults to 0.

  • bonus_and_commissions (int, optional) – Bonus and commissions. Defaults to 0.

property total

Get the total salary income.

Returns:

The total salary income.

Return type:

int

property total_eligible_hra

Get the total eligible HRA for the taxpayer.

Returns:

The total eligible HRA.

Return type:

int

class taxcalcindia.models.BusinessIncome(business_income=0, property_income=0)[source]

Bases: object

Business income details for the taxpayer.

__init__(business_income=0, property_income=0)[source]

Initialize business income details for the taxpayer.

Parameters:
  • business_income (int, optional) – Business income. Defaults to 0.

  • property_income (int, optional) – Property income. Defaults to 0.

property total

Get the total business income.

Returns:

The total business income.

Return type:

int

class taxcalcindia.models.CapitalGainsIncome(short_term_at_normal=0, short_term_at_20_percent=0, long_term_at_12_5_percent=0, long_term_at_20_percent=0)[source]

Bases: object

Capital gains income details for the taxpayer.

__init__(short_term_at_normal=0, short_term_at_20_percent=0, long_term_at_12_5_percent=0, long_term_at_20_percent=0)[source]

Initialize capital gains income details for the taxpayer.

Parameters:
  • short_term_at_normal (int) – Short-term capital gains taxed at normal rates.

  • short_term_at_20_percent (int) – Short-term capital gains taxed at 20%.

  • long_term_at_12_5_percent (int) – Long-term capital gains taxed at 12.5%.

  • long_term_at_20_percent (int) – Long-term capital gains taxed at 20%.

property total

Get the total capital gains income.

Returns:

The total capital gains income.

Return type:

int

property total_capital_gains_tax

Calculate the total capital gains tax.

Returns:

The total capital gains tax.

Return type:

float

class taxcalcindia.models.OtherIncome(savings_account_interest=0, fixed_deposit_interest=0, other_sources=0)[source]

Bases: object

Other income details for the taxpayer.

__init__(savings_account_interest=0, fixed_deposit_interest=0, other_sources=0)[source]

Initialize other income details for the taxpayer.

Parameters:
  • savings_account_interest (int, optional) – Savings account interest. Defaults to 0.

  • fixed_deposit_interest (int, optional) – Fixed deposit interest. Defaults to 0.

  • other_sources (int, optional) – Other sources of income. Defaults to 0.

property total

Get the total other income.

Returns:

The total other income.

Return type:

int

class taxcalcindia.models.Deductions(section_80c=0, section_80d=0, section_80gg=0, section_80dd=0, section_80ddb=0, section_24b=0, section_80ccd_1b=0, section_80ccd_2=0, section_80eea=0, section_80u=0, section_80eeb=0, section_80e=0, section_80g_50percent=0, section_80g_100percent=0, section_80gga=0, section_80ggc=0, rent_for_hra_exemption=0, professional_tax=0, food_coupons=0, other_exemption=0)[source]

Bases: object

Deduction details for the taxpayer.

__init__(section_80c=0, section_80d=0, section_80gg=0, section_80dd=0, section_80ddb=0, section_24b=0, section_80ccd_1b=0, section_80ccd_2=0, section_80eea=0, section_80u=0, section_80eeb=0, section_80e=0, section_80g_50percent=0, section_80g_100percent=0, section_80gga=0, section_80ggc=0, rent_for_hra_exemption=0, professional_tax=0, food_coupons=0, other_exemption=0)[source]

Deduction details for a taxpayer under the Old Tax Regime (FY 2024–25 / AY 2025–26).

All amounts should be provided in INR. The calculator will automatically apply statutory limits wherever applicable.

Parameters:
  • section_80c (int, optional) – Investments and expenses eligible under Section 80C such as EPF, PPF, ELSS, Life Insurance Premium, Tuition Fees, Principal repayment of home loan, etc. Maximum deduction allowed: ₹1,50,000 (combined cap under 80C).

  • section_80d (int, optional) – Health insurance premium paid for self, spouse, children, and parents. Includes preventive health check-ups. Maximum allowed: - ₹25,000 for self/family - Additional ₹25,000 for parents - Up to ₹50,000 if parents are senior citizens Overall cap considered by calculator: ₹1,00,000.

  • section_80gg (int, optional) – Deduction for rent paid when HRA is not received. Applicable only if taxpayer, spouse, or minor child does not own residential property at the place of employment. Actual eligible amount is calculated as per rules (₹5,000 per month max).

  • section_80dd (int, optional) – Deduction for maintenance and medical treatment of a dependent with disability. - ₹75,000 for normal disability - ₹1,25,000 for severe disability (≥80%).

  • section_80ddb (int, optional) – Medical treatment expenses for specified critical illnesses for self or dependents. Maximum allowed: - ₹40,000 (non-senior citizens) - ₹1,00,000 (senior citizens).

  • section_24b (int, optional) – Interest paid on home loan for self-occupied property. Maximum deduction allowed: ₹2,00,000.

  • section_80ccd_1b (int, optional) – Additional contribution to National Pension System (NPS – Tier I). Over and above Section 80C limit. Maximum additional deduction: ₹50,000.

  • section_80ccd_2 (int, optional) – Employer’s contribution to NPS. Deduction allowed up to 10% of basic salary + DA (14% for government employees). This is over and above Section 80C and 80CCD(1B).

  • section_80eea (int, optional) – Interest on home loan for affordable housing (sanctioned before 31 March 2022). Maximum additional deduction: ₹1,50,000.

  • section_80u (int, optional) – Deduction for a resident individual with disability. - ₹75,000 for normal disability - ₹1,25,000 for severe disability.

  • section_80eeb (int, optional) – Interest paid on loan taken for purchase of an electric vehicle. Maximum deduction allowed: ₹1,50,000.

  • section_80e (int, optional) – Interest paid on education loan for higher studies (self, spouse, children). No upper monetary limit. Deduction available for up to 8 consecutive assessment years.

  • section_80g_50percent (int, optional) – Donations made to approved charitable institutions eligible for 50% deduction (with or without qualifying limit, as applicable).

  • section_80g_100percent (int, optional) – Donations made to approved funds eligible for 100% deduction (subject to conditions).

  • section_80gga (int, optional) – Donations for scientific research or rural development. No deduction allowed if taxpayer has business/professional income.

  • section_80ggc (int, optional) – Donations made to political parties or electoral trusts. No maximum limit, but cash donations are not allowed.

  • rent_for_hra_exemption (int, optional) – Rent paid for claiming HRA exemption. Actual exemption is calculated separately based on salary, rent paid, and city of residence.

  • professional_tax (int, optional) – Professional tax paid to state government. Maximum deduction allowed: ₹2,500.

  • food_coupons (int, optional) – Meal vouchers/food coupons (e.g., Sodexo). Tax-exempt up to ₹2,200 per month (₹26,400 annually).

  • other_exemption (int, optional) – Any other exemptions allowed under salary (if applicable). No predefined statutory limit.

property section_80tta
property section_80ttb
property total

Calculate the total deductions.

Returns:

Total deductions.

Return type:

int