You may have lower annual medical costs by exercising at recommended levels weekly, according to a study released Wednesday.

It’s known that regular moderate exercise can reduce risk of heart disease, stroke and chronic conditions such as diabetes and high blood pressure. The study’s findings also “emphasize the favorable impact on how much you pay for healthcare,” said Khurram Nasir, M.D., M.P.H., director of the Center for Healthcare Advancement & Outcomes and the High Risk Cardiovascular Disease Clinic at Baptist Health South Florida in Coral Gables.

Researchers examined data from a 2012 national survey sample of more than 26,000 Americans 18 or older who weren’t underweight, pregnant or unable to walk up to 10 steps. Nearly half the participants who didn’t have cardiovascular disease, and almost one-third who did, reported meeting guidelines for weekly moderate-to-vigorous activity.

People in the study who already had cardiovascular disease — coronary artery disease, stroke, heart attack, arrhythmias or peripheral artery disease — had higher healthcare costs. But the average healthcare costs among those who regularly exercised was more than $2,500 lower than those who didn’t meet exercise guidelines.

Participants were also grouped according to their number of cardiovascular risk factors: high blood pressure, high cholesterol, diabetes, smoking and obesity. Among the healthiest participants — no heart disease and at most one cardiovascular risk factor — those that exercised regularly had yearly medical costs about $500 lower than those who didn’t exercise.

­“Even among an established high-risk group such as those diagnosed with heart disease or stroke, those who engaged in regular exercise activities reported a much lower risk of being hospitalized, (having) an emergency room visit and using prescription medications.”

The research suggests that even if just 20 percent of patients with cardiovascular disease who aren’t getting enough physical activity would meet exercise goals, the nation could save several billion dollars in healthcare costs annually.

“The message to the patient is clear: There is no better pill in reducing the risk of disease and healthcare costs than optimizing physical activity,” Nasir said.

For cardiovascular health, the American Heart Association recommends at least 30 minutes of moderate-intensity aerobic activity five days a week, or at least 25 minutes of vigorous aerobic activity three days a week, or a combination of the two.

Moderate activity, which causes a light sweat, or only modest increases in breathing or heart rate, includes fast walking, lawn mowing or heavy cleaning. Vigorous activity includes running or race walking, lap swimming or aerobics.

Heart patients should work with their healthcare team to achieve exercise goals.

The study is published in the Journal of the American Heart Association