With home prices in Los Angeles about as high as they’ve ever been and rents hovering at levels many residents can’t afford, Angelenos wondering whether to rent or buy aren’t faced with an easy choice.

Each option comes with its own advantages and disadvantages, and one—buying—requires a financial commitment quite a few people are simply unable to make.

Assuming you’ve got some savings lying around, which option makes the most sense from a financial perspective?

“There’s no right or wrong answer,” says Eric Sussman, adjunct professor of real estate and accounting at UCLA. “But you’d better be thoughtful about it.”

Tools from Zillow and the New York Times offer some guidance on this question. The Zillow calculator determines the break-even point, when buying a house becomes cheaper than renting due to equity gained by the homeowner since the purchase.

More simply put, as you pay off more of your home, you have access to more of its total value when you decide to sell. Assuming rent and mortgage payments are equal, then buying will save you money if the amount you end up with when selling is more than you would have been able to make by putting your down payment into an investment fund and continuing to write checks to your landlord each month.

Zillow’s calculator suggests that if you were to buy a median-priced home in Los Angeles County (around $638,000, according to real estate data tracker PropertyShark), rather than pay for a $2,000-per-month apartment, it would take about six years to hit the break-even point when buying pays off over renting. But buying a pricier residence or signing a cheaper lease can change the calculation dramatically.

Under the same scenario, it takes less than three years to break even if your monthly rental payments are $3,000. On the other hand, if your choice is a $638,000 home or a $1,500-per-month apartment, buying will never be cheaper than renting.

Of course, these examples assume the value of the home you buy goes up 5 percent each year—plausible but by no means certain. They also take for granted that buyers are ready to make a 20 percent down payment. For a $638,000 home, that’s more than $120,000.

“How many people have $120,000 lying around?” Sussman asks. That’s one reason why he says the question of whether it’s better to buy or rent depends on a host of other factors, including how much buyers have saved up and whether they are willing to make such a large financial commitment.

It is possible to get a mortgage without putting 20 percent down, but a lower down payment generally means higher monthly costs. That’s because most banks will require you to pay for private mortgage insurance until you build up to 20 percent equity in your home. Like rental payments, those costs do not add to the equity you have in your home.

A low down payment can also impact the financial viability of a purchase, since buyers have less equity from the get-go. With a 5 or 10 percent down payment, a drop in home prices is more likely to leave homeowners stuck owing as much or more than their house is worth.

“It doesn’t take a lot to put a hole in your balloon,” Sussman says.

For some people, the chance to buy with lower up-front costs might be worth the risk, especially if they’re already stuck with high rental payments. The New York Times calculator helps to assess whether your rent is pricy enough that it makes more sense to buy.

Assuming that you plan to stay for at least five years, the calculator finds that buying a median-priced home in Los Angeles is the way to go if you’d be paying more than $2,559 in rent for something similar.

That calculation would look much different if mortgage interest rates were higher. According to Freddie Mac, interest rates for a conventional home loan now stand at 3.65 percent, relatively low compared to historic levels. If rates jumped to 4.65 percent, the New York Times calculator finds renting makes more sense up to $2,866 per month.

Interest rates are one of the key variables that can affect the overall cost of buying at a given time. A high interest rate means costlier mortgage payments, which add up over years of homeownership.

Right now, interest rates are low, and homes sold much more quickly at the end of 2019 than they did a year earlier, according to data published by the California Association of Realtors. Sale prices rose at a modest pace for much of last year, but that could change in 2020, according to Jordan Levine, an economist for the realtors association.

Levine says buyer-friendly market conditions seen briefly in 2019 are shifting back toward sellers. He predicts steady price growth throughout the new year.

That might be discouraging news for prospective homeowners, but Sussman stresses that the decision to rent or buy depends entirely on what people are looking for in a home and how long they’d like to stay there.

“For the right person, if your financial wherewithal is solid, and if you're going to be in the house for more than five years, go ahead and buy,” he says. “Prices will be higher 10 years from now than they are today.”