You can take distributions from your individual retirement account whenever you want, but you'll owe extra tax penalties if you're not able to take a qualified withdrawal yet. However, if you realize you don't need the money and act quickly, you be able to avoid a permanent withdrawal -- along with any taxes and early withdrawal penalties -- by rolling the money back into your IRA.
Instead of having until the end of the year, you only have 60 days from the time you take the money out of the IRA to put it back in. Whether that 60 day period falls in the same calendar year or not doesn't matter. For example, if you take the distribution in February 2013 you have until April 2013 to redeposit it. However, if you took the distribution in December 2013, you have until February 2014.
Some distributions from your IRA can't be rolled over no matter how quickly you act. For example, if you have required minimum distributions, those aren't eligible to be put back. Plus, any withdrawals of excess contributions can't be redeposited. For example, say you took out $4,000 from your IRA to correct an excess contribution. No matter how quickly you act, you're not allowed to put the money back in the IRA.
Even though you're repaying the money back into the same IRA and won't owe the IRS any money, you still have to report it on your taxes. Plus, you can't use the short form, the 1040EZ. You must use either Form 1040A or Form 1040. On Form 1040A, the total distribution goes on line 11a and the amount you didn't roll over, if any, goes on line 11b. For Form 1040, the total distribution goes on line 15a and the amount you didn't roll over, if any, goes on line 15b.
After completing a rollover from or to an IRA, you have to wait at least 12 months before you can roll over another distribution from that same IRA. For example, if you start a rollover on February 1, 2013, you can't roll over any distribution from that same IRA before February 1, 2014. But, if you take a distribution from a different IRA, you can still roll over that withdrawal.