Getting your knee replaced—despite the hefty price tage—could give you a leg up on making more money in the long term.
The average total knee replacement surgery generates indirect savings of almost $40,000—more than offsetting the cost of an operation that itself costs about $21,000, according to a new study being published in the The Journal of Bone & Joint Surgery.
The study looked at 600,000 total knee replacement surgeries performed in 2009 and suggests that the lifetime "societal savings"—mainly in the form of patients' continued employment and increased earnings—equal about $12 billion.
Those savings are on track to grow dramatically in coming years as more people have the procedure as a result of aging or obesity. The number of people getting knee replacements increased to 644,000 in 2011 and is expected to grow to 3.5 million a year by 2030.
In the past few years, people have begun getting replacements when they're younger, said Lane Koenig of KNG Health Consulting and an author of the study. That's why surgery has a net financial benefit for many patients, in addition to reducing their pain and enhancing their mobility.
"You've got a younger population—they're working age," he said.
In fact, nearly half the people undergoing the procedure are under 65—a typical retirement age for many workers—up from just 26 percent in 1997.
Koenig's study found that the average net lifetime societal benefit fell in the range of $10,000 to $30,000. It factored in fewer missed workdays and reduced disability payments stemming from the procedure. Higher earnings from a longer working life accounted for about 85 percent of the benefits, which accrue mainly to workers and their employers.
The study, commissioned by the American Academy of Orthopaedic Surgeons, comes as the price of many medical procedures are being examined more closely as health-reform advocates look for ways to reduce costs and boost value.
Knee and hip replacements are among the most expensive procedures reimbursed by Medicare. Another study last month found a staggering disparity between what hospitals charge for the operations, and little connection between price and the quality of outcome.
The price consciousness on knee replacements has led to recent moves such as Oregon officials slapping a $500 surcharge on covered state employees who opt for the operation, and California's requirement that all state workers and retirees foot the bill for the out-of-pocket costs of such operations in excess of $30,000.
Dr. John Tongue, AAOS past president and one of the study's authors, said that the group wanted to conduct the research because "we think that the value [of knee replacements] has been overlooked."
"This is the first study that really tackles it from a societal point of view," he said. "It sort of changes the conversattion to how valuable it is, not just how expensive it is.
"We're looking not just at the quality of life, we're looking at the ability to get back to work," Tongue said, adding that four additional studies analyzing the financial benefits of other orthopedic procedures are in the pipeline.
(Read more: Critical illness fears)
Mary Ann Tuft, a 78-year-old who runs Tuft & Associates, a Chicago-based boutique executive search firm, underwent total knee replacement in 2005 after years of pain.
"I found it difficult to walk down the block," Tuft said. She began avoiding networking events such as cocktail parties "because you stand all the time," she added. "After a decade, I had enough of it, and I just knew that I had to do something."
(Read more: We Americans are healthy, really!)
Tuft raved about the results of her surgery, saying she's much more mobile and barely aware of the fact that she has an artificial joint. "I probably wouldn't have been able to function" much longer, she said.
"This is eight years later, and my business has probably grown three or four times since," said Tuft, adding that the firm's annual billings top $1 million. "We have more business now that we've ever had."
—By CNBC's Dan Mangan. Follow him on Twitter