NEW YORK — Keurig, the maker of single-cup coffee machine maker, said Monday that it has agreed to be sold to private equity firm JAB Holding Co. for almost $14 billion.

Its shares rose more than 74 percent in premarket trading Monday.

Keurig has been dealing with slowing sales of its machines and K-cups, the coffee-filled pods that are used in the coffee makers. Sales of K-cups, which accounted for more than 80 percent of Keurig revenue, rose 1 percent to $3.6 billion in the year ending September 26. Sales of its machines fell 23 percent to $632.6 million in the same period.

Its stock has suffered too, falling nearly 61 percent since the beginning of the year. In fact, the stock was the seventh-worst performing stock on the Standard & Poor”s 500 index for the year.

JAB Holding said it offered $92 for each share of Keurig, a 78 percent premium from the stock”s closing price of $51.70 on Friday. Keurig”s stock is down nearly 61 percent since the beginning of the year.

Luxembourg-based JAB Holding already has a robust coffee empire. It has a controlling stake of Jacobs Douwe Egberts, the company behind Gevalia, Tassimo and other brands. It also has stakes in Peet”s Coffee & Tea and Caribou Coffee. Outside of coffee beans, JAB Holding has a controlling stake of beauty company Coty and high-end shoe seller Jimmy Choo.

After the deal closes, which is expected to happen in the first quarter of next year, Keurig Green Mountain Inc. said it will remain headquartered in Waterbury, Vermont.