There is no hard-and-fast rule about how long to keep tax records because the answer depends on a number of things: It depends on what type of record we are talking about. It also depends on your personal tax situation - are you aggressive on your return or are you conservative on your tax return? Maybe you fall somewhere in between.
Generally, one should keep their day-to-day tax records for at least 3 years. Day-to-day tax records include things like DMV vehicle registration, annual medical expenses, annual mortgage interest payments, W-2 and 1099 statements, etc.
However, a client should keep records related capital assets for the life of the asset. For example, if you own a home and make improvements to it, and have the house for 30 years before you sell it, you should keep records of the improvements, purchase agreement, closing agreement, for at least 33 years! That's right, you need to keep those records for the entire time you owned the home plus at least 3 years after you disposed of it.
Do you have a large net operating loss (NOL) that you have been carrying forward? You should keep the return which generated the NOL and every return you carried it forward through until you have exhausted the NOL and at least 3 years after. You should also keep records proving the loss amount just in case the last return in which you claimed the NOL gets audited and you have to back up the claimed NOL.
There are some more complicated rules that could apply if you take aggressive positions on your tax return. For example, the IRS can audit you up to 6 years after you filed your tax return if you failed to report 25% of your gross income, which would constitute a "gross omission." Also, if you are really aggressive the IRS could assert you committed fraud which would mean there is no time period limitation for the IRS audit your tax return. In which case the IRS could go back forever to audit your return.
Related: Heckman v. Commisioner: Tax Court holds failure to disclose ESOP on return justifies 6-year statute of limitations for IRS re-assessment.