The New York Times continued its digital growth in the second quarter of 2018, adding 109,000 digital-only subscribers. With that rise came an increase in revenue that counteracted a decline in print advertising.

The company said on Wednesday that revenue from digital subscriptions rose to $99 million in the second quarter, a jump of nearly 20 percent compared with the same period a year ago. Over all for the second quarter, total revenue increased 2 percent, to $415 million, and the company reported a profit of almost $24 million.

The Times now has 2.9 million digital-only subscribers, out of 3.8 million total.

“Subscription revenues accounted for nearly two-thirds of the company’s revenues, a trend we expect to continue,” Mark Thompson, the company’s chief executive, said in a news release. “We continue to believe that there is significant runway to expand that base substantially.”

Shares of The New York Times Company fell on Wednesday, closing 6.6 percent lower.

Other company revenue grew 40 percent in the second quarter, largely as a result of the company’s agreement with Newsday to print and transport its publications. Other sources of revenue included the renting of an additional four floors in the New York headquarters and the success of Wirecutter, a review and recommendation website bought by The Times in 2016.