Source: Flickr.

If you have money saved in a 401(k), IRA, or similar tax-advantaged retirement account, there's a rule that allows you to take your money out as long as you roll it over to another qualified plan within 60 days. Under this rule, you can essentially take an interest-free short-term loan from your retirement savings -- just make sure you put it back, or the consequences can be severe.

The 60-day rollover rule
In most cases, 401(k) and IRA accounts are rolled over by directly sending the funds from one institution to another. However, there is an IRS rule that allows you to withdraw the funds out of your qualified retirement account and complete the rollover yourself, as long as you do so within 60 days. You can roll over the money into a different retirement account, or simply put it right back where it came from -- there is nothing in the 60-day rule that says a rollover needs to end up in a different account.

This can be quite useful if you need a short-term loan. Let's say you want to put a down payment on a house now, and that you're $5,000 short but are expecting a tax refund within the next few weeks. Under the 60-day rollover rule, you can withdraw the money from your retirement account, use it for the down payment, and then put it back when your tax refund arrives. You'll pay no early-withdrawal penalties, nor will you have to pay any interest whatsoever.

Sounds pretty good, right? Just make sure you fully understand what you're getting into -- particularly the consequences for not rolling over the money within 60 days.

Interest-free loans are nice, but you'd better be careful
Before you run out and withdraw money from your 401(k), there are a few things to keep in mind.

First of all, the consequences for not completing the rollover within 60 days can be harsh. Specifically, on day 61, the entire amount is considered to be ordinary income for tax purposes, plus you'll be subject to a 10% early-withdrawal penalty if you're under 59 1/2 years old. So if you borrow $25,000 from your 401(k) and can't pay it back, you'll face a $2,500 penalty plus whatever marginal tax rate an additional $25,000 in taxable income will result in.

And you can only complete one IRA-to-IRA rollover per year, no matter how many IRAs you own. There are exceptions, such as rolling over from an IRA to an employer's retirement plan, but for our purposes it means that if you attempt to do a 60-day rollover from your IRA twice within a 12-month period, the second one is not protected by the 60-day rule.

Finally, there are tax considerations you should be aware of. With an IRA, your distribution is subject to 10% withholding from your financial institution unless you elect not to have any withholding, which you should do if you're planning on putting the money right back.

With a 401(k) or similar retirement plan, a distribution paid to you is subject to 20% mandatory withholding -- even if you're planning to roll over the money. So if you withdraw $10,000 from your 401(k), you'll receive only $8,000, with the IRS withholding the rest. You'll still need to redeposit the entire $10,000 within 60 days, so you'll have to come up with the difference to meet the rollover requirement. You'll get the withholding back when you file your next tax return, but it's important to expect this.

If you're unable to redeposit the money within 60 days, the IRS does allow you to apply for an extension of the rollover period. Just know that these are typically granted only in extreme circumstances such as death, disability, incarceration, or hospitalization -- not simply because you're having trouble coming up with the money.

The Foolish bottom line
While the 60-day rollover rule can be an effective way to cover a short-term financial need, it should be used only if you're absolutely certain you'll be able to redeposit the money within the required amount of time. If you aren't 100% sure, this can be a dangerous way to borrow money, and you'd probably be better off using a credit card or some other funding source. After all, paying a couple of months of credit card interest is far better than the taxes and penalties you'll face from a rollover loan gone wrong.

Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.