The grandfathering formula
When long-term gains on listed shares became taxable again in 2018, the law protected the gains that had already accrued up to 31 January 2018 by adjusting the cost. So for shares or equity mutual funds you bought before 1 February 2018, your cost of acquisition for the gain calculation is not simply what you paid. It is the higher of two things: your actual cost, and the lower of the fair market value on 31 January 2018 and the price you sell at.
Work through it and the effect is clear. If the share had risen a lot by 31 January 2018, that higher 31-January value becomes your cost, so the gain from before that date is not taxed. But the formula caps the 31-January value at your sale price, which stops you manufacturing a loss where there is a real gain. So grandfathering can wipe out a gain, but it can never turn a genuine profit into a deductible loss. This is the sub-rule people most often get wrong, taking the raw 31-January value without the sale-price cap.
Still current, and the NRI forex trap
Grandfathering has survived the recent changes. Even though long-term gains on listed equity are now taxed at 12.5%, up from 10%, and the annual exemption is ₹1.25 lakh, the grandfathering of pre-2018 shares under Section 112A continues unchanged. So for an old holding you still start from the grandfathered cost, take the ₹1.25 lakh exemption, and pay 12.5% on the rest.
There is an NRI-specific trap. NRIs who buy Indian shares in foreign currency have a separate relief that computes the gain in that currency to strip out rupee movement. But that foreign-currency computation and the Section 112A grandfathering do not combine; they are mutually exclusive. So an NRI selling pre-2018 listed shares computes the gain in rupees using the grandfathered cost, with the ₹1.25 lakh exemption and the flat 12.5%, and does not also get the currency protection. Choosing to work it the wrong way, or trying to claim both, produces a figure the tax office will not accept. A practising CA computes the grandfathered cost correctly, applies the exemption, and confirms the right basis for your holding.