In late afternoon trading in New York, the Standard & Poor's 500 index increased 0.14 per cent, while the Nasdaq Composite Index inched 0.09 per cent higher. Earlier in the session the S&P 500 touched an intraday record high of 1,991.39.
Shares of Facebook rallied, last up 5.4 per cent to US$75.14, after the company's quarterly sales and profit beat expectations because of increased mobile advertising.
At least 28 brokerages boosted their price targets on the stock, by as much as US$15 to a high of US$100, according to Reuters.
Still, the Dow Jones Industrial Average slipped 0.04 per cent, dragged lower by declines in shares of Caterpillar and Boeing.
Shares of Caterpillar fell 3.2 per cent after the company predicted full-year profit that failed to meet expectations.
"We are seeing our customers defer maintenance," Chief Executive Officer Doug Oberhelman said on a conference call discussing a decline in mining equipment sales, Bloomberg News reported. "The bottom is just behind us. Our numbers are minuscule in terms of ticking up, but they are ticking up."
The latest US economic data were not all positive either, with the housing sector splashing cold water on the recovery. New home sales sank 8.1 per cent to a seasonally adjusted annual rate of 406,000 units in June, down from a downwardly revised 442,000 units in May, according to the Commerce Department.
Meanwhile, the International Monetary Fund downgraded its forecast for global growth, predicting a rate of expansion of 3.4 per cent for 2014, down from its 3.7 per cent estimate in April. It kept intact its forecast for 4 per cent growth in 2015.
"Global growth decelerated more than expected in the first quarter of 2014, largely because of temporary setbacks, including a sharp correction to an earlier inventory buildup and the effects of a harsh winter on domestic demand in the United States," the IMF said in its latest World Economic Outlook.
"Growth also disappointed in China as policies were tightened to dampen credit growth and housing market activity," the IMF said. "Growth moderated in other emerging markets due to softer external demand and also because of slower-than-expected investment growth."
In Europe, the Stoxx 600 Index ended the day with a 0.4 per cent gain, as did Germany's DAX. The UK's FTSE 100 Index rose 0.3 per cent, while France's CAC 40 added 0.8 per cent.