My yearly maximum contribution to solo 401k is $6000 after $13000 contribution to Simple IRA on W2 position. This year I expect to earn less than $6000 from the side job. Can I contribute all profits after expenses since I still contribute less than my yearly limit? Then what is tax consequence? Do I have to pay self employment tax first based on the profit, then make solo 401k contribution with the money left?
The self employment tax is before the 401k deduction. However, you mentioned this is your side job, but did not specify your income from you main job. The value of the tax savings from your deduction you get for your traditional 401k contributions is based on your total personal income tax, and the way your business is organized determines how its income flows into your personal income. Note, if your total personal income is low enough you may want to consider a Roth 401k since the tax deduction from a traditional 401k might not be worth taking now.