The general rule for retaining federal tax records is three years. That's because the statute of limitations for the IRS to audit your tax return is typically three years. The statute of limitations starts on the later of 1) the due date for your tax return, or 2) the date on which you file your taxes.
However, there are many exceptions to this rule of thumb that require you to save financial documents longer. And some states have different records retention requirements. So, it's often prudent to keep most financial records longer than three years.