Andy Queen and his wife have been apartment renters in Manhattan since selling their home in 2006, when prices were climbing to their peak. They jumped back into the buyer’s market this year after their landlord sought a 16% increase to their monthly payments.

“That got my attention,” said Mr. Queen, 46, a director of commercial operations for the advertising agency MRM. “We quickly tried to figure out what our options are.”

Now is the best time in almost six years to buy in Manhattan as rents approach record highs and home prices hold steady. The price gap between leasing and buying an apartment is the narrowest it’s been since 2006, according to data from New York appraiser Miller Samuel Inc. If the trend continues, a growing number of renters may jump into homeownership.

Compared with the rest of the country, buying remains an expensive proposition in Manhattan, where the median price of an apartment is $625,000 for a one-bedroom and $1.2 million for a two-bedroom. In the U.S., the median price of a previously owned single-family home was $158,100 in the first quarter, according to the National Association of Realtors.

In Manhattan, buying was 20.8 times more expensive than the annual cost of renting, Miller Samuel data for the first quarter show. The last time the spread was smaller was at the end of 2006, when home prices were climbing and rents were swelled by demand from Manhattanites priced out of the sales market. Buying a co-op or condo back then was 20.4 times the price of renting.

The multiple had climbed to as high as 26.7 in the second quarter of 2008, the same time the median apartment price in Manhattan peaked, according to Miller Samuel. It’s averaged 16.3 over the past 21 years.

There are limits to the analysis. While it’s adjusted for inflation, it doesn’t account for significant costs such as maintenance and mortgage payments, which vary by buyer.

“We’re just seeing a higher frequency of the decision going over to the buy side, whereas a year ago, the choice would be almost absolutely to rent,” Jonathan Miller, president of Miller Samuel, said in an interview.

The median price of Manhattan condos and co-ops that sold in the first quarter was $775,000, a 0.9% decline from a year earlier, Miller Samuel and Prudential Douglas Elliman Real Estate said in an April 3 report. At the same time, the median monthly rent jumped 7.1% to $3,100, or $37,200 annually. Rents are now within about 5% of the $3,265 peak reached at the end of 2006.

Studios and one-bedroom units accounted for 56% of sales completed in the quarter, the highest market share of starter homes in three years, according to Miller.

The cost of buying relative to renting remains the highest of anywhere in New York City and surrounding suburbs, according to Trulia Inc.

“Buying is slightly more affordable to renting than it was, but that’s not enough for Manhattan to make buying a good deal,” said Jed Kolko, chief economist at the San Francisco-based property data firm, which cites Detroit and Oklahoma City as the top metropolitan areas where purchasing makes more sense.

For homeownership to pay off in Manhattan, a buyer has to meet certain hurdles, such as obtaining a mortgage, doing so near the current record-low rates, and making a substantial down payment, according to Miller.

For $3,100 a month, a tenant can lease a 575-square-foot studio with a fireplace in a West Village prewar building, he said, citing a recent rental agreement.

That monthly payment could alternately be used to purchase a 700-square-foot co-op in the same neighborhood for $630,000—if the buyer were to put 20% down and get a 30-year fixed-rate mortgage at 3.75%, according to Mr. Miller’s analysis of a recent sale on Greenwich Street.

The $3,100 monthly cost to buy that apartment includes $800 for real estate taxes and maintenance charges. It doesn’t account for tax deductions, such as for mortgage interest, which would reduce the burden, Mr. Miller said.

“If there is a way to buy, people will buy,” said Pamela Liebman, president of the Corcoran Group, a New York-based brokerage. “They will stretch to buy where they don’t want to stretch to rent.”

Mr. Queen and his wife, who have a 7-year-old son, decided in March that they would rather put their money toward a purchase than pay more to rent their apartment in Murray Hill. With 45 days before they needed to renew their lease or decide to move out, they raced to find a two-bedroom unit with about 1,200 square feet for less than $1 million. They planned to put 40% down.

Buying such a place instead of renting one would make sense if they held onto it for at least three years, Mr. Queen said. If he sold it after that, he’d have a better return on his down payment than had he invested elsewhere while remaining a renter, according to Mr. Queen’s analysis, which assumes the home would appreciate 3% annually and his rent would increase about 4%.

After seeing three places, the couple came close but ran out of time to strike a deal. They renewed the lease for their two-bedroom apartment at $5,500 a month, a 10% increase. Mr. Queen plans to resume the home search in September.

“After we get through the summer season, I’m going to be on top of it again,” he said. “If we find an incredible deal, I can break the lease and pay a two-month penalty.”

Tumbling borrowing costs are another enticement to buy, Mr. Queen said. The average rate for a 30-year fixed loan fell for a sixth straight week in the period ended June 7, to a record 3.67%, according to data from Freddie Mac, the McLean, Virginia-based mortgage financier. It has been below 4 percent for all but one week this year.

While Manhattan’s rents may tip the scales toward buying, qualifying for a mortgage muddies the decision for some as lenders exact ever-stricter standards, Mr. Miller said. Co-ops, which tend to be cheaper than condos and more attractive to new buyers, require average down payments of 35%, further limiting the pool of renters who can actually make a purchase. In co-ops with larger shares of starter units, the requirement is lower, according to Mr. Miller.

“For some people, the down payment is what halts the process and doesn’t allow them to flip into a purchase,” Ms. Liebman said. “Some people are asking their parents for help.”

Lenders demand a minimum down payment of 20 percent of the sale price or appraised value, whichever is lower, said Debra Shultz, managing director at Manhattan Mortgage Co. in New York. All the while, underwriters are amassing paper trails to justify loans to even the most credit-worthy borrowers.