During its 2010 fiscal year, Keurig sold more than $330 million worth of brewers, which go for anywhere from $79.95 to $249.95 each. The company’s real money, though, comes from its “K-Cup” coffee capsules – it sold well over $800 million worth of those last year. And Keurig, now wholly owned by Vermont-based Green Mountain Coffee Roasters, only continues to soar. In May, the parent company told investment analysts it expected total revenue to increase more than 80 percent in 2011, to approximately $2.5 billion.

But today, 16 years after that trip to the hospital, the company Sylvan dreamed up is a billion-dollar juggernaut. Keurig’s commercial models are now in 13 percent of American workplaces (and more than 25 percent of those in Boston). Last Christmas, one out of every four home coffee makers sold in the United States was a Keurig. Lately the brand has taken on a viral quality: If someone gets a machine and shows it off to friends, soon everyone else in the neighborhood wants one, too.

On doctor’s orders, Sylvan cut back on his coffee intake, but only slightly. It was the least of the deprivations he suffered while creating a device that could make traditional coffeepots obsolete. Unlike the drip models already on the market, Sylvan’s machine would brew single cups using sealed capsules of ground coffee. From Keurig’s founding in 1992 until their departure in 1997, Sylvan and Dragone hacked together prototype after prototype, working in small offices in Waltham and doing most of the taste-testing themselves. For the first few years, they drew no salary and were turned down for funding by scores of venture capitalists.

Sylvan was quickly diagnosed with caffeine poisoning, something of an occupational hazard for a guy in his line of work. For the past three years, he and his business partner, Peter Dragone, had been trying to perfect a new kind of coffee maker – one they believed would revolutionize the way America started its morning. They named their invention “Keurig,” a word meaning excellence that Sylvan pulled from a Danish-English dictionary.

At Beth Israel, doctors determined Sylvan, then 37 years old, wasn’t having a heart attack. They did a CAT scan to rule out a brain injury. And so, as doctors typically do, they began to ask questions. Did he get enough sleep? Did he exercise? Most of Sylvan’s answers were medically uninteresting, until a doctor asked if he drank coffee.

One day in the spring of 1995, John Sylvan was parked outside a BayBank ATM in Coolidge Corner when he started feeling woozy. His heart palpitated. His head throbbed. He began to experience tunnel vision. Sylvan called his father-in-law, a physician, who insisted he drive directly to the emergency room.

Sitting in one such conference room on a recent morning, Keurig’s third cofounder, Dick Sweeney, carefully cuts a K-Cup in two with a pair of scissors. There’s a small pop when he punctures the plastic capsule, releasing the shot of nitrogen that keeps the coffee from oxidizing. Inside the container, there’s a conical filter filled with grounds. The amount ranges from 9 to 15 grams, Sweeney explains, depending on flavor and variety. When the plastic capsule is closed into the Keurig brewer, wide needles pierce its foil top and plastic bottom. The brewer then pumps in hot water, turning the capsule into a miniaturized version of the filter basket in a traditional coffeepot. The process takes just 45 seconds, and if you like French vanilla while your co-worker wants a hazelnut decaf, that’s no problem. Freed from the tyranny of brewing by the pot, to each his own.

When you walk into the lobby of Keurig headquarters, in a six-story glass building just off Route 128 in Reading, the first thing you see is a wall unit containing K-Cups –? 56 different kinds of them, from flavored coffees to chais to energy drinks (the company offers more than 200 varieties in all). Beside them is a counter lined with various Keurig brewers. When workers meet in the nearby conference rooms, they’re likely to offer one another breath mints. If ever there was a workforce prone to coffee breath, it’s this one.

For now, though, during an agonizing one-step-forward-two-steps-back economic recovery, Keurig – which has added 100 jobs since last October – is a rare Massachusetts company that’s charging ahead. But it wasn’t always that way, says longtime Keurig executive Chris Stevens. To sum up the extraordinary journey, he conjures up that old showbiz aphorism. “We’re an overnight success story,” he says, “that was 20 years in the making.”

There are other challenges coming, however. For one, kitchen gadgets are a notoriously faddish product category. (Raise your hand if you own a bread maker. Now raise your other hand if you’ve actually used it to make bread in the last five years.) The key patents that protect Keurig from competition expire next year, and that could allow imitators to begin selling low-priced knockoffs. And as Green Mountain’s share price has rocketed up – from $27 a year ago to $90 in mid-July – short-sellers have grown louder in predicting it must be heading for a fall.

Keurig executives admit they’re surprised by their success. “We felt it would be more of a niche product,” says John Whoriskey, general manager of the company’s At Home division. “We never really expected it to be as widely accepted as it is today.” In fact, Keurig’s biggest challenge these days is figuring out how to keep up with demand, which everyone agrees isn’t really a bad problem to have.

The idea for the Keurig machine came to John Sylvan in the mid-1980s. At the time, the Colby College graduate was working as a low-level marketing manager at Analog Devices, the Norwood semiconductor company. Among his unofficial responsibilities was periodically shaking down his colleagues to pay the coffee vendor. “It was like the Mafia – you had to go around and extract money to pay the coffee guy,” Sylvan recalls. “It was like my full-time job some days.”

Beyond the headaches created by the communal chip-in system, the coffee itself was generally terrible – even if a co-worker somehow managed to measure out the right quantity of coffee and water to make a decent pot, which rarely happened, the half-full carafe would then sit on the burner for hours, getting stale and bitter. Sylvan knew he could do better.

Sylvan quit his job and by the early 1990s was experimenting with single-serving coffee pods in his condo on Tappan Street in Brookline. The most difficult part: creating a machine that used just enough pressure to pump water through the capsule. “If you’d been there, you’d have seen things exploding in my kitchen and [the whole place] covered in coffee grinds,” he recalls. To help put together a business plan, Sylvan brought in a former Colby roommate, Peter Dragone, then working as director of finance for Chiquita, as a 50 percent partner.

In theory, single-serve brewing sounds simple, but it took years of painstaking trial and error to make the K-Cups actually work – and to find a way to cost-effectively produce billions of them. When Dick Sweeney joined the nascent company in 1993, the original founders were cutting filter paper into cones and inserting them into plastic cups by hand. (The cups themselves came from a company that made containers for Jell-O shots.) They then sealed each assemblage shut with a converted clothing iron. “It was all arts and crafts,” says Sweeney, who was named a cofounder and tasked with designing machines to automate the process.

At one particularly busy point, Keurig hired temp workers to hand-make 40,000 K-Cups. When a potential investor sampled the brew and asked how much it cost to make per cup, Sweeney replied fifty dollars each. He was joking, but if you accounted for all the bespoke elements in the prototype brewer and the handcrafted K-Cups, he probably wasn’t far off.