Gen X is cranking up its savings as the prospect of retirement draws closer.

In the second quarter, Americans between the ages of 44 and 59 ramped up IRA contributions to the highest in five years, according to a Fidelity Investments report released Wednesday. Total IRA contributions for Gen X savers were up 30% from a year ago.

The rise is notable given the competing claims on Gen X cash flows. Many have children in college, aging parents and higher health care costs but are still managing to prioritize retirement saving, Fidelity Wealth President Roger Stiles said in a statement.

Still, the cohort has a long way to go. A recent Charles Schwab survey showed Gen X believes an average net worth of $873,000 is required to be financially comfortable. The average balance for a Gen Xer with a 401(k) at Fidelity was  $182,100 in the second quarter. The average Gen X IRA stood at $97,215.

Meanwhile, the universe of 401(k) millionaires with accounts at Fidelity rose to 497,000, a 2.5% gain over the first quarter. That’s a new high.

Contributions combined with market gains led to a third consecutive quarter of growth in accounts. The average 401(k) balance rose to $127,100, and the average IRA balance was $129,200. But the gains were minimal, coming in at 1% since March 31.

More savers are taking out loans from their 401(k)s, too. The percentage of workers with a loan outstanding in the second quarter stood at 18.3%. That’s up from the first quarter, but below the pre-pandemic level of 20.1%, Fidelity said.

Fidelity’s analysis covered more than 48 million IRA, 401(k) and 403(b) retirement accounts as of June 30. 

This article was provided by Bloomberg News.