MILWAUKEE — One of life’s simple pleasures just got a little sweeter. After years of waffling research on coffee and health, even some fear that java might raise the risk of heart disease, a big study finds the opposite: Coffee drinkers are a little more likely to live longer. Regular or decaf doesn’t matter.

The study of 400,000 people is the largest ever done on the issue, and the results should reassure any coffee lovers who think it’s a guilty pleasure that may do harm.

“Our study suggests that’s really not the case,” said lead researcher Neal Freedman of the National Cancer Institute. “There may actually be a modest benefit of coffee drinking.”

No one knows why. Coffee contains a thousand things that can affect health, from helpful antioxidants to tiny amounts of substances linked to cancer. The most widely studied ingredient — caffeine — didn’t play a role in the new study’s results.

It’s not that earlier studies were wrong. There is evidence coffee can raise LDL, or bad cholesterol, and blood pressure at least short-term, and those in turn can raise the risk of heart disease.

Even in the new study, it first seemed that coffee drinkers were more likely to die at any given time. But they also tended to smoke, drink more alcohol, eat more red meat and exercise less than non-coffee-drinkers. Once researchers took those things into account, a clear pattern emerged: Each cup of coffee per day nudged up the chances of living longer.

The study was done by the National Institutes of Health and AARP. The results are published in today’s New England Journal of Medicine. Although this doesn’t prove that coffee makes people live longer, the two seem related.