Income Tax

Share Capital Gains Calculator 2026: FIFO, STT and Corporate Actions

CA Nikhil Gupta·Aug 2026·7 min readIncome Tax

A share-gain calculator must work lot by lot using FIFO for demat holdings, classify each lot by holding period, apply grandfathered cost where relevant,…

A share-gain calculator must work lot by lot using FIFO for demat holdings, classify each lot by holding period, apply grandfathered cost where relevant, account for splits/bonus/rights/mergers and separate deductible transfer charges from non-deductible STT.

Legal or Computational Framework

What the search phrase hides

The phrase capital gains calculator shares stocks compresses several legal questions into one line. The outcome cannot be trusted until the page identifies the relevant person, transaction, period, source document and statutory exception. A high-quality calculator should therefore show why an amount was accepted or rejected instead of displaying a black-box answer.

Governing framework

The tax result is transaction-specific even where a broker displays one net number. Listed-equity STCG and LTCG have different rates. Pre-1 February 2018 covered holdings may use a special deemed-cost formula. Corporate actions can change quantity, cost allocation and acquisition date.

Tax Year 2026–27 means income earned from 1 April 2026 under the Income-tax Act, 2025. AY 2026–27 relates to FY 2025–26 and remains under the Income-tax Act, 1961.

Computation architecture

CheckWhat to verify
ClassificationAsset/income type, holding period and special provision
Computation baseGross consideration/income less only permitted items
AdjustmentEligible loss, threshold, exemption or deduction
TaxApplicable normal/special rate, surcharge and 4% cess
CreditTDS/TCS/advance tax adjusted after gross liability

Step-by-step method

  1. Import trade and demat data.
  2. reconcile opening quantities.
  3. apply FIFO by security and account.
  4. adjust corporate actions.
  5. calculate lot-level proceeds, cost and transfer expenses.
  6. classify STCG/LTCG.

Worked example

An investor buys 100 shares at ₹200, later 100 at ₹350, and sells 150 at ₹500. FIFO assigns the first 100 and 50 from the second lot. The two lots may have different holding periods and therefore different rates.

The example is intentionally presented as a calculation trail. The final result must be recomputed when a date, residence test, holding period, asset classification, employee category, notification, treaty or source document changes.

Rate is the final step, not the first

Capital-gain pages often begin with a percentage and therefore miss the decisive work: identifying the asset, statutory acquisition date, transfer event, cost rule, holding period and special deeming provision. A 12.5%, 20% or 30% rate is meaningful only after the gain has been correctly characterised. TDS or STT does not perform that classification.

Transaction-level audit trail

The computation should retain each acquisition lot, corporate action, cost adjustment, transfer expense, loss set-off and exemption allocation. Aggregation should occur only after character and rate are determined. This matters where a single financial year contains equity STCG, equity LTCG, property gain, VDA transactions and brought-forward losses, each with a different tax treatment.

Edge cases that change the answer

Cross-check before filing, paying or claiming

  1. Confirm that the legal year and transaction date match the rate or rule used.
  2. Reconcile gross consideration, gross income or gross benefit—not merely the net bank receipt.
  3. Distinguish a deduction or exemption from TDS, TCS, withholding or an employer provision.
  4. Keep the original source document and a calculation worksheet.
  5. Review interactions with losses, special rates, surcharge, cess, treaty relief or GST.
  6. Record the official source and its effective date in the calculation output.

Calculator design standard

The Finin2min calculator linked below should retain the user's original input, display the legally accepted amount, identify the formula and rate, and state the reason for every cap or rejection. Rate-sensitive output should show the applicable tax year or effective date. Where facts cannot be automated—such as treaty PE, beneficial ownership, continuity of service or property valuation—the tool should flag professional review rather than make an unsupported assumption.

What Generic Pages Miss

  • Using average cost where FIFO is required.
  • Trusting one broker without reconciling transferred holdings.
  • Deducting STT.
  • Missing merger/split ratios.
  • Netting VDA losses into share gains.

Generic pages also tend to mix a tax credit with a deduction, a labour entitlement with an income-tax exemption, or a supply value with business income. That can produce a mathematically neat but legally wrong result.

Practical Documentation Checklist

Related Calculator
Capital Gains Calculator
Open Calculator →

For the complete rules on this topic, see the core guide: Selling SIP Mutual Fund Units: FIFO and Capital Gains.

See the broader Income-tax Act 2025 study guide hub for related rules and calculators on this topic.

Finin2min Summary

A share-gain calculator must work lot by lot using FIFO for demat holdings, classify each lot by holding period, apply grandfathered cost where relevant, account for splits/bonus/rights/mergers and separate deductible transfer charges from non-deductible STT.

Finin2min rule: classify first, calculate second, and document every assumption.

Frequently Asked Questions

Why can broker and ITR gains differ?
Opening quantities, transferred holdings, corporate actions, grandfathering and expense treatment can differ.
Does FIFO apply across all brokers together?
Apply the legal/demat identification rules carefully; transferred lots require a consolidated reconciliation.
Can brokerage be deducted?
Transfer-related brokerage and permitted expenses can reduce consideration; STT is specifically excluded.
What is the cost of bonus shares?
It is generally governed by a specific nil-cost rule, while the acquisition date remains relevant.
How are pre-2018 listed shares treated?
Covered holdings can use the statutory grandfathered deemed-cost formula.
Should the calculator net all transactions first?
No. Compute lot-level character before aggregating and setting off losses.

Source and review trail

Use the current official instrument, portal or regulator publication before acting. This panel separates the category authority from page-specific references.

Primary category
Income Tax
Official starting point
www.incometax.gov.in
Editorial review date
2026-08-02
Content status
Finin2min explanation; official source controls where facts, law, rates, forms or procedures can change.

Page source links