If you have maxed out your IRA contribution for 2017 already (and it all went into your Roth IRA), then, until the 2017 Tax Day in April 2018, you can remove any part of this contribution (and the earnings therefrom) from your Roth IRA without any tax consequences or penalties. If you discover in early 2018 that you are not eligible (or only partially eligible) to contribute to a Roth IRA, then of course you must remove all (or part) of your 2017 contributions (and the earnings therefrom) from your Roth IRA by the 2017 Tax Day in April 2018. Indeed, if you have filed for an extension of time to submit your 2017 tax return, then you have until the extended due date to make the withdrawal. As NathanL's answer points out, for 2017, you and withdraw and re-contribute "as many times as you like" though if you push this idea to excess with the same IRA custodian, the custodian may start charging fees. Note that IRS
Publication 590b says in the Roth IRA section,
Withdrawals of contributions by due date.
If you withdraw contributions (including any net earnings on the contributions) by the due date of your return for the year in which you made the contribution, the contributions are treated as if you never made them. If you have an extension of time to file your return, you can withdraw the contributions and earnings by the extended due date. The withdrawal of contributions is tax free, but you must include the earnings on the contributions in income for the year in which you made the contributions.
Now, if in the middle of all these transactions, you need to take a
distribution from your Roth IRA during 2017 (say because you have a
cash flow problem), then it makes a lot of sense to first withdraw all your 2017 contributions and the earnings therefrom. If more money is needed, than you can take a distribution from your Roth IRA. What the
distribution consists of is described in great detail in
Publication 590b and you might have to pay a tax penalty for a
premature distribution depending on how much the distribution is.
(The first dollars coming are assumed to be previous contributions in the order in which you made them and these are tax-free and penalty-free; after that the rollover and conversion amounts start to come out and are penalized if they have not spent 5 years in the IRA etc) But you can put the money back into your
Roth IRA within 60 days and avoid penalties.
Important Notes regarding rollover transactions:
- Note that the putback does not
have to be into the same IRA account (same custodian); you can put the money
into a different Roth IRA with a different custodian.
- Note carefully you have 60 days (not two months, there's a difference) to complete this maneuver and that postmarks don't count: the money must be deposited into the account, not just received by the custodian. Also, the 60-day clock starts on the day that the distribution was made by the IRA custodian and not the day you received the money.
- Note also that you can do these rollover transactions (the technical
term is rollover, not re-contribution as NathanL calls it) regardless of whether you going to be eligible to
make a 2017 Roth IRA contribution or not.
- But, only one such rollover (where you received money from the Roth IRA and put it back) is permitted
in one year.
- On the other hand, trustee-to-trustee transfers (where
you don't get to touch the money at all) can be done as many times in a year as you wish.