Caffeine is pretty much everywhere. It's in coffee and tea, of course, but also pops up in mints, gum, jerky and even maple syrup.

Dietary supplements containing caffeine are also wildly popular. And that holds true for people in the military, who often have to stay alert during long shifts.

But how much caffeine is actually in these energy supplements? Researchers from Harvard Medical School and from the military teamed up to analyze 31 supplements (all in capsule form) that are popular on military bases.

All the supplements, which are widely available, were purchased at a retail store — not a base commissary — so the results wouldn't apply just to military personnel.

The researchers found that some supplements don't reveal how much caffeine they contain, and the ones that do often list an inaccurate amount.

"When it's appropriate for troops to use caffeine, they should be using a carefully prepared product and not relying on mislabeled supplements," says Dr. Pieter Cohen, the Harvard team's lead researcher.

At moderate levels, caffeine is no big deal for most people and can even have some benefits. When overdone, however, it can trigger problems, including anxiety, insomnia, headaches, tremors and heart problems.

Cohen and his colleagues used some whiz-bang chemistry tools (high-pressure liquid chromatography and mass spectrometry) to figure out exactly how much caffeine is the supplements.

Of the 31 supplements, only nine had labels that accurately listed the amount of caffeine they contained. The rest either didn't list an amount or listed an amount that was off the mark — in some cases wildly so.

As detailed in an paper in this week's issue of the journal JAMA Internal Medicine, Cohen and his colleagues found that some contained twice as much caffeine as was on the label — upwards of 400 milligrams, or as much as a 24-ounce cup of coffee.

Other supplements contained only a quarter of the caffeine they claimed.

More than 250 milligrams of caffeine per day is too much, according to recommendations.

Cohen wouldn't name the 31 dietary supplements his team analyzed. He says this was a small study that looked at just one sample for each supplement, so it's possible that his team just happened to choose capsules from a bad batch.

Cohen says he wants to do a larger, more systematic analysis before he calls out a specific supplement maker.

Still, Cohen says his team's early findings suggest that regulators may need to step into the largely unregulated dietary supplement market.

"A lot of these products meet all legal requirements that currently exist today," he says. "That strongly suggests that the regulations which are there to ensure that we know what we're taking when we purchase the supplement are completely inadequate."

Copyright 2016 NPR. To see more, visit http://www.npr.org/.