529 Withdrawal Calculator
A 529 college savings plan offers tax-free growth and tax-free withdrawals when used for qualified education expenses. But when you withdraw more than your qualified expenses, the excess earnings are taxed as ordinary income and hit with a 10% federal penalty. Understanding the tax treatment requires knowing the earnings ratio in your account and applying it to each withdrawal. This calculator determines the taxable and penalty amount for any non-qualified portion of a 529 distribution. Enter your total account balance, the total contributions (basis) in the account, the amount you plan to withdraw, and the qualified expenses it will cover. The calculator then prorates the earnings portion of the non-qualified withdrawal and estimates your federal income tax plus penalty exposure. State tax treatment varies and is not included here.
529 non-qualified withdrawal formula
Earnings Ratio = (Balance - Basis) / Balance
Earnings in Withdrawal = Withdrawal x Earnings Ratio
Non-Qualified Portion = Withdrawal - Qualified Expenses
Taxable Earnings = Non-Qualified Portion x Earnings Ratio
Federal Penalty = Taxable Earnings x 10%
Income Tax = Taxable Earnings x Marginal Rate
Total Cost = Income Tax + Federal Penalty
2024 updates to 529 rules
- SECURE 2.0 Act (2022): from 2024 you can roll up to $35,000 of unused 529 funds to a Roth IRA for the same beneficiary (15-year account rule applies).
- Rollovers count against the beneficiary's annual Roth IRA contribution limit and cannot exceed it.
- K-12 tuition withdrawals are capped at $10,000 per year per beneficiary; state tax treatment of K-12 withdrawals varies.
- Apprenticeship programs at IRS-approved providers qualify as education expenses.
- Student loan repayment: up to $10,000 lifetime per beneficiary (and sibling) can be withdrawn penalty-free.
529 withdrawals: frequently asked questions
What are qualified 529 plan expenses?
Qualified expenses include tuition and fees at eligible educational institutions, books, supplies, computers, internet access required for school, room and board (up to the school's cost of attendance allowance), and K-12 tuition up to $10,000 per year. Qualified expenses allow tax-free and penalty-free withdrawals of earnings.
What happens if I withdraw 529 funds for non-qualified expenses?
Non-qualified withdrawals of earnings are subject to ordinary income tax plus a 10% federal penalty on the earnings portion. Contributions (basis) are always returned tax-free and penalty-free. Only the earnings within the withdrawal are taxable, prorated by the ratio of earnings to total account balance.
Can I change the 529 beneficiary to avoid the penalty?
Yes. You can change the beneficiary to another qualifying family member (sibling, parent, cousin, etc.) without tax or penalty. You can also roll over up to $35,000 (lifetime limit) to a Roth IRA for the same beneficiary starting in 2024, subject to annual Roth contribution limits, if the account has been open at least 15 years.
How is the earnings portion of a 529 withdrawal calculated?
The earnings portion of each withdrawal equals the withdrawal amount multiplied by the ratio of total earnings to total account balance. For example, if your account has $80,000 in contributions and $20,000 in earnings (total $100,000), then 20% of any withdrawal is considered earnings. This ratio is tracked by your 529 plan administrator.
Are there exceptions to the 10% 529 penalty?
The 10% penalty does not apply if the beneficiary receives a scholarship or fellowship grant (up to the scholarship amount), attends a U.S. Military Academy, dies or becomes disabled, uses up to $10,000 for student loan repayment, or if the withdrawal is used for certain apprenticeship programs. Income tax on earnings still applies even when the penalty is waived.
Official sources
- IRS Publication 970: Tax Benefits for Education.
- IRS Topic No. 313: Qualified Tuition Programs (QTPs).
Reviewed by the CalculatorHub team, edited by James Graham, 14 June 2026. See our methodology.