Retirement account balances are soaring, but there are signs that savers are still being too complacent.

According to Boston-based Fidelity Investments, the average balances in 401(k) plans and IRAs reached record levels during the second quarter of 2017.

In Fidelity’s most recent quarterly analysis of its retirement accounts, the average balance in 401(k) accounts grew to $97,700 in the second quarter from $95,500 in the first quarter, a 2.3 percent increase. Year over year, 401(k) account balances have grown by an average of $8,600, a 9.7 percent increase from their second quarter 2016 total of $89,100. Over the past five years, the average 401(k) account balance has grown by 33 percent.

In IRAs, the average balance grew from $98,100 in the first quarter of 2017 to $100,200 in the second quarter, a $2,100 or 2.1 percent increase. Year over year, the average IRA has grown 11.8 percent from an $89,600 June 30, 2016, balance. Over five years, the average IRA balance has grown by 37 percent.

Yet employees are missing an opportunity to save more; according to Fidelity, 21 percent of workers weren’t contributing enough to their retirement plans to take full advantage of their employers’ matching contributions.

Over the past year, employees have contributed a record average of $5,850 to their 401(k) plans, up 4 percent from the second quarter of 2016.

Workers may not be paying enough attention to their 401(k)s over time, according to the study. Two-fifths of those who manage their own 401(k) asset allocation had a stock allocation higher than Fidelity recommends. Fidelity posits that the recent bull market, which has lasted several years, has distorted many 401(k) portfolios to have higher equity weightings.

Fidelity found that average account balances mushroom for long-term savers. People who have been in their 401(k) for 10 years straight saw their account balances increase to an average of $266,100, up from $78,800 in the second quarter of 2007, a 238 percent increase. According to Fidelity, 53 percent of the growth was due to market action, with the remainder coming from employee contributions.

Small businesses represent one of the fastest growing segments of retirement accounts. Fidelity found that the average account balances in 401(k)s for the self-employed, SEP IRAs and SIMPLE IRAs, have increased by double-digit percentages since the second quarter of 2016.