Given that the cost of college has risen consistently over the few past decades, it's not surprising to learn that the average federal student loan debt borrower today owes a whopping $37,338. If you want your child to avoid that fate, then you'll need to do the best job you can of saving for college. The more money you're able to sock away for your child's education, the less they'll need to borrow to fund their studies.

Now when it comes to college savings plans, you have choices. A taxable brokerage account gives you the most flexibility with your money. But you may want to consider a 529 plan instead. Not only do 529 plans give you some tax savings in the course of building a college fund, but thanks to a new rule, they can also serve as a retirement plan to some degree.

The upside of 529 plans

You don't get a federal tax break on the money you contribute to a 529 plan (though some states offer their own incentives). However, investment gains in a 529 plan can be taken tax-free. And withdrawals are tax-free provided that money is used to pay for qualified educational expenses.

A smiling person at a laptop.

Image source: Getty Images.

To be clear, 529 plans are no longer limited to college. You can use a 529 plan to pay for a private elementary or high school if you do choose. But if you're specifically trying to build a college fund, then you'll want to reserve that money and not take withdrawals for education along the way.

Now the downside of funding a 529 plan is that withdrawals for non-educational expenses are subject to taxes and a 10% penalty. That penalty only applies to the gains portion of your account, not your principal contributions, since those go in on an after-tax basis. But still, that 10% penalty is enough to deter some people from saving in a 529.

It's not always easy to estimate the cost of college ahead of time. And while it's easy to argue that having leftover money in a 529 plan after paying for college is a good problem to have, it's also, frankly, annoying to have to take a 10% penalty on your extra cash.

But a recent change to 529 plans does a nice job of minimizing that risk. Beginning next year, up to $35,000 of unused 529 plan funds can be rolled into a Roth IRA penalty-free. That $35,000 limit is per 529 plan beneficiary. And to do the Roth IRA penalty-free rollover, a beneficiary must have been designated at least 15 years prior.

But still, the option to roll up to $35,000 from a 529 plan into a Roth IRA eliminates a lot of risk. Now, you don't have to scramble to find a new beneficiary for your 529 plan if your child's college costs less than expected. You can simply use that money to help your child get a jump-start on retirement savings.

Even before this recent change, 529 plans were a solid option to consider for college savings. But in light of it, it's even more worthwhile to give a 529 plan a chance. Funding yours nicely could make it so your child is able to graduate from college without the burden of student loans.