The 18k in employEE contributions should still be taxed for FICA and SE, but I believe any employER contributions should avoid that. Don't quote me though.
As I said, this is definitely not correct for solo proprietors. It may or may not be correct for S Corporations, but you'd need to look into that.
I can only speak from 1 year of S-corp status and I'm confidant that I did not pay SE taxes on my business contributions to the solo 401k.
Well that answers that then, thanks! And it makes sense that's how it would work since you only pay SE taxes on reasonable compensation, not profits for an S corp and the employER contributions to a solo 401k are profit sharing.
So it sounds like we have (anecdotal) confirmation on both fronts: You do pay SE taxes on all solo 401k contributions when filing as a sole proprietor, and you pay SE taxes on employEE contributions but not employER profit sharing contributions when filing as an S corp.
Of course, as an S corp you wouldn't be paying SE tax on distributions of profits anyway, so the only difference between contributing and not contributing under both filing types is the deferral of the marginal tax rate until withdrawal.
The above descriptions aren't really accurate. Some clarifying comments...
S corp shareholder-employees pay FICA and Medicare on some of the wages that show up on their W-2. Not SE taxes.
S corp shareholder-employees usually
don't pay FICA and Medicare on the part of their W-2 wages that represent health insurance and HSA contributions.
S corp shareholder-employees don't pay FICA or Medicare on the employer profit sharing.
Distributions in general don't impact income taxes. Rather, the distributive share or "allocation of profit" determines income taxes.
Employee 401(k) contributions, SIMPLE-IRA contributions, SE health insurance and HSA deductions show up as income tax deductions on a person's 1040.
Finally, and maybe most importantly, fringe benefits and employer profit sharing play into the reasonable compensation calculus. The law says you need to pay reasonable compensation to shareholder-employees and that you pay FICA and Medicare on this compensation. Or most of it. (See above.) So one of the things savvy S corp owners do is try to boost their compensation to the point of reasonable using things like employer profit sharing and SE health insurance.
E.g., maybe without fringe benefits, you can't make a base salary of $40,000 work. But if you pay a base salary of $40,000... and then add to that $20,000 of health insurance and HSA... and then get to do a 25% employer profit sharing contribution (so 25% on the $40,000 and the $20,000) which means another $15,000, maybe that "$75K in total compensation" works.
And then this redundant note: In the preceding paragraph when you use an S corp, the $20K of health insurance and $15K of employer profit sharing aren't subject to FICA or Medicare.