For nearly a decade, Gundersen Health System’s hospital in La Crosse, Wis., boosted the price of knee-replacement surgery an average of 3% a year. By 2016, the average list price was more than $50,000, including the surgeon and anesthesiologist.

Yet even as administrators raised the price, they had no real idea what it cost to perform the surgery—the most common for hospitals in the U.S. outside of those related to childbirth. They set a price using a combination of educated guesswork and a canny assessment of market opportunity.

...