After some serious thought, you’ve made the decision to end your stint as a renter and enter the wonderful world of homeownership. You can’t wait to hand over that last rent check as you scour Pinterest for living room décor ideas, but you’ve got a lot to learn about and do before you hit those exciting milestones. Like figure out what debt-to-income (DTI) ratio is all about and how it will affect your ability to fulfill your homeownership dreams.

Here’s the deal: when you apply for a mortgage, you’re asking to borrow money from a lender, and that lender wants to ensure you’ll be able to pay them back, which makes sense. Along with your credit score and salary, your debt-to-income ratio (DTI) is an important way lenders look at your ability to do so.

What is DTI?

Glad you asked. Your debt-to-income ratio is the total amount of your monthly debts divided by your gross monthly income. Simply put, lenders want to make sure you have enough money to cover your new mortgage payment after paying for things like student loans and other bills. And knowing your DTI helps you, too. Seeing the hard numbers can help you understand how much you can comfortably afford to spend on mortgage payments and still cover all your bills with enough left over to live a little.

How is DTI Calculated?

It’s a great idea to know where DTI sits before you apply for a mortgage. Fortunately, you don’t have to be a math whiz to calculate DTI—you just need to know what to include. First, add up your recurring monthly debt — things like your car payment, student loan payments and the minimum monthly payments on any credit cards you have. Don’t worry about expenses like cable, Netflix or your wireless bill.

Next, you’ll need to figure out how much your future monthly house payment could be. That includes the mortgage payment, property taxes, mortgage insurance and homeowner’s association (HOA) fees. So if you have a $300 car payment, $100 in minimum credit card payments and you estimate your new home will cost $1,500 a month, your debt total comes to $1,900.

As for income, we’re talking about gross monthly income. So if your annual salary is $60,000 that number would be $5,000. Remember, gross income refers to your salary before any taxes or other deductions are taken out.

The last step is easy. Just take that total debt number ($1,900) divided by your monthly income ($5,000) and you get 0.38, or a 38 percent DTI.

What DTI Should I Aim For?

Can you get a home with a 38 percent DTI? That depends on the type of loan you’re applying for. To be eligible for a qualified mortgage, or QM, your DTI has to be 43 percent or less, including your mortgage expenses. Therefore, in this case, the answer is yes. QMs were created by the Consumer Financial Protection Bureau to help make sure buyers like you are treated fairly. Your lender will have to make sure you can afford your payments and eventually be able to pay back the loan. Can you imagine being both rent-free and mortgage-free one day? When you borrow responsibly, it can happen.

How Can I Change My DTI?

Nobody’s perfect. If your DTI needs a little improvement to get a great mortgage, there’s plenty you can do to fix it. Think back to high school math. You can either lower the numerator (debt) or increase the denominator (income). It’s usually best to focus on lowering that debt. That means freeing up some cash flow each month to pay it down. It might be time to say goodbye to cable or that pricey gym membership that you never use—while this won’t lower your DTI directly, it could allow you to redirect your money to paying down debt.

And if you don’t have lots of places to cut down spending, there are a number of other ways to bring in extra dough. You could sell stuff online or score a side gig. A bonus to the extra gig is that it will raise your income too, which will help your DTI even more.

Another way you can reduce your debt is to consider a less expensive home. A place with good bones can be transformed into something great, especially if it’s in a desirable location. The important thing is that you’re comfortable with your purchase and your monthly payments. And even though your lender might want you to have a DTI of 43 percent, if you have a lot of expenses that weren’t included in the calculation (think: entertainment, yoga classes, etc.), you may want to give yourself more wiggle room so you can keep doing all of that fun stuff as a homeowner.