Sometimes in life, we run into situations where we need money and don't have an easy way of accessing it. So if you're sitting on a retirement plan like an IRA or 401(k) and have a pressing need for cash, you may be tempted to withdraw funds from your account or borrow money from it if possible. And that's precisely what 23% of U.S. adults with retirement plans admit to doing in a recent Ameriprise study. But you should know that taking this type of loan or premature withdrawal has consequences -- consequences that might come back to haunt you in retirement.

The dangers of removing funds from your retirement plan

The problem with taking an early retirement plan withdrawal is this: That money is supposed to be there to sustain you in retirement, so if you remove it now, it won't be there later. But think about your financial situation now versus later. Now is when you're still working and collecting a paycheck; later is when your options for earning an income will be limited. Therefore, it always pays to seek out alternative means of generating cash before tapping your IRA or 401(k).

For example, if you own a home, you might see about an equity loan or line of credit to gain access to cash. A personal loan from your bank will do the same trick. If you can find a generous family member who's willing to lend you some money, that works as well. And don't forget the age-old practice of selling things you technically don't need to drum up cash when you're stuck or getting a second job to generate more income.

Man covering his face

IMAGE SOURCE: GETTY IMAGES.

Remember, when you take out funds from your IRA or 401(k) prior to retirement, you're not just losing out on the principal amount you withdraw once you reach your golden years; you're also losing out on whatever growth that principal could've achieved. Let's say your savings manage to generate a 7% average return over time. If you take a $10,000 withdrawal at age 40 because you need the money and end up retiring at 67, you won't just be out $10,000 at that point --you'll be short $62,000, because that's what your $10,000 could've grown into over a 27-year period.

Another thing to consider is that in most cases, you'll face an early withdrawal penalty if you remove funds from a traditional IRA or 401(k) prior to age 59 1/2. That penalty will equal 10% of the amount you withdraw, which means that in the aforementioned example, you'd lose $1,000 right off that bat. Incidentally, you'll also pay taxes on your withdrawal, though that would also be the case if you were to take that distribution during retirement.

Now there are a few exceptions to this rule. If you have an IRA and pull out funds to pay for college (either for yourself or a child -- it doesn't matter), the 10% early withdrawal penalty is waived. The same holds true if you remove up to $10,000 to purchase a first-time home. But in most cases, you will be penalized for withdrawing funds prematurely, so doing so should truly be a last resort.

Finally, while taking out a 401(k) loan is a better option than taking an early withdrawal, remember that as long as that money is outside your account, it can't grow. And as we saw in the above example, losing out on that growth can be detrimental in the long run. Furthermore, if you separate from your employer while you're in the midst of paying back your 401(k) loan, you'll have to finish repaying it within 90 days or otherwise risk that nasty 10% early withdrawal penalty. Ouch.

Tempting as it may be to take cash that's technically yours, your best bet is to leave the money in your retirement plan alone and wait until -- you guessed it -- retirement to access it. That way, you don't come to regret your bad decision during the most financially vulnerable period of your life.