Saving money in a 529 plan offers families a way to put cash away for college and save on taxes as well. But if your child is entering high school soon, it’s time to double-check the allocation of your investments.

Funds in state-sponsored 529 accounts, typically invested in mutual funds, grow tax-free. When you take the money out, funds aren’t taxed as long as the money is spent on eligible education costs, including tuition, room and board and books.

Investments in 529 plans generally have a shorter window of time to grow than money in a retirement account does. And once a child enters high school, college is just four years away. A steep drop in the market could leave you short of funds when your child heads to campus — so scaling back high-risk investments is often a good idea.

“If all your college money is in the 529,” said Kim Lankford, an editor at Kiplinger who writes about the plans, “you should be more conservative.”

To avoid that situation, most 529 plans offer age- and risk-based investment options, designed to automatically shift funds to more conservative investments as the child grows. Plans typically begin with a majority of funds in stocks, then shrink the allocation over time and add more bonds.

Still, some advisers suggest that families — even those using age-based portfolios — double-check the specifics of their 529 holdings as college nears. The mix of investments and the shift in allocation, sometimes called a glide path, vary greatly by plan.

“I’d want to look under the hood and make sure it makes sense for my particular circumstances,” said Scott Clemons, chief investment strategist with Brown Brothers Harriman.

P.J. Wallin, a financial planner in Virginia, said that while age-based portfolios shift more money into bonds over time, fixed income doesn’t always equal safe.

For instance, Wallin said, the 2021 age-based portfolio in Virginia’s 529 inVest plan now has 70 percent in fixed-income investments. But with about 36 percent in “stable market” bonds, the mix also includes 5 percent in high-yield bonds and 10 percent in emerging market bonds, he said, which may be riskier than some investors want with college four years away.

Wallin advises clients to move half of their holdings into a money-market fund within the 529 plan when the child enters high school, and even as early as the eighth grade. The point of a 529 plan, he noted, is that growth is tax-free — but it’s risky to seek a lot more growth during the high school years. “The last thing we want is to stretch for an extra $5,000 of appreciation,” he said, but lose 20 percent in a market downturn.

By moving to safety, families may miss out on market gains. Barry Korb, a financial adviser in Maryland, said a couple came to see him a year ago, having saved the equivalent of four years of college tuition in a 529 plan. The child was starting school in six months — and 90 percent of the money was in equities.

On Korb’s advice, they agreed to shift most of the funds to short-term fixed investments. Even though in retrospect the couple would have been fine if they had left the money in stock over the past year, Korb is firm that money needed within five years shouldn’t be in the market. “I do not regret my advice,” he said.

Ann Carrns writes for the New York Times.