Contributing to an IRA can be a great way to increase retirement savings, due to the special tax advantages these accounts offer. But the IRS isn’t prone to offering free-for-alls; IRAs have limits for how much an individual can contribute during a given calendar year. For 2017, the maximum total contributions to traditional and Roth IRAs are limited to the lesser of: $5,500 ($6,500 if you’re age 50 or older), or your taxable compensation for the year. Note that this limit is subject to change every year, so for 2018, the limit could be higher, lower, or the same as 2017’s contribution limit.

So, what happens if you contribute in excess of the IRA contribution limit for the year?

Well—for starters, IRA providers, like Betterment, usually have systems in place to help you prevent over-contributing.

However, for various reasons, an individual may over-contribute to an IRA in any given year. The most common situation occurs when an investor has IRA accounts at multiple providers. For instance, if you’re trying Betterment for the first time, you might have one IRA in an online brokerage account that you manage yourself and another IRA with Betterment that you began mid-year. Because you’re working with two different companies, it’s not uncommon to unintentionally over-contribute.

Luckily, there are a few methods that can be used to correct this.

Methods to Correct Excess Contributions

There are four main methods for correcting an excess contribution. The first two can be done prior to the tax filing deadline, and latter two can only be completed after the tax deadline has passed.

1. Remove excess contributions prior to the tax filing deadline.

If you remove the excess contribution plus the net gain or loss prior to the tax filing deadline, you will not owe taxes on the excess contribution itself, but you will owe ordinary income tax, and if you’re under the age of 59 ½, you’ll owe the 10% early distribution penalty on the earnings. If you remove the amount after filing your taxes but prior to the deadline mentioned above, you typically need to go back and amend your return.

Recharacterizing an IRA contribution is the process of transferring the excess contribution from a Roth IRA to Traditional IRA or vice-versa, depending on your situation. The caveat here is that you cannot recharacterize more than the allowable maximum contribution. When you recharacterize, the contribution is deemed to have happened in the same tax year as the original contribution. You will still need to calculate the net gain or loss associated with the amount being recharacterized, and this amount will need to be recharacterized as well. Generally, there is no tax associated with a recharacterization.

3. Remove excess contributions after the tax filing deadline.

If you are removing the excess contribution after the tax filing deadline, you will be subject to a 6% excise tax for each year the excess contribution stays in the account. You do not need to calculate the earnings attributed to the excess contribution as you only remove the contribution itself. It is important to highlight that only a deductible Traditional IRA contribution and a Roth IRA contribution can be removed after the tax filing deadline, not a nondeductible Traditional IRA contribution.