A hardship withdrawal allows you to take money out of your 401(k) to meet an immediate and heavy financial need. Medical expenses for yourself, your spouse, or dependents are considered valid reasons for a hardship withdrawal. However, the amount you can withdraw is limited to the amount necessary to meet the need, plus any taxes or penalties.