Outfielder Bryce Harper got a record-breaking $330 million, 13-year contract this week to leave the Washington Nationals and join the Phillies.

But there’s another number that’s almost as eye-popping: $12.6 million.

That’s the amount Harper could expect to pay in wage taxes if he made Philadelphia his primary residence for the duration of his contract, according to an Inquirer analysis.

Harper could save millions, however, if he lived outside the city, paying just $5.1 million in Philadelphia wage taxes in the next 13 years, the Inquirer estimated.

Philadelphia’s wage tax, long among the highest in the nation, claims close to 4 percent of income earned by Philadelphia residents, and just under 3.5 percent for those who live elsewhere but work in the city.

Why the large difference between Harper’s tax burden if he lived in Philadelphia or elsewhere? Athletes who live outside the city have to pay wage taxes only for days that they work in Philadelphia. They don’t pay the tax for working days spent at spring training and away games — and that adds up for Phillies players.

If Harper decided to live in Philadelphia, however, 100 percent of his wages would be subject to the resident rate.

“That’s pretty serious in terms of dollars,” tax lawyer Stephen Kidder said of the difference between Harper’s living in Philadelphia or outside the city. Kidder represents the Major League Baseball Players Association, as well as the NFL, NBA, NHL, and major-league soccer players associations.

The Inquirer analysis estimates that only 45 percent of Harper’s salary would be subject to the Philadelphia wage tax if he didn’t live in the city; Brian J. Woods of Geier Asset Management Inc., who was Brad Lidge’s accountant, told the Inquirer in 2009 that Phillies players pay wage taxes on roughly that portion of their salaries. The analysis also assumes that the city’s wage tax rates for both residents and nonresidents will continue to decrease over the next 13 years at the same rate they are set to decrease in the city’s current five-year plan.

Those city wage tax estimates do not include state or federal levies on income. Eagles quarterback Carson Wentz, for instance, bought a home in South Jersey when he joined the team in 2017. But Pennsylvania, with its flat 3.07 rate, offers a better deal for athletes than New Jersey’s tax brackets, which charge higher rates for higher earners.

Harper may be unlikely to make a permanent move to either Pennsylvania or New Jersey, however, despite the length of his contract. He currently owns a home near his hometown of Las Vegas, which offers a substantial tax benefit because Nevada has no personal income tax.

Kidder said it has become more common for professional athletes to maintain permanent residency in states without income taxes rather than establish residency in the state where their team is based.

“They can do that,” he said, but “they have to be very careful on the number of days” they spend in the state where they work so they do not break state tax laws regarding residency.

Philadelphia also taxes visiting teams’ players for any time spent here — even if it’s just one game.

Harper, therefore, has already paid thousands of dollars to Philadelphia while playing for the Nationals. Last season, he played 10 games at Citizens Bank Park. Kidder said most baseball players have an average of 220 working “duty days” per year, meaning that about 4.5 percent of his salary could be taxed in Philadelphia for the time he spent here. He made $21.65 million in 2018, according to mlb.com, so Philadelphia would have collected nearly $34,000 in taxes.

Cities’ and states’ practice of taxing visiting athletes is known as a “jock tax.” In December alone, Philadelphia raised more than $2 million in wage taxes paid by sports teams, according to city revenue reports. It’s not the sector with the largest wage tax collections — workers in the health and social services sector paid more than $32 million in wage taxes that month — but large athlete salaries add up quickly when it comes to tax collections.

As for Harper, he very well may have already taken Philadelphia’s tax burden into account as he chose to join the Phillies.

“Athletes more and more are taking the state and local tax considerations into account,” Kidder said, “when they’re calculating and comparing different offers.”