Tim Duncan, who has too many basketball accolades to fit in this post, signed a contract for just more than $5 million next season so the Spurs had enough cap space to get LaMarcus Aldridge.

Duncan averaged 17.3 points, 11.4 rebounds and 2.4 blocks per 36 minutes while earning all-star, all-NBA third team and all-defensive second team honors last season. He ranked second among power forwards in real plus-minus (5.2) — net points per 100 possessions adjusted for teammates and opponents — and fifth in value over replacement. The Washington Post’s Michael Lee ranked him No. 12 overall on his “Top NBA Free Agent rankings” list.

To say that Duncan’s deal represents a significant discount would be putting it mildly.

Neil Pain from FiveThirtyEight projected Duncan would have a plus-2.3 real plus-minus next season, which is a reasonable estimate considering he would be 39 years old. Of the 10 players that were within 10 percent of that production last season and signed using salary cap space, only one had an average annual cap hit of less than $5 million: James Johnson (2.5 million). The average annual value of these players was $10.7 million.

It’s clear Duncan is undervalued, but by how much?

NBA teams are required to spend a minimum salary on players, so if we subtract the average minimum salary ($1.726 million) for 12 players from the $70 million salary cap, we are left with $49.3 million above and beyond the minimum contracts. A replacement level team would be expected to win 16 games, while an average NBA team would have a 41-41 record. Since 25 wins is what it takes to go from replacement level to average, dividing $49.3 million by 25 gives us a $1.972 million per win valuation for free agents.

Players who played at least 25 minutes last season within the range of 2.0 to 2.5 RPM, similar to Duncan’s 2015-16 projection, produced between 5.2 and 7.7 wins above replacement, valuing Duncan between $10 and $15 million next year. And with his recent performance on the upswing, you have to think he would be on the higher end of the spectrum.

In reality, if Duncan had actually entered the open market this summer, there is no doubt he would have been offered a four-year max contract worth close to $94 million, or $23.4 million per year.