The Internal Revenue Service (IRS) term that you need to know is QEE, which stands for “qualified education expense.” Your 529 savings plan withdrawals will be free from federal tax as long as they’re used for QEEs, such as room and board, tuition, required books and supplies for higher education. There's also the option to pay for K-12 tuition (up to $10,000 a year per student). The cost of certain apprenticeship program expenses is another QEE.
You can even use 529 assets to pay for certain student loan expenses, up to a $10,000 lifetime maximum.
Using the money for nonqualified expenses could cost you federal and, if applicable, state income taxes in addition to a 10% federal tax penalty. So be sure to understand what counts as a qualified expense before deciding to spend the 529 savings plan funds on unapproved costs, such as student health fees or a plane ticket home at Thanksgiving.
States take different approaches to the income tax treatment of withdrawals. For example, withdrawals for K-12 expenses may not be exempt from state tax in certain states. Be sure to check with your tax advisor about state-specific tax benefits related to withdrawals.