When you apply for a mortgage, lenders will typically look at the last seven years of your credit history, which, in the U.S., is the lifespan of a bad credit mark.