Cotten Timberlake
Bloomberg News

Shares of Macy’s Inc., the second-largest U.S. department-store chain, rose Tuesday after the company forecast annual profit that was higher than analysts’ estimates amid a surge in online sales.

The shares advanced 2.8 percent to $39.59 after seeing their biggest intraday gain since Dec. 31.

Earnings per share for the fiscal year ending January 2014 will advance to as much as $3.95, the Cincinnati-based retailer said in a statement. Analysts projected $3.84, the average of 18 estimates compiled by Bloomberg News.

Chief Executive Officer Terry Lundgren has focused on tailoring merchandise to suit local tastes and benefited from exclusive Tommy Hilfiger, Sean John and Madonna products. Fourth-quarter revenue climbed 7.2 percent to $9.35 billion while online sales soared 48 percent, Macy’s said.

Net income in the quarter ended Feb. 2 fell 2 percent to $730 million, or $1.83 a share, from $745 million, or $1.74, a year earlier, when it booked one-time gains from the sale of store leases, Macy’s said.

Gross margin, or the percentage of sales left after the cost of goods sold, narrowed to 40.6 percent from 41 percent a year earlier.

The shares had dropped 1.3 percent this year through Monday, compared with a 4.5 percent gain for the Standard & Poor’s 500 Retailing Index.