Buying a home is a convoluted process. Beyond the research needed to find a property that meets needs and preferences, there are a number of factors that can make or break the sale during the mortgage phase.

Because home loans can be for amounts of hundreds of thousands of dollars, the rate, down payment and lender a borrower works with can make a big difference in terms of short- and long-term affordability.

To keep the dream home within reach, buyers need to enter the mortgage process aware of what’s at stake. Here are the initial steps all buyers should take when financing their homes.

Step 1. Determine How Much You Can Afford

First off, you’ll have to determine how much you can reasonably spend. Typically, lenders can approve you for a loan with a monthly payment of up to 28% of your gross monthly income. However, this might not be in your best interest.

Before applying for a mortgage quote, determine how much you can afford by creating a budget of your monthly expenses. According to the 50-30-20 rule, you shouldn’t be allocating more than 50% of your budget to necessities (food, shelter, transportation), so make sure a new home payment doesn’t prevent you from meeting other needs or financial goals, like paying off debt or saving for retirement.

As you review your income, expenses and financial goals, you’ll be able to determine a reasonable monthly payment. To get this desired payment, you might need to work to pay down debt to improve your credit score and debt-to-income ratio. The better your credit score, the lower your rate will be.

Even a small decrease in your rate can save you thousands of dollars, given loan values. The map below shows average mortgage debt balances across the U.S. in 2013.

Mortgage Debt Balance Per Capita in the United States | FindTheData

Taking the median home price in January 2015 of $188,900, a rate of 3.75% would cost $126,037 in interest payments over a 30-year mortgage. The monthly payment would be $875.

In comparison, a rate of 3.00% would cost a homeowner $97,808 over a 30-year term. The monthly payment drops to $796. That’s a difference in interest of $28,229 paid to own the same property.

Step 2. Compare Mortgage Rates and Terms

Once you’ve decided on what you can afford, the next step is applying for preapproval. This should be done before you begin house hunting to ensure you can afford the homes you are viewing. Some realtors might not even take the time to show you homes unless you’ve been approved for a loan.

Before applying for a preapproval, get as many quotes as you can. There are likely several local and national mortgage lenders in your area, and each is likely to offer different rates and mortgage terms.

However, the rate is not the most important thing to consider. Other costs, including broker fees, application and processing fees, appraisal, and prepayment penalties, all vary by lender and can add significantly to the overall cost of the mortgage.

Borrowers also have options when it comes to the loan term and type. Popular term options include 15- and 30-year durations, and borrowers also have the choice of fixed- versus adjustable-rate loans. However, one loan type is likely best for you.

For instance, 15-year terms allow borrowers to pay down their debt faster but at a higher monthly payment. Adjustable-rate mortgages might allow for a lower initial rate but are subject to change, making it difficult to plan for in a budget. Home buyers should compare their short- and long-term costs, as well as available rates before settling on any one loan offer.

Step 3. Choose a Lender or Broker

In addition to considering the costs of your mortgage, it’s important to work with a mortgage lender or broker you can trust. Lenders, such as Bank of America and Wells Fargo, create the loans and deal with borrowers through loan officers in their retail branches or through a broker. When reviewing different lenders, inquire about things that are important to you, including fees, customer service, and overall reputation.

A broker, on the other hand, is an institution that can provide you with loan information from multiple lenders. There are two important things to understand when working with a broker. First, brokers do not have access to special deals not available to the public. They simply have the resources to assist customers in what could be a time-consuming process. Second, brokers receive their profits from the lenders rather than the borrowers. Thus they are not obligated to present the best deal to the customer.

To make sure you are getting the best deal, you should take the time to shop other lenders to help you judge whether the lender the broker chooses is actually in your best interest.

At the end of the day, obtaining a home mortgage is likely the biggest financial decision you’ll ever make. As such, learning the process and understanding how to find the most suitable loan for your needs can save you thousands of dollars throughout the life of your loan.

Consider Your Mortgage Options on Credio