You must keep your records for as long as they are important for the federal tax law.
Keep all records that support an item of income or a deduction appearing on a return until the statute of limitations for the return runs out. For assessment of tax you owe, this generally is 3 years from the date you filed the return. For filing a claim for credit or refund, this generally is 3 years from the date you filed the original return, or 2 years from the date you paid the tax, whichever is later. Returns filed before the due date are treated as filed on the due date.
If you did not report income that you should have reported on your return, and it is more than 25% of the income shown on the return, the statute of limitations does not run out until 6 years after you filed the return. If a return is false or fraudulent with intent to evade tax, or if no return is filed, an action can generally be brought at any time.
Keep in mind that you may need to keep records relating to the basis of property longer than the statute of limitations. Keep those records as long as they are important in figuring the basis of the original or replacement property.
For more information, please review IRS Publication 17.