Before they decide on the terms of your mortgage loan, lenders want to discover two things about you: whether you can pay back the loan, and if you will pay it back. To assess your ability to pay back the loan, they assess your income and debt ratio. To assess how willing you are to repay, they use your credit score.
The most widely used credit scores are FICO scores, which were developed by Fair Isaac & Company, Inc. The FICO score ranges from 350 (very high risk) to 850 (low risk). You can find out more about FICO here.
Your credit score is a result of your repayment history. They never take into account your income, savings, amount of down payment, or factors like gender, race, nationality, or marital status.
Fair Isaac invented FICO specifically to exclude demographic factors. Credit scoring was envisioned as a way to assess a borrower's willingness to repay the loan while specifically excluding any other demographic factors.
Delinquencies, derogatory payment behavior, current debt level, length of credit history, types of credit, and the number of inquiries are all calculated into credit scores. Your score is calculated from both the good and the bad of your credit report. Late payments count against you, but a consistent record of paying on time will improve it.
Your credit report should contain at least one account which has been open for six months or more, and at least one account that has been updated in the past six months for you to get a credit score. This history ensures that there is sufficient information in your credit to build an accurate score.
Some folks don't have a long enough credit history to get a credit score. They may need to spend a little time building a credit history before they apply for a loan.