For what it's worth...
I've done the calculations hundreds of times for different client situations... and almost, almost always the numbers don't support a higher salary for higher pension fund contributions. But the math gets tedious. Some things you want to model:
1. The 2.9% or 3.8% Medicare and Obamacare tax burden (and deduction).
2. State payroll taxes... and state S corporation franchise taxes as well.
3. The true benefit of the deferral... I.e., you may get a 25% tax savings when you put money into the plan but then need to remember you may pay 15% when you take the money out.
4. The loss of the preferential tax treatment you would have received on the income if you'd invested same sum in a taxable but tax efficient container.
5. Current and future costs of the pension plan... E.g., the permanency requirement mentioned above.
One wants to be careful about applying general rules to specific situations. But I think the best general rule is set you S corp salary to the lowest reasonable level you can.
P.S. We may have different senses about what you can set your S corporation salary level too...
Every time you post you upset my assumptions!
So, assume $200K in business income after expenses for S Corp. Pay self $50k in wages. Of that $50k, you put $24k in salary deferral into 401(k) (because 50 years old or over). That leaves $26k. You can also match another $12,500, so $36,500 into the 401(k).
Self employment taxes on the $50k.
Income tax only on the $150k and the $26k wages left over after the salary deferral to the 401(k).
Plus $12,000 or so health insurance premiums deductible as a business expense but gets added to your W-2 (is that taxed?)
Am I thinking clearly on this?
I think so. The thinking clearly, I mean.
Here's how your $50K wages out of $200K of profits thing works...
First, you pay payroll taxes on the $50K... and out of that, yup, you can do $24K for the shareholder-employee's elective deferral.
Then, the other part...
Well, that $12K of health insurance counts as wages. So it means your box 1 W-2 shows $62K. Which means that the employer's match equals $15,500. 25% of the $62K in other words.
Note that you will not pay payroll taxes on the $12K of health insurance. And if you do your 1040 right, you will not pay income taxes on it either. But it bumps up your compensation, bumps up your employer match, and thumps down your distributions.
BTW, not saying you should do this... but if you paid your shareholder-employee $60K in wages... and then $12K in health insurance ... and then did a 25% match (so that's $18K), your total compensation package for the guy is going to be $90K.. the S corporatoin distributive share will be $110K roughly. And that might be reasonable for many situations. Even though you're only paying SE taxes on $60K and are actually saving about $13K.
Note: The last tax court case on this was a CPA named David Watson (google-able) and he got court to agree to $90K in wages and $140K in distributive share.