most of the time it's 3 years...there are exceptions....
The length of time you should keep a document depends on the action, expense, or event which the document records. Generally, you must keep your records that support an item of income, deduction or credit shown on your tax return until the period of limitations for that tax return runs out.

The period of limitations is the period of time in which you can amend your tax return to claim a credit or refund, or the IRS can assess additional tax. The information below reflects the periods of limitations that apply to income tax returns. Unless otherwise stated, the years refer to the period after the return was filed. Returns filed before the due date are treated as filed on the due date.

Note: Keep copies of your filed tax returns. They help in preparing future tax returns and making computations if you file an amended return.

Period of Limitations that apply to income tax returns

  1. Keep records for 3 years if situations (4), (5), and (6) below do not apply to you.
  2. Keep records for 3 years from the date you filed your original return or 2 years from the date you paid the tax, whichever is later, if you file a claim for credit or refund after you file your return.
  3. Keep records for 7 years if you file a claim for a loss from worthless securities or bad debt deduction.
  4. Keep records for 6 years if you do not report income that you should report, and it is more than 25% of the gross income shown on your return.
  5. Keep records indefinitely if you do not file a return.
  6. Keep records indefinitely if you file a fraudulent return.
  7. Keep employment tax records for at least 4 years after the date that the tax becomes due or is paid, whichever is later.

The following questions should be applied to each record as you decide whether to keep a document or throw it away.

Are the records connected to property?

Generally, keep records relating to property until the period of limitations expires for the year in which you dispose of the property. You must keep these records to figure any depreciation, amortization, or depletion deduction and to figure the gain or loss when you sell or otherwise dispose of the property.

If you received property in a nontaxable exchange, your basis in that property is the same as the basis of the property you gave up, increased by any money you paid. You must keep the records on the old property, as well as on the new property, until the period of limitations expires for the year in which you dispose of the new property.

What should I do with my records for nontax purposes?

When your records are no longer needed for tax purposes, do not discard them until you check to see if you have to keep them longer for other purposes. For example, your insurance company or creditors may require you to keep them longer than the IRS does.

This is from the IRS https://www.irs.gov/businesses/small-businesses-self-employed/how-long-should-i-keep-records