At age 40, David Ortiz is off to the second-best offensive season of his long and distinguished MLB career. He’s also set to retire at the end of the year, no matter how well his 2016 season with the Red Sox ends up going.

“My body, man,” Ortiz explained to Yahoo’s Jeff Passan. “My body’s pretty beat up. Remember, if you look at guys my size, they don’t last. I noticed that seven or eight years ago. That’s why I needed to start doing things right. I lost 25 pounds. I started eating better, do things better. But let me tell you: It’s not easy, man.”

He makes a compelling case. But for the purposes of building a Hall of Fame résumé, Big Papi might also be making a strategic error in hanging up his spikes: A few more years of even modest production could mean the difference between enshrinement and not.

To judge Ortiz’s Hall chances, I used Jay Jaffe’s JAWS score, which balances the peak and total wins above replacement for each player relative to the average for his position — in Big Papi’s case, first base. (Yes, Ortiz has spent most of his productive years as a designated hitter, but since the position has existed since only 1973, JAWS lumps Ortiz in with first basemen.) My model uses logistic regression to turn a first baseman’s JAWS score — and whether he was a known performance-enhancing drug user — into a probabilistic prediction of whether he’ll be inducted in Cooperstown someday.

Right now, Ortiz’s Hall of Fame odds are right on the boundary. If he decided to retire tomorrow, his current JAWS total of 42.6 would yield a 25.4 percent prediction for the Hall, about a one-in-four shot. But Ortiz is in a critical part of the curve: Dan Szymborski’s ZiPS system projects that he would add another 7 WAR (for a JAWS score of 46.2) if he played through 2019, and with that boost he would be almost a coin flip to make the Hall, with a predicted probability of 46.3 percent. Although he may not realistically be able to add that many WAR anyway — projections are an imperfect science — each small contribution boosts his chances substantially.

Obviously, this methodology is a simplified way to quantify Ortiz’s Hall of Fame prospects. In addition to his prodigious regular-season achievements, Ortiz is a postseason hero who helped lead Boston to a curse-breaking World Series win. He also has the specter of a positive steroid test hanging over his record — which can be enough for some Hall of Fame voters to deny a player, regardless of his on-field contributions. So Ortiz’s case comes down to a lot more than just his JAWS total.

But at this point in his career, every little bit helps. With a place in Cooperstown on the line, maybe Ortiz will reconsider his decision to retire and keep slugging away for another couple of years.