Tax planners are eyeing a way to help upper-middle-income clients, such as doctors, accountants, and lawyers, cash in on one of the 2017 tax overhaul’s perks for business owners—even if they’re above the level of income at which the law’s restriction on the benefit kicks in.

Those individuals could donate to charity to reduce their taxable income and hop under the income barriers that keep super-wealthy people from benefiting from a deduction meant for small businesses. They also could—and in many cases likely will—keep the money, by putting it into a 401(k) or individual retirement arrangement (IRA), saving tens of thousands of dollars in the process, depending on where they’re at on the income scale, tax planners told Bloomberg Tax.

The latter strategy could be a means of getting a piece of the law’s deduction for pass-through businesses under new tax code Section 199A. It would benefit self-employed people and owners of such businesses—such as S corporations; limited liability companies; and partnerships, for which income is taxed at the owner level—earning between about $320,000 to $450,000 for married filers and between about $160,000 and $240,000 for single filers, tax professionals said.

If taxpayers don’t take advantage of the strategy, the marginal tax rate on a few extra thousand dollars could be upwards of 50 or 60 percent. The tax filing season began Jan. 28, and is the first under which the bulk of the new tax law’s changes will apply.

“Where you’d expect to see lots of tax planning is right around the thresholds,” said Brian Reardon, president of the S Corporation Association and former special assistant for economic policy to President George W. Bush.

Lawmakers gave pass-through businesses a 20 percent deduction in tax reform, as they sought to level the playing field between the entities and C corporations—entities taxed separately from their owners, now at the 21 percent statutory rate.

That write-off for pass-throughs came with a litany of restrictions above incomes of $157,500 for single filers and $315,000 for married filers. Between those income levels and, respectively, incomes of $207,500 and $415,000, the deduction may be phased out based on whether the business owners conduct a “specified service” business, the W-2 wages they pay, and the property their companies use.

Reducing their taxable income by a few thousand dollars by planting the money in a 401(k) or IRA could translate to as much as twice that amount in tax savings, according to tax professionals.

‘A Gift Waiting to be Given’

“This is just good, old-fashioned tax planning,” said Glenn Dance, managing director of partnership taxation at Grant Thornton LLP in Arlington, Va. “It seems like a gift waiting to be given.”

Dance, a former special counsel to the IRS Associate Chief Counsel for pass-throughs, said he saw no reason why the government would stop taxpayers from doing this—and it could certainly be worthwhile.

For example, a single person earning $226,500 from a “specified service” business—if half the wages the person pays exceeds a fifth of their income from the business—could tuck $19,000 in a 401(k), he said. That $19,000 deduction, he continued, would save the individual $7,500, while dropping to $207,500 in income would allow the person to take a deduction equal to 20 percent of the income from that business, known as “qualified business income.”

The tax savings—and whether the taxpayer would actually benefit—become less straightforward in the space between the two sets of income thresholds: $315,000 to $415,000 for married filers and $157,500 to $207,500 for single filers. The reduction in overall taxable income could reduce “qualified business income,” the amount from which the deduction is calculated, but by sliding down the taxable income scale, pass-through owners slowly ease off the restrictions that phase in as incomes grow.

“You can concoct a whole lot of different cases” in which a taxpayer in between the two thresholds may or may not see a net benefit, said Andy Howlett, a member of Miller & Chevalier Chartered. He added that the phase-in, as opposed to a red line dividing incomes that qualify and don’t, mitigates some of the gaming around the margins.

The Flip Side

On the other hand, not taking advantage of the strategy, for those just in between the income thresholds, could result in sky-high marginal rates on a few extra thousand dollars of taxable income, noted Glen Birnbaum, a certified public accountant at Heinold Banwart Ltd. in East Peoria, Ill.

Because of the way the phase-out of the deduction works, as a business owner in between the two thresholds earns an extra dollar of income, it can essentially be treated as more than one dollar for tax purposes. That’s because a chunk of the deduction is lost as the individual climbs through income brackets.

In certain cases, for married filers with taxable income close to but just under $415,000, the marginal rate can rise to as much as 64 percent on the last $1,000 of income—roughly double their regular statutory marginal rate.

The result, Birnbaum wrote in an email to Bloomberg Tax, is incidentally not far off from the 70 percent marginal rate for multi-millionaires, a policy pitch of progressive Rep. Alexandria Ocasio-Cortez (D-N.Y.).