Don’t withdraw. Take a loan
Defiantly do not withdraw money out of your 401k. You’ll be heavily taxed for it. Money withdrawn from your 401k will be taxed by 40% by the IRS, and if you spend the amount taxed you will potentially owe the IRS a lot of money when you file next year.
Instead – take a loan from your 401k. To start with, you’ll get more money that way. You’ll also not lose future capital gains, which you would if you withdraw.
You can take a loan for up to 50% of your 401k. Take a residential loan and NOT a general loan. General loans must be repaid within 5 years, while residential loans can be paid over 20 years. You MUST take the loan BEFORE the closing date on your contract, but you can use it for other costs as well like moving, new furniture etc. There should be no penalty for paying back early, but you’ll need to make sure of it.
You can request a residential loan over the phone or directly thru your online account. They’ll send you a promissory note in the mail, which you’ll need to sign and post back with a copy of your signed purchase and sales agreement. Approvals typically take a week.
Good luck.