Your credit score, debts, loan-to-value ratio and economic factors all play a role in determining your mortgage rate.
Your credit score is one of the first things mortgage lenders will look at. You usually need a credit score of at least 740 to secure the lowest mortgage rates out there. Lenders will also scrutinize your debts and monthly expenses to make sure you can afford to pay your mortgage every month. If you can, it's a good idea to pay down any high-interest debt, like credit cards, before applying for a home loan. Doing so will make you a more attractive candidate to banks.
Another factor that helps determine your mortgage rate is your loan-to-value ratio -- which is calculated by dividing how much of the loan you still need to pay off by your home's value.
In addition, 30-year mortgage rates are also determined by a number of economic factors such as Federal Reserve policy and whether it raises interest rates, as well as the influence of inflation and how competitive the job market is, which are largely out of homebuyers' control.
With this in mind, the best way to find a low rate is to shop around with different mortgage lenders and see who offers you the best rate. You should talk to at least two or three lenders before making a decision. With the proliferation of online lending, you have more options than ever to compare rates and find a lender you feel comfortable with.