The research: The study team examined 20 years of health and diet data on more than 100,000 people in search of links between diabetes rates and coffee or tea consumption. They found people who reduced their coffee habit by 8 or more ounces a day suffered a 17% hike in type 2 diabetes risk compared to people who didn’t change their intake. On the other hand, drinking an extra cup or more a day dropped a person’s risk for diabetes by 11%. Furthermore, people who drank a lot of coffee to begin with—24 or more ounces a day—and who didn’t adjust their coffee habit enjoyed rates of diabetes 37% lower than people who swallowed 8 or fewer ounces of coffee daily. What it means: First of all, the researchers say it’s not clear based on their data whether drinking more tea or decaf coffee can offer similar protections against diabetes. But past research has shown either (or both) may protect you from the disease, they point out. When it comes to caffeinated joe, the drink contains several “bioactive compounds” that may improve your body’s ability to metabolize glucose, which could explain coffee’s diabetes-repelling benefits, says study coauthor Shilpa Bhupathiraju, PhD. The bottom line: More and more research is piling up linking coffee to health improvements. Earlier this year, Bhupathiraju and her colleagues published another report tying higher coffee consumption to a significant drop in rates of cardiovascular disease. So what’s the ideal amount of java to lower your risks for CVD and diabetes? Aim for 3 to 5 cups (or 24 to 40 ounces) per day, Bhupathiraju suggests. Just keep your pm coffee drinking to a minimum to avoid disrupting your sleep patterns, experts advise. More from Prevention: 4 Surprising Coffee Cures