You deserve to have financial security in retirement. In order to make that happen for yourself, you're going to need an investment account that produces a good amount of income to add to your monthly Social Security checks. 

Unfortunately, over one-third of workers with retirement savings have made a dangerous choice that could jeopardize their ability to build the portfolio they need. Here's what these workers have done.

Two adults looking at financial paperwork.

Image source: Getty Images.

Millions of workers have made a dangerous mistake with their retirement savings

According to the Transamerica Center for Retirement Studies, 35% of all workers have taken a loan from a retirement plan or have taken an early withdrawal. Unfortunately, doing either can be a huge mistake -- although early withdrawals are worse. 

Taking money out of a retirement account before age 59 1/2 can trigger a 10% penalty in almost all cases, unless you fall within a limited hardship exemption. This means you are costing yourself a lot of cash that you worked hard to invest for your future if you remove money from your retirement account early.

Once that money has been taken out, you not only won't have those funds but you will miss out on the potential returns they could have earned over time. A $10,000 withdrawal taken 20 years before your retirement date could leave your account with $67,275 less than you would have had if you had left the money alone (assuming a 10% average rate of return). Your balance falls so dramatically because you don't just lose the money that you withdrew -- you also lose all the potential gains that money would have made over the years. 

Now, a loan is theoretically better than a withdrawal, but there are some issues with that as well. Most notably, if you don't pay it back on schedule, it could end up turning into a withdrawal. The money also won't be earning returns for you during the time it's taken out. You do pay yourself back with interest, but the rate is generally much lower than the ROI you could have if the money is left in your account. Also, if you have bad timing and borrow during a market downturn, you could end up selling investments at a low price, which would result in missing the rally and having to buy back in once the cost has gone much higher. 

What can you do instead of raiding your retirement accounts?

As you can see, taking money out of your retirement accounts is definitely not ideal and can have serious long-term financial consequences. You don't want to do it if you can find any other option.

The best solution would be saving up an emergency fund so you can cover unexpected costs without having to take money out of retirement savings. But if you're facing financial hardship without emergency savings, you may want to look into a 0% APR credit card offer or an affordable personal loan rather than putting your retirement security at risk.

While these options have downsides too, including the possibility of paying a high interest rate if you can't repay your balance before the 0% promotional rate ends on a credit card, at least you won't risk a 10% penalty and the loss of decades of returns your money could have been earning.