People are usually savvy enough to check whether their hospital or doctor takes their insurance. But it's often a mystery how much a medical procedure or operation will cost, even with coverage.

A new report from Trilliant Health, a health care analytics company, shows how much prices for the same medical service can vary at different hospitals and surgery centers.

Want a total knee replacement? It can cost as little as $12,870 or as much $101,527. An ankle replacement? An Austin, Texas, hospital charges $22,011 while a New Jersey hospital billed more than $197,000 for the same operation. These wide price swings can leave insured consumers with big bills, loans and medical debt.

Using claims data from two major health insurers, Trilliant Health analyzed inpatient and outpatient rates charged by nearly 2,700 hospitals and 3,500 surgery centers. The report found prices can vary as much as nine-fold for the same operation or procedure. And hospital prices within the same state varied more than three-fold, the report said.

Trilliant also analyzed 10 hospitals listed on multiple best hospital lists and found no link between higher prices and improved health quality.