Sixty-two percent of the 23 million 401(k) retirement accounts examined by researchers had money in stocks last year, and 40% had at least four-fifths of their money in stocks.

That's the upshot of a new study that says Americans still have faith in the stock market's long-term potential even though they have reduced their equity investments in recent years.

The study analyzed more than 23 million 401(k) retirement accounts nationwide. It was done by the Investment Company Institute, a mutual-fund trade group, and the Employee Benefit Research Institute, a research organization.

The study showed that 62% of 401(k) participants had money in stocks (defined as either stock mutual funds or company stock) last year.

Four in 10 people had more than 80% of their 401(k) money in stocks. That's down from 54.1% a decade earlier, but it still represents a significant amount.

The percentage of 401(k) investors who are out of the market entirely dropped to 11.8% from 12.7%.

Heavy stock concentration declined markedly among older Americans. The percentage of sixtysomethings with at least four-fifths of their portfolios in equities declined to 21.4% last year from 39.7% in 2000.

But among twentysomethings, the percentage rose to 60.4% from 55.3%, according to the study.

Overall, the reduction in stock holdings illustrates the fear and frustration that many feel after a very disappointing decade. But the report nonetheless appears to undermine the notion that Americans are dumping stocks en masse.

In part, the study says, that's because of the popularity of so-called target-date funds, which automatically redistribute assets among stocks, bonds and other investments as participants get older.

"Growing use of target-date funds appears to be helping to keep younger 401(k) participants invested in balanced portfolios, with equity exposure to help their assets grow over the long term," said Sarah Holden, senior director of retirement and investor research at the Investment Company Institute. "While our surveys and others have shown that investors are less willing to take on stock market risk, 401(k) plan features are countering that trend for plan participants."

Still, the study underscored the economic hardships that many Americans are experiencing. In 2010, 21% of all 401(k) participants who were eligible to borrow money from their accounts had done so, the same as in 2009 and up 18% from 2008.