Your credit history can go as far as the length of your active credit lines. If you took a mortgage 20 year ago, it will be on your credit, and it will help you in a good way, provided you make payments on time.
This question is usually asked in reference to negative credit remarks or information. The negative information stays on your report, depending on the severity of the issue. For an instance, late payments stay on your report for 7 years whereas a completed Chapter 7 bankruptcy stays for 10 years. Each of these items including foreclosures, collections, and chapter 13 bankruptcies stay for 7 years.If you have some unpaid tax liens, they might appear indefinitely on your report.