How the forex computation works
The relief sits in the first proviso to Section 48. For a non-resident who bought shares in, or debentures of, an Indian company in convertible foreign currency, the gain is not computed in rupees. Instead the cost of acquisition, the expenditure on transfer and the sale consideration are each converted into the same foreign currency you originally used, the gain is worked out in that currency, and only then reconverted into rupees.
The effect is to remove rupee movement from the calculation. If the rupee weakened while you held the shares, that depreciation does not swell your taxable gain, because the whole computation happens in your currency first. Rule 115A fixes the exact exchange rates: the average of the telegraphic-transfer buying and selling rates for the cost and expenditure and consideration, and the telegraphic-transfer buying rate on the date of transfer to reconvert the resulting gain. It is worth stressing that this is mandatory, the statute says the gain shall be so computed, so it is not a benefit you claim, it is how the gain is worked out, and it equally blocks a currency loss where the rupee happened to strengthen.
Listed shares yes, unlisted shares no
This is the part most explanations get wrong. The proviso itself refers to shares in, or debentures of, an Indian company, which on its face includes unlisted shares. But for a non-resident selling unlisted shares, a special provision in Section 112 taxes the long-term gain without giving effect to the first and second provisos to Section 48, so the forex computation is deliberately switched off.
So the practical split is: on listed shares and debentures of an Indian company bought in foreign currency, the forex neutralisation applies, and your gain is computed in your currency. On unlisted shares, a non-resident does not get it; the gain is a flat 12.5% with neither forex protection nor indexation. This is why a blanket claim that NRIs compute all share gains in foreign currency is wrong, it holds for listed, and is removed by design for unlisted.
What it means at sale, and the paperwork
Where the forex rule applies, it can be a real saving. On a listed holding bought years ago when your currency bought far more rupees, the rupee-terms gain might look large, but the forex computation taxes only the genuine gain in your own currency, often much smaller. And because indexation does not stack with the forex proviso, and has largely gone in any case, there is no double relief to chase; the forex computation is the relief.
To apply it you need the original acquisition records: the date, the amount in foreign currency you paid, and the currency used, so the conversion can be done correctly under Rule 115A. Keep the foreign-currency purchase evidence, not just the rupee figure. A practising CA runs the Section 48 forex computation, confirms whether your holding is listed or unlisted so the right rule applies, and reconciles it against any TDS the buyer or company deducted in rupees.