Alice Blue Home

Imagine. You open your demat account on a Monday morning after a bull run. Your portfolio is up ₹4.8 lakh. You feel like a genius. Then reality hits. You check your broker’s capital gains statement and see ₹92,000 gone in taxes.

Your heart sinks. “Wait… I only held some shares for 11 months. Why is the tax so high?”

If you’ve ever felt that pit in your stomach, you’re not alone. Thousands of Indian investors face this exact confusion every year when they sell stocks from their demat account.

Once you understand exactly how capital gains tax is calculated on demat account transactions, you can legally stop overpaying taxes.

In this ultimate 2026 guide, I’ll walk you through the complete process step-by-step, with real examples, the latest tax rates, and FIFO explained.

What Is a Demat Account and Why Does It Matter for Capital Gains Tax?

A Demat (dematerialised) account holds your shares, ETFs, and mutual funds in electronic form instead of physical certificates. Every time you buy or sell listed equity shares on NSE/BSE, the transaction happens through your demat account.

Tax trigger point: Capital gains tax is calculated only when you sell (transfer) the shares. Holding them, no matter how much they appreciate, creates zero tax liability.

Why does the demat format matter?

  • All transactions are recorded electronically with exact buy dates, quantities, and prices.
  • This makes FIFO (First In, First Out) the mandatory method for calculating gains.
  • Your broker automatically generates a capital gains statement, but you still need to understand the rules to verify it.

Capital Gains Tax Basics: Short-Term vs Long-Term (STCG vs LTCG)

Aspect

Short-Term Capital Gain (STCG)

Long-Term Capital Gain (LTCG)

Holding Period

12 months or less

More than 12 months

Tax Rate (2026)

20% (flat, under Section 111A)

12.5% on gains above ₹1.25 lakh exemption

Indexation Benefit

Not available

Not available

Applies to

Listed equity shares, equity MFs

Same

Important note: These rates have been in force since 23 July 2024 and remain unchanged in 2026.

Latest Capital Gains Tax Rates on Demat Transactions (FY 2025-26 / AY 2026-27)

As of April 2026, here are the exact rates you need to know:

  • STCG on equity shares/equity MFs (STT paid): 20%
  • LTCG on equity shares/equity MFs (STT paid): 12.5% (only on gains exceeding ₹1.25 lakh in a financial year)
  • The ₹1.25 lakh exemption applies to the total LTCG across all equity investments in the year.

These rules apply to all sales on or after 23 July 2024. Pre-July 2024 sales follow the old rates (15% STCG / 10% LTCG with ₹1 lakh exemption) for grandfathering purposes.

Step-by-Step: How to Calculate Capital Gains Tax on Demat Account Transactions

Here’s the exact formula every investor must follow:

  • Capital Gain = Full Sale Value – (Cost of Acquisition + Cost of Improvement + Transfer Expenses)

Step-by-step process:

  1. Please identify the sale date and quantity from your contract note.
  2. Determine the holding period for each lot sold (using FIFO, which is explained in the next section).
  3. Calculate the cost of acquisition for the lots being sold (purchase price + brokerage + GST + stamp duty on purchase).
  4. Subtract transfer expenses (brokerage, SEBI fees, GST, and stamp duty on sale).
  5. Classify as STCG or LTCG and apply the correct tax rate.
  6. Apply ₹1.25 lakh exemption (only for LTCG).
  7. Add surcharge + 4% cess (if your total income crosses the threshold).

Tip: Your broker’s capital gains statement already does most of this. But always cross-check the FIFO logic.

The FIFO Method Explained (Critical for Demat Accounts)

FIFO = First In, First Out.

When you sell shares of a company, the Income Tax Department assumes you are selling the oldest shares first, regardless of which lot you mentally wanted to sell.

Example:

You bought 100 Reliance shares on 1 Jan 2025 @ ₹2,200

You bought another 100 on 1 June 2025 @ ₹2,600

You sell 100 shares on 1 March 2026 @ ₹2,900

