Americans are getting better at saving for retirement, but they still have a lot of room for improvement, according to a Fidelity Investments’ study released Tuesday.

The Retirement Savings Assessment also showed that younger savers are beginning to catch up to those nearer retirement in their preparedness level.

The average saver is on target to receive 80 percent of the income Fidelity estimates he or she will need to cover retirement costs, according to the study. When the study was first conducted in 2005, they were only on target to receive 62 percent of the needed income.

Half of the 3,100 people surveyed are at risk of not being able to fully cover essential expenses in retirement, according to Fidelity.

Breaking the findings down by generations, the average baby boomer is on target to meet 86 percent of retirement expenses; the average Gen Xer, age 35 to 52, is on target to meet 77 percent of expenses, and the average millennial moved up from 76 percent two years ago to 78 percent this year.

“Millennials are clearly putting money aside for retirement and taking more control of their personal situations,” said Ken Hevert, senior vice president of Retirement at Fidelity. “While younger generations typically don’t have jobs with access to pensions as a source of guaranteed retirement income, there are many actions that can be taken to improve retirement readiness, including saving more, managing debt and making smart investment decisions.”

Millennials are moving up in part because of the booming stock market returns, Fidelity said.

Investors have moved up the amount they are saving from the 3.6 percent of salary that was reported in 2006 to 8.8 percent today. However, that is still far short of the Fidelity’s suggested total savings rate of at least 15 percent of salary, including employer contributions.

The percentage of respondents who are allocating their assets in a manner Fidelity considers age appropriate held fairly steady at 55 percent, compared to 57 percent in 2016. This is aup from 2006 levels, when 48 percent allocated their assets in an age-appropriate manner, the study said. One reason is that more employees are now being automatically put in target date funds and managed accounts, Fidelity said.