Wall Street opted to focus on data showing the US services industry unexpectedly grew last month, underpinning hopes that American corporate profits can sustain growth in the face of the European debt crisis.
The Institute for Supply Management's services index inched higher to 53.7 in May from 53.5 in April. That compared with the median forecast of 75 economists surveyed by Bloomberg News for a decline to 53.4.
In late afternoon trading in New York, the Dow Jones Industrial Average gained 0.23 per cent, the Standard & Poor's 500 Index advanced 0.43 per cent and the Nasdaq Composite Index rose 0.46 per cent.
"The facts are telling you what we all know. There are a lot of places where there is weakness in our economy and others. With most things financially related, confidence is the game ... and if you can restore confidence, things get better quickly," Mark Lehmann, director of equities at JMP Securities in San Francisco, told Reuters.
The recent weakness in equities amid concern about the impact of Europe's crisis on growth globally, including in the US, has certainly helped make valuations more attractive. The S&P 500 traded at 12.9 times its companies' reported earnings, the lowest valuation since November, according to data compiled by Bloomberg.