Should you choose a 529 plan or an ESA? A variety of factors, including flexibility and control, can inform the decision.

A friend recently posed a question. She wanted to start setting money aside for her sons’ schooling and wondered whether she should put funds in an ESA or a 529 plan.

While I was familiar with 529 plans, this was the first I’d heard of an ESA, or Education Savings Account. I’d set up a 529 account for my infant son late last year with an eye toward supporting his college expenses down the road. And while I’m known for my exhaustive research when it comes to things such as shopping, travel and selecting a physician, when it came to this particular decision, I’d acted fairly quickly, opting for Ohio’s 529 plan, CollegeAdvantage. The plan seemed reliable, and I appreciated that Ugift made it easy for family members to contribute to the account via a simple link.

But my friend’s query piqued my interest. Just what is the difference between a 529 and an ESA? And why might a parent choose one over the other?

As always, talk to an investment professional before you make any big financial decisions, but before you dive in, here’s a primer:

ESA Basics

Like a 529 account, an ESA offers tax-deferred and (federal) tax-free withdrawals when funds are spent on qualified expenses. And as with a 529 plan, an ESA isn’t just for college: The money can be used to pay for elementary and secondary school costs, on items such as tuition, room and board, books, equipment, supplies and fees.

An ESA provides more flexibility and control over your investments. These accounts allow parents to tap into more options, such as stocks, bonds and mutual funds. You also can move investments around within the account whenever you want. Not so with a 529 plan.

But there are drawbacks. Contributions to ESAs are capped at $2,000 per student per calendar year (compared with 529 plans, which don’t have a limit). There are eligibility restrictions, too. For instance, if you’re a single taxpayer making more than $110,000 or a married taxpayer filing jointly with an income of more than $220,000, you cannot contribute to an ESA—at least not directly. Instead, you first have to gift the money to your child and have the contribution come from him or her.

There’s a ticking clock on an ESA, too. Contributions must be made before your beneficiary turns 18, and they must be used by the time he or she turns 30—or given to another family member—to avoid taxes and penalties.

And unlike a 529, funds paid into an ESA can’t return to you: Distributions are always paid back to the beneficiary.

529 Plans

A 529 plan, so named after section 529 of the IRS code, is another tax-advantaged way to save for grades K-12 and higher education expenses.

Different states have different 529s, and you don’t have to reside in a particular state to enroll in its plan. We’ll focus here on CollegeAdvantage, which is Ohio’s offering.

Parents can make annual contributions of up to $15,000 per individual or $30,000 as a married couple into each child’s 529 plan without triggering a federal gift tax, according to CollegeAdvantage. Should you suddenly become flush with a lot of cash, or want to take advantage of tax-free compounding right away, single filers can make a one-time contribution of $75,000 (double that for a married couple).

As an Ohio resident, you not only see a federal tax benefit with CollegeAdvantage, but also a state tax benefit. You pay no taxes on the increased account value, and withdrawals used for qualified expenses are exempt from state and federal income taxes.

If you’re an investment control freak, a 529 may not be the plan for you. Investors are limited in their choice of portfolios, and they can only reallocate funds within a portfolio twice a year.

CollegeAdvantage account holders can choose from investment options managed by Vanguard, Dimensional and Fifth Third, including choices based on a child’s age and desired risk level. There’s no enrollment or annual fee to participate in the CollegeAdvantage Direct Plan, which offers ready-made vs. custom portfolios.

Age is another advantage of a 529 over an ESA, because there’s no mandated time frame in which funds must be used. So if your child waits until age 32 to go to college or vocational school, he or she still can use money from a 529.

For now, at least, my husband and I are sticking with the CollegeAdvantage plan. Although I can only imagine what college will cost by the time our son turns 18, knowing that we may be able to broaden his options for secondary education—and relieve him of at least some of the burden of student loan debt—is as much a gift to ourselves as it is to him.

Jennifer Wray is a freelance writer, mother and fan of all things pop culture.