The company, which also operates the upscale chain Bloomingdale's, is also raising its dividend to 25 cents from the current 20 cents. It also announced an additional $1.5 billion in stock buybacks.

Macy's, a standout among its peers throughout the economic recovery, is the first of the major retailers to report first-quarter results that should provide insight into Americans' mindset heading into the summer season. The latest results show that while the job market is improving and housing market is recovering, Macy's and others that cater to middle-income shoppers still face hurdles.

"We are especially pleased with our first-quarter sales and earnings performance given the challenges we overcame in this period," Terry Lundgren, chairman, president and CEO of Macy's, said in a statement.

Lundgren cited cool spring weather that lingered into April, but he also pointed to weak spending trends among the chain's most budget-conscious consumers as well as among its higher-income Bloomingdale's customers.

Macy's has been benefiting from its strategy of tailoring merchandise to local markets, but the company said it will seek out new opportunities to get shoppers to spend.

Macy's, based in Cincinnati, said it earned $217 million, or 55 cents per share in the quarter ended May 4. That compares with $181 million, or 43 cents per share, a year ago.

Revenue rose 4 percent to $6.38 billion.

Revenue at stores open at least a year rose 3.8 percent. Analysts had expected an increase of 4.3 percent.

Analysts expected earnings of 53 cents per share on revenue of $6.4 billion, according to FactSet.

The company said it expects revenue at stores open at least a year to rise 3.5 percent for the year. It also reiterated that it expects earnings per share for the full year to be in the range of $3.90 to $3.95.

Analysts had expected $3.92 per share.

The company said the dividend will be paid on July 1 to shareholders of record at the close of business on June 14.