The Nifty advanced 73.85 points or 0.34% to 21,618.70.
"The weakness in global indices continued to weigh down the domestic indices with every up move. The market is looking for fresh triggers for a direction, and the release of US and Indian inflation data may provide a near-term direction in the market.
"The investor's focus will be shifted to the earnings season, on a sequential basis, the earnings growth is likely to be lower, while the expectations for auto, capital goods, and cement will remain strong," said Vinod Nair, Head of Research, Geojit Financial Services.
Reliance Industries was the biggest gainer in the Sensex pack, rising 2.69%, followed by HCL Tech, ICICI Bank, Tata Motors, Wipro, IndusInd Bank, JSW Steel, Wipro, Tata Consultancy Services and Titan.
In contrast, NTPC, Power Grid, UltraTech Cement, Axis Bank,
In Asian markets, Tokyo settled in the green while Seoul, Shanghai and Hong Kong ended lower.
European markets were trading mostly in the green. The US markets ended mostly lower on Tuesday.
Foreign Institutional Investors (FIIs) offloaded equiti pes worth Rs 990.90 crore on Tuesday, according to exchange data.
Global oil benchmark Brent crude dipped 0.19% to USD 77.44 a barrel.
The BSE benchmark ended marginally higher by 30.99 points or 0.04% at 71,386.21 on Tuesday. The Nifty ended 31.85 points or 0.15% up at 21,544.85.