Sensex and Nifty faced heavy volatility on Tuesday to settle flat as investors preferred to stay on the sidelines ahead of the Reserve Bank of India's interest rate decision later this week.

Selling pressure in IT counters, foreign fund outflows, and weak trends in global equities also dented sentiments in markets, traders said.

Rising for the third straight session, the 30-share BSE Sensex eked out marginal gains of 5.41 points or 0.01 per cent to settle at 62,792.88. During the day, it hit a high of 62,867.95 and a low of 62,554.21.

The NSE Nifty went up by 5.15 points or 0.03 per cent to end at 18,599.

Both benchmark indices oscillated between highs and lows in a highly volatile trade during the day.

Also read: Rupee rises 1 paisa to close at 82.62 against US dollar

UltraTech Cement was the biggest gainer in the Sensex chart, climbing 3.13 per cent, followed by Kotak Mahindra Bank, Tata Motors, Axis Bank, Maruti, Bajaj Finserv, Bajaj Finance, and Mahindra & Mahindra.

In contrast, Infosys, Tech Mahindra, Tata Consultancy Services, Wipro, Bharti Airtel, HCL Technologies, ICICI Bank, and Nestle were among the laggards.

In Asian markets, Tokyo ended in the green, while Shanghai and Hong Kong settled lower.

Equity markets in Europe were trading in negative territory. The US markets ended lower on Monday.

Also read: Wipro sets June 16 as record date for ₹12,000-crore buyback

"The domestic market experienced profit-booking due to selling pressure in the IT sector. IT stocks witnessed a decline in anticipation of further downward revision in spending. However, a rally in auto and banks helped to recover the losses.

"Going ahead an important influencer will be the commentary on growth and inflation forecasts by the RBI following its MPC meeting, given the general consensus that rate pause will continue," said Vinod Nair, Head of Research at Geojit Financial Services.

Global oil benchmark, Brent crude, declined 1.84 per cent to $75.33 a barrel.

Foreign Institutional Investors (FIIs) offloaded equities worth ₹700.98 crore on Monday, according to exchange data.