A foreclosure can lower your credit score by as much as 240 points, and it stays on your credit report for seven years. How much a bankruptcy affects your credit score depends on your score before the bankruptcy, which may remain on your credit report for 10 years. The higher your score, the more drastically it will be affected.