A Roth IRA is a retirement investment account that comes with big tax breaks. You're allowed to withdraw money from your Roth IRA without paying the government any taxes on qualified distributions. This means if you invest money into your IRA and your investments earn a profit, you won't pay taxes on your gains. 

However, the tax benefits of Roth IRAs do not come without caveats. For starters, you can't withdraw more than the amount you've contributed until you reach age 59-1/2, unless you want to pay taxes and penalties (though there are a few exceptions). There's also a lesser-known rule that, if broken, could cost you much of the tax savings a Roth IRA offers: the five-year rule. 

Individual Retirement Accounts

Image Source: Getty Images.

What is the five-year rule?

According to IRS rules, you are allowed to withdraw money you contributed to a Roth IRA at any time with no taxes being assessed. If you contributed $5,000 to a Roth IRA, you can take the $5,000 out at any time without worrying about triggering a tax obligation to the IRS. However, withdrawing any investment gains could mean getting a tax bill unless your distribution from your Roth IRA is considered "qualified."

In order for a distribution to be qualified, among other things, you must make the withdrawal from your Roth IRA account at least five years after you began making contributions to your Roth IRA.

If you take money out before five years have passed, your distribution will not be considered qualified, so you'll be taxed on your investment gains. You could also be required to pay a 10% early withdrawal penalty. The taxes and penalty combined could substantially reduce the value of your investments.  

When does the five-year period start?

The five-year countdown will begin on the first day of the first taxable year in which a contribution was made to your Roth IRA.

It does not matter how late in the year you actually make the contribution. In fact, you are allowed to make contributions to a Roth IRA up until tax day for the year in which you're making the contribution -- which means if you want to make a contribution to your Roth IRA in 2017, you have until April 17, 2018. If you made your contribution on April 16, 2018, your clock would begin to run on Jan. 1, 2017 and your five-year requirement would be met in 2022.

Are there any exceptions to the five year rule?

There are exceptions to the five-year rule. You're permitted to withdraw, without penalty or tax consequences, up to $10,000 from your Roth IRA over the course of your lifetime to make a qualifying first-time home purchase. You are also permitted to make tax-free withdrawals if you become disabled. Not only is the five-year requirement waived under these circumstances, but you also do not have to be 59-1/2 to take money out for these reasons. There are also special rules for withdrawals if you inherit a Roth IRA from someone else. 

If you're considering withdrawing funds from your Roth IRA and it has been less than five years, make sure you fall within an exception or at least understand the extent of the taxes and penalties you could end up paying. Of course, even if you can withdraw the money, this doesn't necessarily mean you should. Leaving your investments to grow in a Roth IRA over your lifetime can provide you with a source of tax-free income during your golden years, when you need the cash the most. 

The Motley Fool has a disclosure policy.