Veteran healthcare company Merck (MRK 0.37%) was looking very healthy on the stock market Thursday. Its shares gained 4.6% in value across the day, following the publication of quarterly results that featured a surprise on the bottom line. That gain was notably higher than the 1.3% advance recorded by the S&P 500 index.

Fourth-quarter results were published, and...

Before market open, Merck took the wraps off both its fourth quarter and full-year 2023 results.

For the former period, the global company's total sales came in at $14.6 billion, 6% higher year over year. Non-GAAP (generally accepted accounting principles) adjusted net profit squeaked into the black at $66 million ($0.03); however, this was well down from the over $1.2 billion it earned in the same quarter of 2022.

Despite the steep bottom-line decline, analysts were expecting a notably less encouraging figure. On average, they were modeling an $0.11-per-share adjusted net loss. Revenue also topped expectations, with the consensus pundit estimate sitting just under $14.5 billion.

Merck did particularly well with its top drug, cancer treatment Keytruda. Its sales climbed 21% higher to over $6 billion, comprising nearly half of the company's total revenue.

There's more where that came from

Merck also proffered full-year 2024 guidance. The healthcare mainstay said it expects to book $62.7 billion to $64.2 billion in total sales, filtering down into an adjusted, per-share net income figure of $8.44 to $8.59. The latter compares favorably to the average analyst projection of $8.42 per share, while those prognosticators are anticipating a top line of $63.5 billion.