Sending in that rent check every month can feel like you’re flushing money down the drain. You’re paying for a roof over your head, but it’s hard to compete with buying a home and building equity.

As it turns out, though, renting for a few years may make perfect financial sense.

Zillow’s breakeven horizon metric measures the number of years after which buying a home is more financially advantageous than renting. This period of time is calculated by comparing the net costs of buying a house with the costs of renting the same home. From here, average and median breakeven horizons are computed at the city and metro levels.

Based on Zillow’s breakeven horizon data and average home values across the U.S., here’s a look at the top 10 big cities where renters have the edge:

No. 10: Nashville, TN

Breakeven horizon: 2.6 years*
Annual change in Zillow Rent Index: 3.8%*
Homes sold at a loss: 24.56%*
Median rental price: $1,190*

The Nashville housing market has held up fairly well, but it still takes 2.6 years before buying pays off more than renting. The Zillow Home Value Index (ZHVI) increased 6% year-over-year to $140,000 in December 2012. Meanwhile, the Zillow Rent Index (ZRI) was up 3.8%. By comparison, Memphis home values were down 3.5%, and rental rates were flat, according to Zillow Chief Economist Stan Humphries.

No. 9: Austin

Breakeven horizon: 2.7 years*
Annual change in Zillow Rent Index: 6.2%
Homes sold at a loss: N/A**
Median rental price: $1,516*

As 2012 came to a close, the  Austin real estate market ontinued to improve with a median home value of $209,900, a 4.7% increase. The rental market also looked favorable with the ZRI reporting a 6.2% rise.

No. 8: Denver

Breakeven horizon: 2.8 years*
Annual change in Zillow Rent Index: 9.3%
Homes sold at a loss: 21.13%
Median rental price: $1,468*

Denver is seeing double-digit growth in its median home value, up 14.1% to $233,700 as of December 2012. While the Denver housing market is doing well, it takes 2.8 years for owning a home to make the most financial sense. In the meantime, the skiing and dining mecca is a renters’ paradise.

No. 7 (tie): San Jose, Calif

Breakeven horizon: 3.3 years*
Annual change in Zillow Rent Index: 4.5%
Homes sold at a loss: 33.5%
Median rental price: $2,513*

Humphries says that with more than 6,600 technology companies in San Jose, people prefer to buy. With a median annual income topping $92,500 and a median home value of $544,600, buying a home in San Jose is definitely in the cards. But with the housing market doing well, the breakeven horizon in San Jose is unsurprisingly more than three years. For technologists moving to Silicon Valley for the first time, it makes financial sense to rent until you know you’ll be in tech central for longer than 3.3 years.

No. 7 (tie): Los Angeles

Breakeven horizon: 3.3 years*
Annual change in Zillow Rent Index: 2.3%
Homes sold at a loss: 24.86%
Median rental price: $2,311*

Tied with San Jose, the Los Angeles market has the same breakeven horizon of 3.3 years. However, the two California markets are quite different. While San Jose is benefiting from a high employment rate, unemployment dominates in L.A. Home prices also fell about 35% from peak to trough, making L.A. overall more affordable for home buyers, Humphries says. This doesn’t mean it’s cheap, though. The median home value was still up 9.7% at $399,800 as of December 2012.

No. 6: San Diego

Breakeven horizon: 3.4 years*
Annual change in Zillow Rent Index: 2.9%
Homes sold at a loss: 34.86%
Median rental price: $2,116*

Beach living just got brighter with the median San Diego home value up 11% from a year ago at $404,100. “If you want to move into housing, it looks more affordable now than it has in the past,” Humphries said.

No. 5: Portland, Ore

Breakeven horizon: 3.6 years*
Annual change in Zillow Rent Index: 8.6%
Homes sold at a loss: 21.49%
Median rental price: $1,423*

The No. 1 city for bike commuters in the U.S., Portland is home to a new wave of urban dwellers. This is fitting considering Portland is a city where it is in your favor to rent with a breakeven horizon of 3.6 years. The ZRI was $1,423 as of December 2012, an 8.6% year-over-year gain. Meanwhile, the median home value in the city rose 8.8% to $257,400.

No. 4 (tie): Washington, DC

Breakeven horizon: 3.7 years*
Annual change in Zillow Rent Index: 7%
Homes sold at a loss: 16.07%
Median rental price: $2,439*

According to Humphries, the Washington, DC housing market is seeing a lot of new construction interest, both in single-family and multifamily homes. This is not surprising considering the area’s government jobs, as well as thriving health care, education and military institutions. The median home value was $402,400 as of December 2012, a 10% increase from the previous year.

No. 4 (tie): San Francisco

Breakeven horizon: 3.7 years*
Annual change in Zillow Rent Index: 12%
Homes sold at a loss: 16.70%
Median rental price: $3,281*

On par with Washington, DC, San Francisco is also a thriving market. Perhaps unsurprisingly, the median home value tops all cities on this list at $770,600. That’s up nearly 18% year-over-year.

No. 3: Boston

Breakeven horizon: 3.9 years*
Annual change in Zillow Rent Index: 11.3%
Homes sold at a loss: 26.73%
Median rental price: $2,299*

With universities and colleges galore, Boston is home to a number of renters. And with a breakeven horizon of 3.9 years, it’s rightly so. Last December, the Zillow Rental Index and Home Value Index soared more than 11% year-over-year in the Boston real estate market. The median home price was $370,800.

No. 2: Seattle

Breakeven horizon: 4.3 years*
Annual change in Zillow Rent Index: 4.7%
Homes sold at a loss: 26.87%
Median rental price: $1,850*

Surrounded by water, Seattle offers extraordinary views for renters and homeowners alike. But prime Seattle waterfront property comes with a hefty price tag, considering the median home value was $392,200 as of December, a 12.6 annual increase. With a breakeven horizon of 4.3 years, though, renting may be a better choice for the short run.

No. 1: New York, N.Y.

Breakeven horizon: 5 years*
Annual change in Zillow Rent Index: 19.4%
Homes sold at a loss: 13.83%
Median rental price: $2,016*

Renters in the Big Apple shouldn’t feel rushed into buying. Unless you plan on staying put for at least five years, it actually makes more financial sense to rent an apartment in the heart of the city. The median home price for New York stayed at $462,500, and the rent index rose to $2,016 as of December 2012. Although nearby Manhattan is a different story, New York proper is a renters’ market.

*ZRI and ZHVI median figures show year-over-year percentage change for December 2012. The breakeven analysis was done using data through September 2012. Home loss figures are for December 2012.

**It’s not possible to accurately calculate the home-loss figure for Austin due to public-records laws in Texas.

Read More From Zillow:

What Can You Rent for $2,000 a Month?

For-Sale Inventory Continues to Fall

How Much House Can You Get for $525,000?