The New York Yankees swooped in Saturday to acquire reigning NL MVP Giancarlo Stanton after he had invoked his no-trade clause to block deals to the Giants and Cardinals. It was a relative bargain for New York with Starlin Castro and second-tier prospects Jorge Guzman and Jose Devers going to Miami.

The Yankees have made it clear they intend to get under the $197 million luxury tax threshold in 2018, which will reset their tax rate -- the club is currently taxed at the maximum 50 percent -- and save them millions. They've paid luxury tax every year since the system was put in place in 2002. That's a lot of wasted money.

Acquiring the largest contract in the sport -- Stanton is three years into his record 13-year, $325 million contract -- doesn't seem to jibe with the plan to get under the luxury tax, but given the team's payroll situation, the Yankees can not only afford Stanton, but they still have room for another signing or two.

The average annual value of Stanton's contract is $25 million, but since the Marlins are kicking in $30 million, that money is spread out across the remaining years of the contract. So that's a $3 million "credit" to the Yankees per season, reducing Stanton's luxury tax "hit" to $22 million per year. It doesn't matter that New York may never actually see a penny of that $30 million -- the Marlins only pay it if Stanton does not opt out -- they're still credited with the luxury tax savings.

Following the 2017 season, the Yankees shed the pricey contracts of CC Sabathia ($25 million) and Alex Rodriguez ($27.5 million) -- yes, the Yankees were still paying A-Rod this year -- as well as smaller salaries like Matt Holliday ($13 million) and Michael Pineda ($7.4 million). That comes one year after shedding Mark Teixeira ($22.5 million). So many of those big contracts are coming off the books.

All of that money going away is what puts the Yankees in position to get under the luxury tax this season, even with Stanton. That and their stable of young impact players, who provide a ton of value at near league minimum salaries. Aaron Judge, Gary Sanchez  and Luis Severino are crucial to making the luxury tax plan happen. Here is a breakdown of New York's payroll situation.

Guaranteed contracts

The Yankees still have some wiggle room even after adding Giancarlo Stanton's contract. USATSI

At the moment the Yankees only have seven players under contract for the 2018 season. These seven players account for $120.92 million against the luxury tax threshold. Here are the seven players with their luxury tax hits:

Keep in mind Castro's $8.57 million luxury tax hit -- Castro signed a seven-year deal worth $60 million with the Cubs back in 2012 -- goes away with the trade, so Stanton is only really adding $13.43 million to the team's luxury tax payroll in 2018. Removing Castro's salary is not insignificant.

Arbitration-eligible players

The Yankees have a fairly large arbitration class this offseason. Eight players, to be exact, including several important members of the team. These players have not yet signed 2018 contracts -- that'll happen at some point in January, most likely -- but they have to be budgeted into the 2018 payroll, obviously. Here, via MLB Trade Rumors, are New York's projected arbitration salaries:

The MLB Trade Rumors model is not perfect, but it has proven to be quite accurate over the years, getting most projections within a few thousands bucks. Players with unprecedented early career credentials give the model the most trouble -- Tim Lincecum going into his first arbitration year with two Cy Youngs caused some havoc -- but the Yankees have no one like that this offseason.

The Yankees could look to lock up one or more of their young players to a long-term extension, which would change their projected 2018 salary. For example, giving Gregorius the same five-year, $70 million contract the Mariners gave Jean Segura earlier this year would raise his luxury tax hit from the $9 million projected to the $14 million average annual value of the contract. The Yankees do not seem eager to extend anyone right now, however.

Those eight arbitration-eligible players combine for $29.4 million in projected salary. Add that to the guaranteed contracts and the Yankees are currently at $150.32 million total for 15 roster spots. 

Miscellaneous costs

The luxury tax payroll covers many things. It covers the entire 40-man roster, each team's contribution to player benefits, plus any money paid to players who get released or traded elsewhere. Here's where the Yankees stand with regards to the miscellaneous expenses:

  • Dead money: $5.5 million (portion paid to Brian McCann in 2018)
  • Benefits: $14 million (per estimates)
  • 40-man roster players in minors: $2 million (per estimates)

That's another $21.5 million added to the $150.32 million total, putting the Yankees at $171.82 million for still 15 active roster spots. The Yankees have 10 roster spots to fill, and no fewer than seven of them will be filled by players in their pre-arbitration years making something close to the league minimum. Those seven players:

Conservatively estimating those players at $600,000 apiece -- the league minimum is $545,000 in 2018, though like most teams the Yankees have a sliding salary scale based on service time, awards finishes, etc. -- equals $4.2 million worth of pre-arbitration players. The running total is now $176.02 million for 22 active roster spots plus all the miscellaneous expenses.

The Yankees could fill one or two of those three remaining roster spots with more pre-arbitration players to save money. Domingo German or Ben Heller could grab a bullpen spot. Tyler Austin or Tyler Wade (or both) could grab roster spots, especially with Wade likely to get a chance to compete with Torreyes for the second base job in the wake of the Castro trade.

Point is, the Yankees still have roughly $20 million in payroll space under the $197 million luxury tax threshold. They can't spend right up to the threshold this offseason -- they need to leave some payroll space available for mid-season call-ups and additions (every call-up counts against the luxury tax threshold) -- but there's still plenty of payroll room left over. 

Putting aside $10 million for midseason additions still gives the Yankees about $10 million in spending money this winter, which is a pretty nice chunk of change. Of course, they're also looking to unload some of their veterans, so they might be able free up even more spending money.

Trading Ellsbury and his entire contract won't happen. The Yankees could, however, eat something like $15 million annually to facilitate a trade. That would reduce Ellsbury to a $6.86 million a year player for his new team, and open up $6.86 million in payroll for the Yankees. It's not much, but it's better than nothing, especially when you have young outfielders like Clint Frazier and Billy McKinney ready to step into Ellsbury's roster spot.

Given his massive contract, it's easy to think the Stanton trade blows up the Yankees' chances of getting under the luxury tax threshold in 2018. That is not the case. The structure of Stanton's contract along with the subtraction of Castro and the club's current contact commitments give the Yankees about $10 million to spend this winter, and it could be even more if they move Ellsbury (or Headley), or decide they can put aside less than $10 million for midseason addition, or the arbitration-eligible players cost less than expected. That $10 million or so in spending money means it is very likely the Yankees are not done this winter.