The New York Times Co. (NYT) - Get New York Times Company Class A Report   shares soared after the newspaper company reported stronger-than-expected fourth-quarter earnings, propelled by its biggest gain in digital subscribers since the widely followed 2016 U.S. elections.

The Gray Lady said Wednesday it earned $502.7 million, or 32 cents a share, in its most recent quarter, compared to $484.1 million, or 38 cents a share in the year-earlier period. Analysts had expected earnings of 28 cents.

Lifting the numbers were 265,000 net new digital subscriptions, the biggest gain since late 2016, the company said. The New York Times ended 2018 with 3.4 million digital subscriptions and 4.3 million total subscriptions. Also boosting earnings was a gain in digital advertising revenue, which jumped 23% year over year in the quarter.

The company ended 2018 with a total $709 million in digital revenue, a significant step toward the self-imposed goal of reaching $800 million by 2020, CEO Mark Thompson said in a statement.

TheStreet Recommends

"As a result we are setting ourselves a new goal - to grow our subscription business to more than 10 million subscriptions by 2025," Thompson said, adding that the company will increase its investment in the newspaper's newsroom and opinion departments in 2019 in an effort to accelerate digital growth even further.

Shares in the New York Times rose 10.3% to close at $29.69 in trading on the New York Stock Exchange. The stock has more than doubled since the 2016 U.S. presidential elections.