UPDATE (5:27 p.m.): Per David Aldridge, Wes Matthews' deal is for 4-years, $57 million, or about $14.25 million per season. Obviously, this pushes the value of his deal with Dallas closer to that of Sacramento, making them almost even.

***

The Dallas Mavericks came to an agreement with Wes Matthews on Thursday night, just hours after it seemed the Sacramento Kings were doing their best to money whip him to California. Looking at the deal -- four-years for $64 million -- it's not hard to see why Mavs fans were concerned.

Mavs fans were doubly concerned because of the domino effect it could have. If Matthews were to agree to terms with the Kings, DeAndre Jordan, who was fresh out of his meeting with the L.A. Clippers, would have one less reason to pick the Mavericks as his next team.

However, Matthews notified the Kings that he wouldn't be accepting their offer and moments later accepted what is apparently a four-year deal worth $52 million.

But the secret is that $52 million and $64 million are a lot closer than you think. Due to the state income tax in California, workers pay 13.3 percent in the highest bracket (anyone earning over $1 million per year). Let's break this down and do some quick math.

★ Every Mavericks rumor all in one place. ★

First, in the NBA you are required to pay state income tax for the money earned in any state you work. For a Mavericks player, that means that earnings for 41 home games per season will not be subject to a state income tax. Add four more games to that number, thanks to two guaranteed road games in Houston and San Antonio, and you've got 45 games per season that aren't subject to any state income tax.

So, if Matthews is getting $13 million in a season, or $158,536.59 per game, about $7,134,146 of that isn't subject to any state income tax. All money in the bank. Multiply that by the life of the contract, and you get just over $28.5 million of his $52 million that isn't subject to any state income tax. Pretty sweet.

Now, the inverse scenario: $16 million per season in Sacramento means that 47 games (41 home games and two guaranteed away games against the Lakers, Clippers, and Warriors) are subject to California's highest bracket of state income tax. So, at $16 million per season, or $195,121.95 per game, about $9,170,731 is subject to a state income tax of 13.3%, which comes out to about $1,219,707 in state taxes that Matthews would owe per season.

That's just shy of $4.9 million owed in state taxes over the life of the contract, reducing what would be about $36.6 million (the amount of $$ in Matthews' Kings contract subject to California state income tax) to around $31.7 million.

Based on that money alone, Matthews is giving up about $3.2 million over 4 years, or about $800,000 per year, to play in Dallas rather than Sacramento.

If we consider the remainder of each contract (about $24 million with Dallas, about $27.5 million with Sacramento) to take similar state income tax hits depending on the schedule and the year, that's roughly $3.5 million more that Matthews walked away from, bringing the total difference between the Mavericks' four-year offer and the Kings' offer to be $6.7 million.

Is $6.7 million a lot of money? Absolutely. But it's considerably less than the $12 million it looked like Matthews turned down at first glance.