Macy's reported fourth-quarter earnings on Tuesday that outpaced expectations, helped by a boost from last-minute shoppers who lifted sales in the days leading up to Christmas.

Shares climbed as much as 6% in premarket trading, before they dropped and opened flat.

"Taken as a whole, 2019 did not play out as we intended for Macy's, Inc. However, we executed well during the Holiday 2019 season," CEO and Chairman Jeff Gennette said in a statement.

Here's what Macy's reported for its fiscal fourth quarter compared with what analysts were expecting, based on Refinitiv data:

Earnings per share, adjusted: $2.12 per share vs. $1.96 per share expected

Revenue: $8.34 billion vs. $8.32 billion expected

Same-store sales: down 0.5%, on an owned plus licensed basis, vs. a drop of 0.9% expected

Macy's reported net income for the fourth quarter of $340 million, or $1.09 a share, compared with $740 million, or $2.37 a share, a year earlier.

Excluding items, Macy's earned $2.12 a share, topping analyst estimates of $1.96 per share, reported by Refinitiv.

Sales fell to $8.34 billion from $8.46 billion a year earlier but were higher than the $8.32 billion analysts expected.

Same-store sales for the quarter declined 0.5%, on an owned plus licensed basis — a drop from 0.7% growth reported over the same quarter a year earlier.

The company reported holiday sales last month that didn't decline as much, year-over-year, as investors expected. The company said same-store sales fell 0.6% at its owned and licensed stores during November and December.

"We were pleased with the significant trend improvement in the fourth quarter, including a meaningful sales uptick in the 10 shopping days before Christmas," Gennette said.

Gennette said 2020 will be a transition year, and the company reiterated its annual profit forecast that it provided to analysts earlier this month. It is projecting full-year net sales of $23.6 billion to $23.9 billion and a drop in same-store sales on an owned plus licensed basis of 2.5% to 1.5%. Annual adjusted earnings per share are forecast by Macy's to fall within a range of $2.45 to $2.65.

The coronavirus outbreak, which has infected more than 80,200 and killed at least 2,704 mostly in China, could have a "small impact on first quarter sales," Gennette told investors on the company's conference call. The company's office in Hong Kong has reopened, Gennette said. He added that about 70 stores that have a large Asian customer base have seen a slight drop in sales.

"At this time, we have not factored in any potential negative impact from the coronavirus into our 2020 guidance," he added.