The numbers just didn’t work out.

Anthony Tolliver wanted to stay with the Pistons and the Pistons wanted Tolliver, but with their financial situation, it just wasn’t going to happen. 

Tolliver is parting with the Pistons for a second time in his career, agreeing to a one-year deal with the Minnesota Timberwolves, Tolliver’s agent, Larry Fox, told The Detroit News on Monday. 

Tolliver had a breakout year with the Pistons last season, hitting 44 percent from 3-point range. At age 33, he was one of the Pistons’ veteran leaders and had significant influence in the locker room and on the court.

More: Jose Calderon returns to Pistons on one-year deal

More: Beard: Adding Glenn Robinson III is low-risk move for Pistons

His contract was for $3.3 million last season but with his improvement from beyond the 3-point line, he became a hot target on the free-agent market. Several teams, including the Los Angeles Clippers and Timberwolves, made offers for a big raise for Tolliver — and he got a nice increase. A source indicated that Tolliver’s deal with Minnesota is for $5.75 million. 

That’s a number the Pistons simply couldn’t match, as they were drawing close to the luxury-tax line of $123.7 million and re-signing Tolliver at that number would have taken them over that threshold.

“(Tolliver’s) No. 1 thing going into free agency was to be with the Pistons. He (eventually) wanted to retire a Piston,” Fox told The News. “Anthony has a great relationship with (Pistons owner) Tom Gores.

“He really wanted to be there, but at the end of the day, they couldn’t go into the luxury tax.”

Last season was Tolliver’s second stint with the Pistons, after a two-year run in 2014-16. Tolliver left for the Sacramento Kings in 2016-17 but returned last summer.

Tolliver was projected to be a role player last season, but a few games with good 3-point shooting and solid defense against some of the best power forwards in the league, he earned a spot in the rotation. He flourished in the role, playing in 79 games and posting 8.9 points and 3.1 rebounds.

In Minnesota, Tolliver will be returning to the team for whom he played in 2010-12 and joining a loaded roster that includes Jimmy Butler, Karl-Anthony Towns and Andrew Wiggins.

Twitter: @detnewsRodBeard