Is it a better deal for you to rent or buy a home? That may depend on the state you live in.

It’s cheaper to rent a home versus buying one in just eight states in America, according to an analysis of monthly costs released Monday by GoBankingRates.com. Those states, Hawaii, Montana, Utah, Idaho, Colorado, Wyoming, Delaware and Oregon, are joined by the District of Columbia. The analysis compared the monthly cost to rent the median-priced single-family home in each state with the monthly cost of owning that same home. The latter expense includes mortgage payments (assuming a 20% down payment and a 30-year fixed loan), property taxes and insurance.

This comes at a time when rents have been rising rapidly, explains Kristen Bonner, lead researcher on the study. In 2015, apartment rents increased faster than they had at any time since 2007. And while they have fallen slightly this year, according to an analysis by Trulia released in June, the real-estate site notes that “relative to historical pricing, rents are still very high.”

Of course, home prices have also been rising — a little over 5% in the past year, according to data from the S&P/Case-Shiller 20-City Composite Index. But at the same time, mortgage rates have remained very low, which helps keep home-ownership costs lower for buyers. Rates for 30-year fixed-rate loans are below 3.5% and close to historic lows, according to mortgage giant Freddie Mac.

There are some caveats to consider with the GoBankingRates data: For one, the study assumes consumers put down 20% of the purchase price when buying a home, and it doesn’t take into account the fact that homeowners may have to pay out of pocket for repairs that a landlord would cover for his renters. “When you own a home you are responsible for everything — all the maintenance,” says Darren Zagarola, the owner and a financial planner at Princeton, N.J.–based financial planning firm EKS Associates.

And this data doesn’t mean renters should rush out to buy a home (and, no doubt, high rents make it harder for many consumers to save up for a down payment), experts say. “It is important for consumers to still consider all the facts before buying,” says Bonner. This includes things like the state of the housing market in their area and whether they have enough money for a down payment and out-of-pocket household repairs, she says.

And, of course, there are plenty of advantages to renting: Renters can more easily pick up and move, says Zagarola. Plus, owning a home for many is risky because of the debt taken on with a mortgage, adds Kevin Finkel, the executive vice president of real-estate firm Resource Real Estate. Renters typically aren’t borrowing money to pay their rent, although they often have to pay a security deposit as well as first and last month’s rent in order to secure the apartment.