The median sale price in Cambridge, $1.7 million, won't even get you homes like this one in Avon Hill, which went to market at $2.75 million last year.

Cambridge now has the highest home prices of any city or town in the Bay State, edging out perennial front runner Brookline.

The median price of a single-family home in Cambridge hit $1,675,000 during the first four months of 2016, a 28 percent increase over last year, The Warren Group, publisher of Banker & Tradesman, reports.

Brookline saw its median home price fall 4 percent during the same period, to $1,615,000.

Cambridge has also blown past a number of other upscale suburbs to claim the top spot,including Lincoln ($1.4 million), Weston ($1.2 million) and Newton ($1.1 million). Not to mention Nantucket ($1.4 million), according to The Warren Group.

Surging demand from everyone from university professors to biotech executives has combined with a shortage of homes for sale to drive Cambridge home prices to all-time highs, real estate experts say.

In fact, even as prices have soared, home sales have plunged 19 percent so far this year in Cambridge amid a dwindling number of homes on the market.

“It’s just nuts,” said Merit McIntyre, president of Coldwell Banker Brokerage in New England, who helps employees of Harvard and affiliated institutions find homes in the state’s most expensive market. “From a buyer’s perspective, it’s difficult.”

How difficult can be seen in the time it takes for a home in Cambridge to find a buyer. In May, homes that hit the market in Cambridge had offers, on average, in 12.64 days. That’s compared to 50 days in towns just a few miles away, like Waltham or Melrose, where the median price is in the half-million dollar range, or a third of Cambridge’s.

A buyer, in turn, who can afford a $1.6 million house in Cambridge won’t be buying one of those gorgeous old Brattle Street mansions – you need upwards of $4 million for that.

But the city’s median price may get an older four or five bedroom home near Harvard Square.

OK, you’ll need to be making at least $310,000 – combined or individually – and be able to shoulder $72,000 a year in mortgage payments, McIntyre said.

And if you want a decent shot at a house, you will also likely to have to drop all traditional safeguards – such as the inspection and mortgage contingencies – to land something.

“In Cambridge, where there is such a small supply of real estate, it is kind of scary, a lot of times you have to drop all contingencies,” he said.