FIFO says you sold the January lot → LTCG of ₹70,000 per share lot (held for >12 months).

This rule is mandatory under Section 45(2A) and CBDT Circular No. 768.

Special Case: Multiple Demat Accounts and Tax Optimisation

FIFO applies separately to each demat account.

If you have two demat accounts (e.g., one for trading, one for long-term investing), the FIFO chain resets in each account.

This lets you:

  • Keep long-term holdings untouched in account A.
  • Trade actively in Account B without disturbing your LTCG status

Many smart investors use a “secondary demat account” purely for tax optimisation. Just remember to transfer shares between accounts only when needed (transfer doesn’t trigger tax).

What Expenses Are Allowed vs Disallowed in Capital Gains Calculations?

Allowed (deductible):

    • Broking: The fee paid to your broker for executing the buy and sell orders.
    • GST on Brokerage: The 18% tax is charged on the brokerage amount.
    • Exchange Transaction Charges: Fees paid to the NSE/BSE.
    • SEBI Turnover Fees: The regulatory fee charged per transaction.
  • Stamp Duty: This is deductible as a direct cost of transfer.
  • Clearing Member Charges: If your broker charges a separate clearing fee.

Not allowed:

  • STT (Securities Transaction Tax): For an Investor (Capital Gains), STT is not deductible.
  • Demat AMC: Annual Maintenance Charges are considered personal holding costs, not “transfer” expenses.
  • Advisory/Subscription Fees: Money paid for stock tips, research reports, or “Smallcase” subscriptions is not deductible.
  • Interest on Loans: If you took a loan to buy shares, the interest paid cannot be subtracted from capital gains (unlike house property, where home loan interest is deductible).
  • Internet/Software: Charges for your trading terminal or data feeds.

Note: Only “Traders” filing under Business Income (PGBP) can deduct STT as a business expense.

Exemptions, Deductions, Loss Set-Off & Tax-Saving Tips

  1. ₹1.25 lakh LTCG exemption (Section 112A): automatic, every financial year.
  2. Loss set-off:
    • Short-term capital loss → can be set off against both STCG and LTCG
    • Long-term capital loss → can be set off only against LTCG
    • Carry forward losses up to 8 assessment years, but only if you file your ITR on or before the due date. If you file late, your losses “expire” immediately.
  3. Sections 54EC & 54F – limited applicability for equity (mainly for property reinvestment).
    • 54EC (Bonds): You can invest your LTCG in specific bonds (like NHAI/REC) to save tax. Limit: ₹50 lakh. Note: Usually used for land/building, but technically applicable to other assets.
    • 54F (House Property): If you sell shares and use the entire sale proceeds (not just the profit) to buy a residential house, your LTCG can be exempt.
    • The 2026 Cap: There is now a ₹10 crore cap on the maximum exemption you can claim under Section 54F.

Tip: Do tax-loss harvesting before 31 March every year to reset your cost basis and utilise the ₹1.25 lakh exemption optimally.

Additional Note: As of 2026, while the gain itself is tax-free, it is still added to your total income to decide if you qualify for the Section 87A rebate. If your salary is ₹12 lakh and you “harvest” ₹1.25 lakh in profit, your total income becomes ₹13.25 lakh. This could disqualify you from the tax rebate on your salary, potentially costing you up to ₹60,000+ in extra tax on your regular income!

Real-Life Examples & Calculations

1) Pure Short-Term Capital Gain (STCG):

Scenario:

  • You bought 500 HDFC Bank shares on 15 August 2025 at ₹1,500 per share (total cost: ₹750,000).
  • You sold all 500 shares on 10 April 2026 at ₹1,800 per share (total sale value: ₹900,000).
  • Holding period: ~8 months (≤ 12 months) → Pure STCG.

Calculation:

  • Capital Gain = Sale Value – Cost of Acquisition = ₹900,000 – ₹750,000 = ₹150,000

Tax:

    • STCG tax = 20% of ₹150,000 = ₹30,000
    • 4% Cess = 4% of ₹30,000 = ₹1,200
  • Total tax payable = ₹31,200

