The Nifty 50 closed at 24,175.70, up 0.71 per cent, while the Sensex gained 0.75 per cent to settle at 77,502.