Michelle Fay Cortez / Bloomberg News

MINNEAPOLIS — People who undergo weight-loss surgery don’t reduce their costs as they take off pounds, as hospital stays for complications from the procedure exceed savings from obesity-related illnesses, a study found.

Researchers tracked insurance claims of 29,820 patients for as many as six years after bariatric surgery, comparing their costs with a group of people with obesity-related conditions who didn’t have the procedures. While pharmacy expenses and office visits were lower for surgical patients, repeat procedures were higher, according to the study in the journal JAMA-Surgery.

Bariatric surgery is one of the most effective weight-loss methods, with studies showing the procedure yields health benefits such as reduced diabetes risk and lower cholesterol for at least six years. There’s no evidence, though, that it prolongs life. The study released Wednesday, the largest and longest of its kind, shows the improvements that stem from avoiding diabetes and heart disease don’t necessarily bolster health across the board.

“This suggests that rampant bariatric surgery isn’t going to be an answer to health-care costs,” as some have suggested, said Jonathan Weiner, professor of health policy and management at Johns Hopkins Bloomberg School of Public Health, and the study’s lead author. “That doesn’t mean that some people, some of the time won’t benefit from surgery. This is a major source of information into the overall decision into who should get surgery.”

The study found no reduction in expenses to help recoup the $28,000 average cost of the initial surgery, with repeat inpatient hospital costs peaking after two to three years. The patients traded off the type of care they needed, with costs remaining stable at roughly $9,000 a year.

The number of procedures performed in the U.S. topped 220,000 in 2009, according to the American Society for Metabolic & Bariatric Surgery. The procedures, which achieve weight loss by restricting the size of the stomach, include gastric banding that is adjustable and reversible, and gastric bypass, in which part of the stomach is closed and the other is connected to the small intestine.

“Future studies should focus on the potential benefit of improved health and well-being of patients undergoing the procedure rather than on cost savings,” Weiner said in a statement.

More than 500 million people worldwide are obese, according to the World Health Organization. In the U.S., more than 44 percent of adults may be obese by 2030, according to a report from the Trust for America’s Health and Robert Wood Johnson Foundation.