I have been asking myself the same thing. This is an important question when trying to maintain a clean and organized filing system. I thought 7 years was the correct answer, but this is what the IRS says:
The IRS recommends taxpayers keep their returns and any supporting documentation forthree years after the date of filing; after that, the statute of limitations for an IRS audit expires.
If you’ve under-reported income by 25 percent, however, the IRS can go six years back, or seven if you claim a loss for bad debt or worthless securities.
If you don’t file, or if you file a fraudulent return, the IRS has no statute of limitations; so it may be best to keep your records indefinitely.
In order to comply with the IRS, while maintaining an organized office, I would recommend keeping the past 3 years onsite, and saving soft copies for ALL tax years.