No one can tell you the exact figure unless they know your tax rate. You will pay the minimum 10% penalty + income tax according to your tax bracket. We can;t know this without understanding your deductions, which I don't recommend posting online.
Assuming your taxable salary is $40K (after any pre-tax dedcutions such as 401k, medical costs, etc), and you only take the standard deductions (do not itemize) and your are single with no kids, then your deductions are $8200, which puts your taxable income at $31,800. This means you pay federal taxes of $4261. If you add $4K to your taxable income for the 401k distribution, your taxes jump to $5621 + $400 in penalties. This means your taxes increase $1760, or 44% of your 401k.
And this does not include state taxes and penalities.
There are three ways that the, money can be withdrawn:
1 - Your 401k provider cuts you a check for the entire amount, and then issues you a 1099 at tax time indicating how much you received in income. (very uncommon)
2 - Your 401k provider deducts the taxes upfront, which are usually taxed as "special compensation" which is usually a much higher tax rate than what you are actually paying. You will get less money upfront, but will likely get some back when you file your taxes.
3 - Your 401k provider transfers the money directly to another tax-deferred plan of your choice. You never see it. No taxes are withheld.
You have to talk to your 401k provider to see which options they offer.
I think this is a very bad idea.