FIFO for Capital Gains Tax in India:
Why It Matters and How to Calculate
When you sell shares you've bought at different prices over time, which purchase is considered sold first makes a huge difference to your tax. India mandates First-In-First-Out (FIFO) — and getting it wrong means either overpaying tax or filing incorrectly.
What is FIFO?
FIFO (First-In-First-Out) means that when you sell shares, it's assumed you're selling the oldest shares you bought first. The Income Tax Act specifies this method for equity shares — you cannot choose average cost or LIFO.
Why does it matter? A worked example
You buy 100 shares of Infosys in three tranches:
| Purchase Date | Qty | Price |
|---|---|---|
| Jan 2022 | 30 shares | ₹1,400 |
| Aug 2022 | 40 shares | ₹1,600 |
| Mar 2023 | 30 shares | ₹1,800 |
You sell 50 shares in May 2024 at ₹2,000 each. What's your tax?
First 30 shares sold = Jan 2022 lot (held 28 months → LTCG)
Next 20 shares = Aug 2022 lot (held 21 months → LTCG)
Cost: (30×₹1,400) + (20×₹1,600) = ₹74,000
Sale: 50×₹2,000 = ₹1,00,000
LTCG = ₹26,000 (within ₹1.25L — zero tax!)
Average cost = (30×₹1,400 + 40×₹1,600 + 30×₹1,800) ÷ 100 = ₹1,600
Avg holding period = mix of LTCG and STCG depending on which lot's date you use. Result is ambiguous and incorrect per IT rules.
Incorrect method — cannot be used.
Cross-exchange FIFO: NSE vs BSE
A common trap: you buy shares on NSE and sell on BSE (or vice versa). The IT Act treats these as the same security — ISIN-based, not exchange-based. FIFO must be applied across both exchanges together.
Most spreadsheets and basic tools miss this. LotSight pools all lots by ISIN across NSE and BSE before applying FIFO.
FIFO across multiple demat accounts
This is where it gets complex. If you have two demat accounts (e.g., Zerodha + Groww), the IT Act still requires FIFO across both accounts for the same ISIN. You cannot treat each account as a separate FIFO queue.
LotSight handles this with its multi-account feature — all tradebooks are merged and a single FIFO queue is maintained per ISIN.
Let LotSight handle the FIFO for you
Upload your tradebook and get correct FIFO-based LTCG/STCG in seconds.
Start Free