Millennials are really good at saving money — especially if they have kids.
In fact, US millennial parents are on track to be richer in retirement than the typical Gen-Xer or baby boomer with kids.
That’s according to a new NerdWallet study, which found employed millennial parents (aged 18 to 34) are contributing a median of 10% of their income to retirement savings.
Generation X (aged 35 to 54) is saving 8% of their income and working baby boomers (55 and older) are socking away just 5%.
The study is based on a survey of more than 2,000 American adults, including 1,112 parents and 874 non-parents. Despite the added expense of a child, 84% of parents surveyed said they are contributing to retirement savings, compared to 69% of non-parents.
Still, among all parents, millennials are saving a greater percentage of their income. According to the report, over one-third of millennials are saving at least 15% of their income.
“Millennials are making really good decisions whenever they have an opportunity to save more,” Arielle O’Shea, retirement and investing specialist at NerdWallet, told Business Insider.
“Not just when they have a higher paying job, but they’re saving more after paying off debt and after getting married — those things are really notable,” she said.
Even if the dollar amount they are saving is smaller because they’re earning less money than older generations, millennials are still in good financial shape. The key to retiring rich is investing early and consistently.
“Millennials are doing themselves a big service here by saving so early and taking advantage of compound interest,” O’Shea said.
In the chart below, NerdWallet compared the retirement saving rates of millennials, Gen-Xers, and baby boomers. For the purpose of the analysis, all generations started saving at age 26 and retire at 67, earn an average annual return of 6% on investments, and receive a 2% annual salary increase.
At a starting salary of $40,000, a millennial who saves 10% of their income over the entirety of their career would end up with about $865,000 at retirement. By comparison, a person saving 5% of their income — the current savings rate of baby boomer parents — would net nearly half that by retirement, assuming their savings rate has always been 5%.
At a staring salary of $100,000, the difference in retirement savings for millennial and baby boomer parents jumps to more than $1 million.
It’s possible older Americans aren’t saving as much because the cost of raising kids increases the older they get, O’Shea said, especially when parents “start feeling the crunch of college.”
Obviously this can hurt your retirement savings, as most financial experts recommend gradually increasing your savings rate the closer you get to retirement. Incrementally increasing your savings will help your account balances grow, but it does something else that’s even more valuable: It creates momentum. Once you start saving, it’s easier to keep going.
According to the study, millennial parents are most likely to report having made sacrifices to increase their savings, including cutting back in big spending areas such as dining out, vacations, and entertainment.
“Everyone can use strategies millennial parents are using,” O’Shea said. “Save more when you get a raise, when you pay off debt, or cut back on dining.”
Some millennials, however, may not be saving for retirement intentionally. Instead, they’re starting new jobs that auto-enroll them in their employer’s 401(k) plan, and many don’t bother to opt out.
That’s great for some people, O’Shea said, but “knowing how much you need to be saving is huge, and working toward a goal makes all the difference.”
If you’re unsure how much you should be saving for your ideal retirement, you can start with a simple calculation. Take your desired annual retirement income, and divide it by 4% (the maximum amount you will withdraw from your savings each year to pay for your living expenses in retirement).
Once you know your magic number, you can leave work as soon as you reach it.
This article originally appeared in Business Insider.