The Sensex advanced 41 points to close at 16,918 and the 50-share Nifty added 10 points and closed at 5,128.
The markets traded in a very tight range in trades today.
The Nifty traded in a range of 40 points and the Sensex 123 points.
Meanwhile, the European markets were also trading on a flat note after Moody's ratings agency cut its outlook for Germany.
Moody's cited the costs associated with a potential Greek exit from the euro zone and the possible need to provide support to Spain and Italy as the reason for the change in outlook for top-rated Germany, Luxembourg and the Netherlands.
CAC 40 index was down 4 points at 3,097, DAX was up 3 points at 6,422 and the FTSE was up 3 points at 5,536 levels.
The Asian markets ended on a mixed note on fears that Spain may need a financial bailout., Shanghai Composite closed marginally higher after China's flash factory purchasing managers index rose in July to its highest level since February, boosted by a pick up in output and signs of improvement in new export orders that offered relief to struggling financial markets.
While Nikkei closed lower by 20 points at 8,488 and Taiwan slipped 20 points to close at 7,008.
Back home, Hindustan Unilever was the top gainer among the Sensex stocks.
The stock surged 7.6% to close near its new 52-week high level of Rs 476 after reporting 112% year-on-year (yoy) jump in net profit at Rs 1,331 crore for the quarter ended June 2012, on back of land deals. The core net profit (before accounting for exceptional items) has increased by a 48% to Rs 855 crore during the recently concluded quarter. Revenues grew 14% at Rs 6,250 crore during the quarter under review on yoy basis.
Sterlite Industries, Maruti Suzuki, Bharti Airtel, Gail India, Hindalco, Reliance Industries, ITC and Coal India were also among the gainers, up 0.5-2.7% each.
On the other hand, Wipro was the top loser among the Sensex stocks. It slipped 3% to end at Rs 345 on reporting a lower-than-expected 18% year-on-year growth in net profit at Rs 1,580 crore for the first quarter ended June 30, 2012
Markets slip amid weak global cues
Wipro acquires Yardley's UK, select European businesses
Markets gain amid firm global cues
Markets extend losses
Earnings' checklist: Key sectors one should keep an eye on