What constitutes a qualified educational expense? When that question relates to 529 savings plans, the answer may be broader than you think.

Although 529 accounts are often used to pay for children’s college tuition, those funds can also be used for a variety of qualified expenses. In fact, recent changes to federal law under the Tax Cuts and Jobs Act of 2017 have given investors additional options for how they can spend their 529 plan dollars.

Earnings in 529 plans aren’t taxed under the federal tax code, withdrawals for eligible expenses are tax-free and many states also allow 529 contributions to be deducted from state income taxes. Since the plans are state-sponsored, they differ from state to state with respect to investment options and other features.

Here are seven ways to put a 529 plan to use:

1. Use a 529 to pay for elementary and secondary school tuition.

Due to 2018 tax reforms, parents can use up to $10,000 saved in 529 accounts to pay tuition for children attending kindergarten through 12th grade.

Though the tax-free earnings on withdrawals used for such tuition expenses may not be very high – parents are likely to spend their 529 funds on K–12 tuition immediately, leaving little time for earnings growth – the state tax deduction benefits may be worthwhile. “Immediate state-level tax benefits are what will almost certainly draw more people who are paying private school tuition into 529 accounts. Any family paying private school tuition in a state offering 529 tax benefits would be foolish, financially speaking, not to make use of them,” experts at the Brookings Institution said in a recent report.

However, advisors and investors should do their homework before assuming that state-level tax benefits are guaranteed. According to Brookings, 16 states have argued that their 529 tax incentives do not apply to K–12 expenses or haven’t yet determined whether they do.

2. Roll 529 savings into an ABLE account to pay for disability expenses.

Achieving a Better Life Experience (ABLE) accounts were established in 2014 to allow people with disabilities and their families to save money for disability-related expenses. Earnings in ABLE accounts grow on a tax-deferred basis and can be withdrawn tax-free for eligible expenses such as housing, transportation and assistive technology. Like traditional 529 accounts, ABLE accounts can also be used to cover education expenses.

But sometimes parents who have started traditional 529 accounts for their children realize only later, after a child’s disability diagnosis that they would really benefit from an ABLE account. Fortunately, the Tax Cut and Jobs Act offers them some relief: 529 account holders can roll their funds into ABLE accounts — up to the annual contribution limit of $15,000 — until January 1, 2026. A 529 account can be rolled into an ABLE account for the same beneficiary or for a different beneficiary within the same family. For instance, a family may roll money from a 529 account benefiting one sibling into an ABLE account benefiting another sibling.

3. Use a 529 to pay for vocational school, community college, online courses and graduate programs.

Though many associate 529 plans with four-year colleges, they can be used to fund tuition and other educational expenses at a variety of post-secondary institutions and programs, including community colleges, trade and vocational schools, graduate schools and qualifying online course and degree programs. To determine whether a school or program is eligible for 529 spending, check with its admissions office or search the U.S. Department of Education’s accreditation database.

4. Technology and internet access can be 529 qualified expenses.

In the digital age, education and technology go hand in hand. Fortunately, 529 withdrawals can cover “the cost of the purchase of any computer technology, related equipment and/or related services such as Internet access,” according to the IRS. Such equipment includes printers, but not equipment that is intended mainly for entertainment purposes. Computer software used for educational purposes is also covered.

5. Prepare for a career change by creating a 529 for yourself.

529 plans aren’t just for kids and teens. Adults can set up 529s to cover their own educational expenses, which may prove especially handy to those pursuing a change of careers. Joe Hurley, the founder of Savingforcollege.com, used 529 funds to earn a horticulture certificate. Hurley, who began his career as an accountant, now runs a farm.

There are a couple of ways adults can take advantage of 529 plans. The most direct way is to open new accounts and designate themselves as the beneficiaries. Parents can also "take over" existing 529 plans that once benefited their children. For instance, if a child wins a scholarship and her college expenses prove lower than originally anticipated, a new beneficiary in her family — including her parent — can be designated for the account and use its excess funds without facing a tax penalty. Hurley paid for his horticulture courses with his children's leftover 529 funds.

6. A 529 can help you save during retirement.

401(k)s and IRAs are the most popular vehicles for retirement savings, but 529 plans can play a role, too — at least for seniors who would rather spend their golden years in a classroom than on the golf course. That's because 529 funds can be used to pay for college courses or continuing education classes at qualifying institutions. Here, once again, checking with an institution's admissions office or searching the Department of Education's database can help current and future retirees determine where they can spend their 529 funds.

7. 529 plan contributions are tax-advantaged gifts.

Whether it's for a birthday, a holiday or for no reason at all, relatives and friends can use 529 plans to give gifts to the children in their lives. Grandparents, aunts and uncles or anyone else wishing to help fund a child's education may contribute to an existing 529 account or open a new one and name the child as the beneficiary. In many states, those contributions can be deducted from state income taxes, although gift-givers should remember that gift taxes may apply to contributions exceeding the annual exclusion of $15,000 per recipient for 2018.

529 gifts, however, come with a special tax exemption: Individuals can frontload five years’ worth of contributions without paying gift taxes. That is, they may make the equivalent of five years of maximum contributions — 5 x $15,000, or $75,000 — in a single year. This might be an especially attractive option for those intent on minimizing future estate taxes or anyone contributing cash to a student who could use the funds right away.

Today, more than ever, 529 plans can help investors and their children achieve a range of educational and career goals. With the right planning and advice, Americans can save their money while enriching their minds.