When I gave up caffeine, the first day was like a scene out of Trainspotting. Picture a grown man balled up on the couch, sweating in November, on the cusp of vomiting, head split right in two. Then a low-grade headache that lasted for a week set in. But I was also sleeping sounder and longer, and, despite a few mornings with a serious coffee craving, I felt better. I didn’t have as much of an afternoon slump, and I was less irritable—I was using my car horn less, and I didn’t feel as annoyed by things not going exactly how I planned. Within a few weeks, I’d lost four pounds. I’ve been off the stuff ever since.

Caffeine can indeed be a great thing, but it can also work against you. Your experience with the drug depends on your biology and how much of it you take in. Before I decided to give up caffeine for good, I was drinking upward of three cups a day. But conversations with people much smarter than myself—biochemists, nutritionists, sleep experts, neurologists—led to me to believe that I was overdoing it at a rate that was bad for my health, sleep, disposition, and performance.

When you’ve been mainlining caffeine for your entire adult life, it can be tricky to parse out how it impacts you. Start by analyzing just how much you’re consuming, then check in with your physical and mental states. If you think it might be time for an intervention, here’s some advice on how to cut down.

How Much Are You Really Taking In?

Ninety percent of American adults ingest caffeine every day, and the average intake is about 300 milligrams, or roughly a medium-size coffee. The humble 16-ounce Starbucks drip coffee contains 310 milligrams. A 20-ounce light roast has 475 milligrams. So if you’re downing multiple cups a day, you could be ingesting north of 1,000 milligrams.

Anything over 400 milligrams a day can bring about side effects like headaches, insomnia, an upset stomach, and anxiety, according to the Mayo Clinic, and 14 percent of Americans drink that or more regularly. However, there isn’t a hard number that is unhealthy for everyone, says Maggie Sweeney, a researcher at the Johns Hopkins Medical Institute. Your response is likely influenced by your lifestyle and your genes. In rare cases, large amounts of caffeine can even increase the likelihood of having ministrokes (also called transient ischemic attacks), during which blood flow to your brain is briefly cut off, says Chris Winter, a neurologist and author of The Sleep Solution. “It’s really weird to see a 21-year-old who’s had lots of subtle vascular strokes over the years, and these tend to be people who were really pounding energy drinks,” says Winter. “There is certainly such a thing as too much caffeine.”

When I did the math, I’d been consuming roughly 1,200 milligrams throughout the day and had been every day since 2001. Caffeine has a half-life of roughly six hours, meaning that if you drink 300 milligrams at noon, you will have about 150 milligrams in your system at 6 P.M., about 75 milligrams in your body at midnight, and so on. So my body had likely spent almost two decades under the influence.

Side Effects

I determined I might be overdoing caffeine after talking with Trevor Kashey, a registered dietitian nutritionist who owns his own practice and holds a Ph.D. in biochemistry. He has his new clients—who range from average janes to Olympians—go caffeine-free for two weeks as part of a larger approach to suss out foods that might be causing indigestion, sleep issues, bloating, or sluggishness. Coffee is a well-known gastrointestinal irritant, Kashey and Sweeney both point out.

Caffeine also blocks the action of adenosine, a chemical that occurs naturally in the brain and clues the body in to fatigue. Meanwhile, it increases the release of cortisol, a hormone that exacerbates the stress response and can interrupt normal patterns of wakefulness and sleep, Sweeney says. Taking caffeine out of the equation means sleep naturally improves.

Plenty of research has shown that ample sleep makes for a happier, healthier mind and body. According to Kashey, those advantages could outweigh any benefits you’d see from caffeine. Winter explains that better sleep often leads to better eating habits, which was likely why I dropped a few pounds in those early weeks. A 2013 study published by the American College of Chest Physicians found that sleep-deprived people ate nearly 600 more calories a day than people who got in a full night’s worth. When you’re tired, the hunger-inducing hormone ghrelin goes up, while the fullness-signaling hormone leptin goes down, Winter says. If you're eliminating caffeine from sweet coffee drinks or energy drinks, the benefits can be twofold, since you’re cutting a lot of sugar.

Both Kashey and Sweeney also frequently hear from clients who say they feel less anxious after cutting their coffee intake. Caffeine has been implicated in anxiety in various strong studies dating back to the late eighties, Sweeney says. The DSM-5, basically the bible for mental-health professionals, officially recognizes caffeine-induced anxiety disorder.

How to Give It Up

Kashey has a litmus test to determine if a client is due for a breakup with caffeine. “Ask someone to remove caffeine, and watch the look on their face,” he says. Keep an eye out for a flash of existential dread. Winter echoes the suggestion, explaining that your reaction to the idea of going caffeine-free should offer insight into whether you’re overdoing it. Sweeney relies on well-known signs of withdrawal, like headaches, fatigue, and irritability, to clue clients into their own dependence and decide whether it’s time for a detox.

The good news: quitting doesn’t have to be hell. Sweeney suggests gradually weaning yourself off caffeine. Just start mixing decaf into your caffeinated coffee. “If you’re a particularly heavy user, it may take several weeks to gradually reduce your caffeine consumption,” she says. Drinking plenty of water and herbal tea can ease the transition as well.

Winter described my method—cold turkey—as “unnecessary suffering.” But it felt a lot more practical to me. (Kashey agreed: “Take a shitty weekend with herbal tea and some aspirin,” he says.) I’m glad I ripped off the Band-Aid and didn’t have to do any caffeine-mixing math. Plus, I got to see the results of a caffeine-free diet much more quickly.