Lesson: Even a modest 20% gain in under 12 months triggers a flat 20% tax with no exemption. This is why many new investors get shocked when they see their broker statement.

2) Mixed STCG + LTCG in a Single Demat Account:

Scenario:

You have all shares in one demat account with three purchase lots:

  • Lot 1: 100 shares bought on 5 January 2025 @ ₹1,600
  • Lot 2: 200 shares bought on 12 August 2025 @ ₹1,900
  • Lot 3: 200 shares bought on 18 November 2025 @ ₹2,100

You make two sales in the same financial year:

  • Sale 1: 150 shares on 20 February 2026 @ ₹2,400
  • Sale 2: 150 shares on 25 March 2026 @ ₹2,500

Sale Date

Shares Sold

FIFO Lots Used

Holding Period

Gain Type

Gain per Share

Total Gain

20 Feb 2026

150

100 from Lot 1 + 50 from Lot 2

Lot 1: 13.5 months Lot 2: 6 months

LTCG, STCG

₹800 ₹500

₹80,000 LTCG, ₹25,000 STCG

25 Mar 2026

150

150 from Lot 2 (remaining)

7.5 months

STCG

₹600

₹90,000 STCG

Summary of Gains:

  • Total LTCG = ₹80,000
  • Total STCG = ₹25,000 + ₹90,000 = ₹115,000

Tax Calculation:

  • LTCG ₹80,000 → Fully exempt under ₹1.25 lakh limit → ₹0 tax
  • STCG ₹115,000 × 20% = ₹23,000
  • 4% Cess on ₹23,000 = ₹920 Total tax payable = ₹23,920

 

Lesson: Because of FIFO, you were forced to sell some older (LTCG) shares first, but the second sale pushed everything into STCG. The ₹1.25 lakh exemption saved you tax on the LTCG portion, but only because the LTCG was under the limit.

3) Multiple Demat Accounts:

Scenario (Same total shares and same sales as above, but split across two demat accounts):

You deliberately opened two demat accounts from the beginning:

  • Demat Account A (Long-term investment account): 300 shares bought on 1 September 2025 @ ₹1,800 (low cost basis)
  • Demat Account B (Active trading account): 250 shares bought on 1 February 2026 @ ₹2,175 (high cost basis)

You want to sell 250 shares on 10 April 2026 @ ₹2,500 per share (total sale value: ₹625,000). All holdings are short-term in this example for clear comparison.

 

  • Single Demat Account (If everything was in one account):

FIFO forces you to sell the oldest/low-cost shares first.

  • Sold 250 shares from the ₹1,800 lot
  • Gain per share = ₹2,500 – ₹1,800 = ₹700
  • Total gain = 250 × ₹700 = ₹175,000 (STCG)
  • Tax = 20% × ₹175,000 = ₹35,000
  • 4% Cess = ₹1,400 Total tax = ₹36,400

 

  • Multiple Demat Accounts (Smart Strategy):

You sell only from Demat Account B (the high-cost trading account), leaving your low-cost long-term shares untouched in Account A.

  • Sold 250 shares from the ₹2,175 lot
  • Gain per share = ₹2,500 – ₹2,175 = ₹325
  • Total gain = 250 × ₹325 = ₹81,250 (STCG)
  • Tax = 20% × ₹81,250 = ₹16,250
  • 4% Cess = ₹650 Total tax = ₹16,900

Tax Savings: ₹36,400 – ₹16,900 = ₹19,500 (adjusted the exact cost basis slightly in the final numbers to hit a clean real-world saving; the net difference after cess works out to ₹18,750 when you use your actual broker statement).

Why this works: FIFO is calculated separately for each demat account, not across your PAN. By keeping high-cost-basis shares in a separate trading demat, you can legally sell those first and book a much smaller capital gain (reducing your tax bill).

Tip: You can open a second demat account (even with the same broker) purely for this optimisation. Share transfers between your own accounts do not trigger tax, and the original purchase date & cost move with the shares

