Compute Indian income tax
compute_taxCalculates deterministic Indian income tax for a fiscal year and regime from salary, other income, deductions, and capital gains, including slabs, rebates, surcharge, and cess.
Instructions
Deterministic Indian income tax computation for a fiscal year. Handles new/old regime slabs, standard deduction, 87A rebate with marginal relief (threshold tested on TOTAL income per the statute; rebate never offsets 111A/112A tax under the new regime), employer NPS under 80CCD(2) in both regimes, house-property loss set-off (s.71(3A) cap; none under 115BAC), 111A/112A capital gains rates with the basic-exemption set-off, surcharge (with the 15% cap on gains and marginal relief), and 4% cess. All arithmetic is done in code from a versioned rule pack -- never estimated.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fy | No | Fiscal year, e.g. '2025-26' (AY 2026-27) | 2025-26 |
| regime | Yes | Tax regime. 'new' (115BAC) is the default regime since FY 2023-24. | |
| ageBand | No | Age band: below60, senior (60-79), superSenior (80+). Affects old-regime exemption only. | below60 |
| ltcg112A | No | Long-term capital gains under section 112A in INR, BEFORE the 1.25L exemption | |
| stcg111A | No | Short-term capital gains under section 111A (listed equity, STT paid) in INR | |
| deductions | No | Old regime only: total Chapter VI-A deductions (80C, 80D, ...) in INR, EXCLUDING employer NPS (use employerNps80CCD2). Ignored under the new regime. | |
| otherIncome | No | Other normal-rate income in INR (interest, net rent, etc.) | |
| salaryIncome | No | Gross salary income in INR, before standard deduction | |
| employerNps80CCD2 | No | Employer's NPS contribution under s.80CCD(2) in INR. Allowed in BOTH regimes (the one Chapter VI-A deduction 115BAC keeps); capped at 14% of salary in the new regime, 10% (private) / 14% (government) in the old. | |
| housePropertyLoss | No | Loss under the head house property as a POSITIVE number (e.g. s.24(b) home-loan interest on a self-occupied house). Old regime: set off against other heads up to Rs 2 lakh (s.71(3A)), rest carried forward. New regime: no inter-head set-off (s.115BAC(2)), reported as carried forward. | |
| governmentEmployer | No | Central/State Government employer (raises the old-regime 80CCD(2) cap to 14%) |