A capital loss can only fight capital gains
The first rule is about what a capital loss may touch. It is ring-fenced inside the capital-gains head: a loss on a capital asset can be set off against capital gains, but not against your salary, your Indian rental income, or income from other sources (Section 71). So a loss on an Indian share sale cannot reduce the tax on your Indian rent; it can only reduce another capital gain.
Within the capital-gains head, the matching is specific (Section 70). A short-term capital loss is flexible: it can be set off against any capital gain, whether short-term or long-term. A long-term capital loss is restricted: it can be set off only against long-term gains, not short-term ones. So the character of the loss decides what it can shelter, which is worth knowing before you sequence your sales.
Carrying the loss forward, and the filing trap
If your loss is bigger than the gains available this year, the unused part is not lost, it carries forward for up to eight assessment years (Section 74), to be set off against future capital gains, with the same long-term and short-term matching applying in those years.
The trap is a filing one, and it catches people. To carry a capital loss forward, you must report it in a return filed by the due date under Section 139(1). A belated or missed return forfeits the carry-forward entirely, the loss cannot be revived later. Set-off within the same year is not lost by filing late, but the right to carry the loss into future years is, so for an NRI who tends to file late from abroad, a genuine loss can quietly disappear simply because the return went in after the deadline.
How a loss works with the listed-equity exemption
Where the gains are on listed shares or equity mutual funds, taxed at 12.5% above the ₹1.25 lakh annual exemption, the order of operations matters. You set your capital losses off against the gains first, and the ₹1.25 lakh exemption then applies to the net long-term gain that remains, not on top of the loss set-off. So the loss and the exemption do not stack independently; the loss reduces the gain, and the exemption shelters part of what is left.
A practising CA sequences this correctly, applying the right losses to the right gains, then the exemption, then the rate, and, crucially, makes sure the loss is captured in a return filed on time so it stays available for future years. Getting the loss recognised and carried is often worth far more over time than the single year's saving.