The Conference Board said that its Consumer Confidence Index rose to 102.2 from a revised 97.5 in April. The reading was much better than the 96 that analysts had expected, which would have been a decline from the original April reading of 97.7.
The index is now at the highest level since it reached 103 in March.
"Consumer confidence improved in May, gaining back nearly all of the ground it lost in April," said Lynn Franco, director of The Conference Board's Consumer Research Center, in a statement.
Economists closely track consumer confidence because consumer spending accounts for two-thirds of all U.S. economic activity.
The Expectations Index, one component of the confidence index that measures consumers' outlook over the next six months, improved to 92.5 from 86.7. That figure is more than 26 points higher than a year ago. The Present Situation Index increased to 116.7 from 113.8.
The Conference Board's gauges are derived from responses received through May 23 to a survey mailed to 5,000 households in a consumer research panel. The figures released Tuesday include responses from at least 2,500 households.
Consumers' assessment of current conditions was more upbeat in May than in April. Those saying that business conditions are "bad" edged down to 16.8 percent from 17.6 percent. Those claiming conditions are "good" was virtually unchanged at 26.5 percent.
As for the employment picture, consumers saying jobs are "hard to get" increased to 24.2 percent from 22.9 percent, but those claiming jobs are "plentiful" rose to 22.6 percent from 20.4 percent.
Consumers' expectations for the next six months, which had been losing ground since January, reversed course in May. Those anticipating business conditions to improve increased to 18.6 percent from 17.7 percent, while consumers expecting business conditions to worsen slid to 9.5 percent from 9.9 percent.
The outlook for the labor market was also brighter in May. Those expecting more jobs to be available in the coming months rose to 14.9 percent from 14.0 percent, while those anticipating fewer jobs declined to 15.9 percent from 18.4 percent. The proportion of consumers anticipating incomes to improve in the months ahead rose to 17.2 percent from 16.8 percent.
By Anne D'Innocenzio