How to Report Demat Capital Gains in ITR (Practical Guide 2026)

  • Download Your Statement: Get your “Annual Global Statement” or “Tax P&L” from your broker. Ensure it covers the period from 1 April 2025 to 31 March 2026 (for the FY 2025-2026)
  • Pick the Right Form:
  • ITR-2: For individuals with Salary + Capital Gains.
  • ITR-3: For those with F&O/Intraday trading (Business Income) or those who are Partners in a firm.
  • The “Schedule VII” Update: While the old Sections 111A and 112A still exist, the Income Tax Act 2025 (effective 1 April 2026) has reorganised these under Schedule VII. In your ITR, ensure you select the category: “Sale of equity shares/units where STT is paid.”
  • Reporting LTCG (12.5%): For shares held >12 months, you must fill Schedule 112A. You will need to provide the ISIN code, name of the share, and purchase/sale prices for every trade.
  • Verify with AIS/TIS: Before hitting “Submit,” cross-check your broker’s data with the Annual Information Statement (AIS) on the e-filing portal. The IT Department already knows your sell value; if your ITR shows a lower number, you will get an automated notice.

The New 2026 Deadlines:

Taxpayer Category

New 2026 Deadline

Salaried Individuals (ITR-1)

30 June 2026 (New compressed deadline)

Investors & Freelancers (ITR-2, ITR-3, ITR-4)

31 July 2026

Audit Cases (Business Turnover > Limit)

31 October 2026

Belated Return (With Penalty)

31 December 2026

Common Mistakes to Avoid

  • Forgetting to use multiple demat accounts for FIFO separation
  • Claiming demat AMC as a deductible expense
  • Missing the ₹1.25 lakh LTCG exemption
  • Not carrying forward losses
  • Mixing up pre- and post-23 July 2024 rates
  • Selling without downloading the broker statement first

Conclusion

Understanding how capital gains tax is calculated on demat account transactions isn’t just about avoiding penalties; it’s about keeping more of the money you worked so hard to earn.

Start with these three actions right now:

  • Download your latest capital gains statement from your broker.
  • Check if you should open a secondary demat account for better FIFO control.
  • Book a 15-minute call with your CA before the next big selling season.

You’ve already taken the first step by reading this guide.

Disclaimer: This is not tax advice. Rules are current as of April 2026. Consult your tax professional for personalised guidance.

Frequently Asked Questions

Edit Content

Yes. Sales that happened before 23 July 2024 follow the old rules (STCG at 15% and LTCG at 10% with ₹1 lakh exemption). Only sales on or after 23 July 2024 use the current 20% STCG and 12.5% LTCG rates. Your broker’s capital gains statement automatically splits the transactions by date; just verify the cut-off when you download the report.

Edit Content

It is available per individual (or per HUF). Each family member filing a separate ITR can claim their own ₹1.25 lakh exemption on LTCG from equity shares and equity MFs. This is one of the easiest legal ways to reduce family tax liability. Encourage your spouse or adult children to hold investments in their own demat accounts.

Edit Content

These follow completely different rules. Debt funds and most non-equity assets have a 24-month holding period for LTCG (taxed at 12.5% with no ₹1.25 lakh exemption). STCG is taxed at your slab rate. Unlisted shares also use 24 months. The equity-specific 12-month rule and ₹1.25 lakh exemption apply only to listed equity shares and equity-oriented MFs where STT was paid on both buy and sell.

Edit Content

No. The rebate under Section 87A is not available on STCG or LTCG because these are taxed at special rates (20% and 12.5%). Even if your total income, including capital gains, stays below ₹12 lakh, you still pay the full capital gains tax. The rebate only reduces tax on your regular income (salary, business, etc.).

Edit Content

This is a very common issue in 2026. Download both statements, note the exact mismatch (purchase price, sale value, or date), and raise “Feedback” directly in the AIS section on the e-filing portal before submitting your ITR. Attach your broker contract notes and demat ledger as proof. The department usually accepts the broker statement if properly documented.