You found your dream home, but can you safely afford it? Before you commit to the biggest financial decision of your life, consider the 28/36 rule.

The rule is used by lenders to determine what you can afford, according to Ramit Sethi, best-selling author of “I Will Teach You to Be Rich.”

“It’s used by lenders, but it’s also a really helpful tool for us as individuals to decide how much debt we can afford,” Sethi tells NBC News.

Ramit Sethi, author of "I Will Teach You to Be Rich" Peter Hurley

The rule is simple. When considering a mortgage, make sure your:

maximum household expenses won’t exceed 28 percent of your gross monthly income;

total household debt doesn’t exceed more than 36 percent of your gross monthly income (known as your debt-to-income ratio).

In other words, if your maximum household expenses and total household debt are at or lower than 28/36, you should be able to safely afford the home.

TOTAL HOUSEHOLD EXPENSES

When calculating your household expenses, Sethi says to consider everything your mortgage will include: the principal, interest, taxes, and insurance, or PITI.

In total, your PITI should be less than 28 percent of your gross monthly income, according to Sethi.

For example, if you make $3,500 a month, your monthly mortgage should be no higher than $980, which would be 28 percent of your gross monthly income.

TOTAL DEBT

To determine your debt-to-income, calculate:

Dollar amount of monthly debt you owe divided by dollar amount of your gross monthly income.

For example, if you have $1,000 of monthly debt and make $3,500 a month, then your debt-to-income ratio would be .28.

In the above two scenarios, your household expenses vs debt is 28/28. This puts your household expenses at 28 percent and your debt under 36, which means you can safely afford the home.

“If you’re within those parameters, it’s a good rule of thumb that you’re fine,” says Sethi.

But let’s say 50 percent of your gross monthly income is going towards your total debt. “It tells you you’re outside the parameters and that’s a big red flag,” explains Sethi.

Be conservative

Many people buy a house because they fall in love with certain features like the bathroom faucets or hardwood floods, says Sethi. But the author insists you must stay focused on costs.

“Buying a house is probably the biggest financial purchase of your life, and you should be very financially fluent when it comes to making a purchase of this size,” he says.

If you don’t truly understand what you can safely afford, he says, you may end up with a mortgage that will financially drain you. Many home buyers, he explains, get so excited about a house that they don’t think about how they might struggle to pay for it if they lose their job or come down with a major illness.

For that reason, he says to be conservative.

“Being conservative means you save up for a 20 percent down payment, being conservative means you take a straightforward 15 or 30-year loan, and it means that you calculate these basic numbers and know that you’re under the 28/36 rule very comfortably,” Sethi says.

What if you just don’t have enough for a down payment?

If you don’t have enough savings for a 20 percent down payment, then you need to keep saving, Sethi says. If you are struggling to save, he advises creating a sub-savings account.

A sub-savings account is an automated account that directly deposits small amounts from your paycheck into a savings account, so you don’t even have to think about it, he says.

“A lot of people say ‘Hey, I’m cut to the bone, I can’t really save,’” he says. “Well, it turns out when you automate this money you never even see it. It actually adds up pretty quick.”

And don’t underestimate the power of the side hustle, he says.

“A lot of times people underestimate the power of earning more through a side job, through a business, through negotiating your salary,” Sethi says.

“Don’t just give up,” Sethi added. “Start saving, pay off debt, and consider earning more. All three of those things will help you eventually buy a house if that’s what you choose to do.”

MORE FROM BETTER

Want more tips like these? NBC News BETTER is obsessed with finding easier, healthier and smarter ways to live. Sign up for our newsletter and follow us on Facebook, Twitter and Instagram.