The collapse of the stock market at the start of the pandemic proved too much for many American investors to handle, as 30% pulled their money out, according to research by real estate data company Clever.

But with the market turning around and vaccinations blunting the impact of the virus, 60% who took money out of the stock market now say they regret doing so, the research said.

The survey of 1,000 non-retired Americans, which was conducted at the end of April, also found that respondents who sold stocks took out an average of 43% of their stock market investments since the beginning of the pandemic.

Millennials (64%) and baby boomers (58%) had the greatest sense of regret, the research said. And the main reasons investors cited for cashing out stocks were to cope with short-term expenses and obtain cash for necessary expenses (46%); prepare accessible cash in case of emergency (40%); to make safer investments (35%); and to make riskier investments (35%).

Not only did Americans engage in panic selling, but they also dipped into their retirement savings to make ends meet. Thirty-five percent indicated that they took money out of their savings and spent 44% of those funds, which amounted to median spending of between $10,000 and $14,999, the research found. It noted that boomers spent slightly more at 46%.

Further, the data showed 38% of respondents spent between $10,000 and $24,999, and nearly 20%, mostly millennials, spent more than $25,000 from their retirement savings. Eleven percent spent $1,000 or less.

While the research found that 91% of Americans have some retirement savings, about $250,813 on average, boomers have some catching up to do. It showed that boomers only plan to amass $423,337, which is less than the recommended fund of about $465,000.

“Worse, with only an average of $296,064 saved, boomers face the difficult challenge of making up a $127,273 shortfall on average before they hit their typical retirement savings goal,” Clever said, adding that there is little time to make up the deficit, with the youngest boomers turning 55 this year.

Millennials and Gen Xers, on the other hand, are in much better shape, with Gen Xers expecting to save $776,434 by the time they retire, and millennials planning to save $901,542, or 113% more than boomers, the research said. This, Clever said, is a possible reflection of valid anxieties about inflated costs of living and the future.

In terms of what they believe their biggest source of retirement income will be, most (36%) said retirement account investments such as 40(k)s and Roth IRAs, followed by Social Security (19%) and pensions (11%). Other sources cited include stocks and other investments (8%), part-time wages (8%), real estate (5%), family support (4%) and non-SSI government assistance (4%).

Of note, the research said boomers (61%) are more likely to cite Social Security as their biggest stream of income in retirement, while millennials are more likely to cite Roth IRA or 401(k) as their biggest source of retirement income. This difference in views is attributed to Social Security projection that it will only be able to pay in full through 2037, before the oldest millennials quickly reach retirement, Clever said.