Tapping an IRA before age 59½ to pay higher education costs is penalty-free. To qualify, the payout must cover costs paid in the year of the withdrawal. Payouts can be used to pay expenses for the IRA owner, spouse, child or grandchild. Note that even if the distribution is exempted from the 10% penalty, but income tax is due on the monies withdrawn.
Typically, early payouts from 401(k)s for education don’t get penalty-free treatment.
One taxpayer was lucky, as in this case where a 42-year-old woman left her job to go to college full-time. That same year, she took a $20,000 withdrawal from her 401(k) and used part of the funds to pay college costs. She owes income tax on the payout but escapes the 10% penalty on the portion spent for education. That’s because IRS conceded the issue, despite the language in the tax code limiting penalty relief for education to IRA payouts. I would expect that the balance was rolled into an IRA.
McCree, TC Memo. 2019-67