The Sensex and Nifty reversed their early losses to gain nearly half-a-per cent in late trading on Wednesday. Sensex was up 0.37% at 71,822.83 points while Nifty gained 0.45% at 21,840.05 points.