It might seem odd to open a retirement account for a high school student. But teenagers can get a big head start on long-term savings, financial advisers say, by stashing some of their earnings in a Roth individual retirement account.

Now is a good time to talk with teenagers about long-term savings using a Roth IRA because they may have earned money from summer jobs, said Patricia A. Seaman, a spokeswoman for the National Endowment for Financial Education, a financial literacy nonprofit.

Teenagers can benefit from tax-free growth of investments in a Roth account years before they have the opportunity to contribute to a workplace retirement plan. And five decades of growth allows plenty of time to ride out market swings.

"The earlier you start," Seaman said, "the more the time value of money works for you."

A Roth IRA for someone younger than 18 must be opened and managed by an adult custodian, like a parent or grandparent. The teenager must have earned income, whether from a formal job or from gigs like babysitting and lawn mowing. Children can contribute as much as $5,500.

Money in a Roth IRA grows tax-free. You can withdraw contributions at any time without paying a tax on it, but withdrawing investment earnings is more complicated. If you do so before you turn 59½, you may owe taxes and a penalty, although there is wiggle room in some cases.

A 16-year-old may be loath to save hard-earned cash for the distant future. But parents or grandparents can help by making all, or part, of the allowed contribution on the child's behalf; the money going into the account does not have to be the exact cash the teenager earns, said Ryan Bayonnet, a financial adviser in Akron, Ohio.

Or parents may "match" their teenager's contributions, putting in, say, $2 for every $1 that the teenager deposits, an approach favored by some financial experts. So if your child contributes $100, you contribute $200. Even small amounts can grow to substantial sums because of a young earner's long retirement horizon.

Advisers recommend looking for a Roth account offering low account minimums and low-fee investment options. Charles Schwab's minimum to open a custodial IRA is $100. Fidelity Investments, which began offering a product called "Roth IRAs for Kids" in 2016, has no minimum to establish the accounts, and recently began offering zero-fee investment options. Fidelity said that average balances in the accounts had grown to about $3,800 from more than $2,600 in early 2016.

Most teenagers are not likely to have $5,500 in annual earnings, but it still pays to start early. Fidelity calculated that someone contributing the maximum amount annually at age 15 would have more than $2.4 million at age 65, assuming an annual return rate of 7 percent.

Seaman said she opened Roth IRAs for her two daughters as soon as they had their first W-2 income, and insisted that they contribute 15 percent of their earnings. "I threw my parental weight around and said, 'You need to do this,' " she said. She did not spend a lot of time preaching the tax advantages, she said; rather, her goal was to establish a savings habit. Her message to her children: "It's part of taking care of yourself, and creating financial freedom in the future."

Ann Carrns writes for the New York Times.