Average-income families can no longer afford a detached house in more than a quarter of Canada’ largest cities, according to an analysis carried out by The Huffington Post Canada.

And while Toronto and Vancouver are famous for their high house prices, HuffPost’s survey shows those cities’ traditionally affordable suburbs are now out of reach for middle-income earners as well. In these cities, average earners have basically no choice but to buy a condo, or stay out of the housing market.

Of the 26 largest cities in Canada, seven fell into the “unaffordable” category — meaning the average sale price of a stand-alone home was at least $100,000 more than the maximum mortgage amount an average income will get you. (See methodology below.)

Among those cities were many formerly affordable suburbs, including Markham and Mississauga (greater Toronto), and Burnaby and Surrey (greater Vancouver).

Four cities — Calgary, Edmonton, Brampton, Ont., and Victoria, B.C. — fell into the “borderline” category. Middle-income earners in these cities could soon be priced out of the single-family home market, if prices there continue to grow faster than income, as has been the case in all of them except Victoria. (Prices there have been falling slowly for years.)

Check out the full list (story continues below):

Loading Slideshow...
  • MOST AFFORDABLE: Quebec City

    Average price of a detached house: $242,000 (median) Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014

  • AFFORDABLE: St. Catharines-Niagara

    Average price of a detached house: $242,822 Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014 Pictured: Port Dalhousie, near St. Catharines

  • AFFORDABLE: Sherbrooke, Que.

    Average price of a detached house: $260,000 Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014

  • AFFORDABLE: Halifax, N.S.

    Average price of a detached house: $260,282 Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014

  • AFFORDABLE: London, Ont.

    Average price of a detached house: $260,411 Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014

  • AFFORDABLE: Laval, Que.

    Average price of a detached house: $280,000 Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014

  • AFFORDABLE: St. John's, Nfld.

    Average price of a detached house: $308,851 Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014

  • AFFORDABLE: Regina, Sask.

    Average price of a detached house: $312,000 Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014

  • AFFORDABLE: Greater Montreal

    Average price of a detached house: $313,900 Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014

  • AFFORDABLE: Saskatoon, Sask.

    Average price of a detached house: $325,700 Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014

  • AFFORDABLE: Winnipeg, Man.

    Average price of a detached house: $329,104 Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014

  • AFFORDABLE: Oshawa, Ont.

    Average price of a detached house: $341,611 Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014

  • AFFORDABLE: Hamilton, Ont.

    Average price of a detached house: $348,475 Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014

  • AFFORDABLE: Ottawa

    Average price of a detached house: $381,407 Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014

  • AFFORDABLE: Kitchener-Waterloo, Ont.

    Average price of a detached house: $387,288 Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014

  • BORDERLINE: Edmonton

    Average price of a detached house: $425,782 Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014

  • BORDERLINE: Calgary

    Average price of a detached house: $465,500 Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014

  • BORDERLINE: Brampton, Ont.

    Average price of a detached house: $471,541 Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014

  • BORDERLINE: Victoria, B.C.

    Average price of a detached house: $483,400 Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014

  • UNAFFORDABLE: Surrey, B.C.

    Average price of a detached house: $583,111 Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014

  • UNAFFORDABLE: Mississauga, Ont.

    Average price of a detached house: $726,217 Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014

  • UNAFFORDABLE: Vaughan, Ont.

    Average price of a detached house: $824,123 Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014

  • UNAFFORDABLE: Burnaby, B.C.

    Average price of a detached house: $887,700 Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014

  • UNAFFORDABLE: Markham, Ont.

    Average price of a detached house: $890,907 Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014

  • UNAFFORDABLE: Greater Vancouver

    Average price of a detached house: $932,900 Vancouver West: $2,145,200 Vancouver East: $875,400 Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014

  • MOST UNAFFORDABLE: Toronto

    Average price of a detached house: $955,314 Maximum mortgage for an average-earning household: $460,000 Source: Local real estate board, Feb. 2014

  • NEXT: THE MOST EXPENSIVE HOUSES FOR SALE IN CANADA, FEBRUARY 2014 EDITION

  • Newfoundland and Labrador: $1.85 million

    This <a href="http://beta.realtor.ca/propertyDetails.aspx?PropertyId=14085863" target="_blank">six-bedroom home in St. John’s</a>, constructed over 100 years ago, boasts beautiful original features like beveled glass and “intricate” plaster work, as well as modern additions, such as “spa inspired ensuites with in-floor heated marble,” according to the listing.

  • Newfoundland and Labrador: $1.85 million

  • Newfoundland and Labrador: $1.85 million

  • Newfoundland and Labrador: $1.85 million

  • Newfoundland and Labrador: $1.85 million

  • Newfoundland and Labrador: $1.85 million

  • Newfoundland and Labrador: $1.85 million

  • Newfoundland and Labrador: $1.85 million

  • Newfoundland and Labrador: $1.85 million

  • New Brunswick: $2.9 million

    This is actually two finished houses on 235 acres of land near St-Francois, N.B., and it's definitely one of those properties that look better on the inside than the outside. <a href="http://beta.realtor.ca/propertyDetails.aspx?PropertyId=13978788" target="_blank">Vaulted ceilings and fireplaces adorn this building</a>, which also boasts long walks in the woods -- on the property.

  • New Brunswick: $2.9 million

  • New Brunswick: $2.9 million

  • New Brunswick: $2.9 million

  • New Brunswick: $2.9 million

  • New Brunswick: $2.9 million

  • Saskatchewan: $3.8 million

    A place like this in Vancouver or Toronto could easily run you a cool $10 million, but <a href="http://beta.realtor.ca/propertyDetails.aspx?PropertyId=13574167" target="_blank">in Regina all it takes is $3.8 million</a> (pocket money, right?). This six-bedroom, four-bath property has parking space for no fewer than six cars and has more than 6,000 square feet of living space, including some pretty breathtaking staircases and foyers, and one heck of a billiard room.

  • Saskatchewan: $3.8 million

  • Saskatchewan: $3.8 million

  • Saskatchewan: $3.8 million

  • Saskatchewan: $3.8 million

  • Saskatchewan: $3.8 million

  • Saskatchewan: $3.8 million

  • Saskatchewan: $3.8 million

  • Saskatchewan: $3.8 million

With house prices growing rapidly thanks to rock-bottom interest rates that have made mortgage payments more affordable, developers have been shifting to condo construction to build affordable housing.

In the 1990s, you might have four or five single detached for every row house, now it’s more like three to one,” BMO economist Doug Porter said in a recent interview with the National Post, adding that the trend "is becoming even more obvious in recent years."

But it's not just prices, it's a lack of supply. In Toronto and Calgary in particular, there are simply too few single-family homes for sale to meet demand. Scotiabank economist Adrienne Warren says Calgary will be able to meet future demand through construction, but Toronto faces a different problem: It's running out of space to build houses, thanks to policies, such as the Green Belt, meant to reduce urban sprawl.

The measures seem to have worked; Greater Toronto is moving towards higher-density housing, so much so that it leads North America in high-rise construction, with 50 per cent more being built there than in New York City (though that could be a sign of overbuilding). But one unintended consequence appears to be a serious decrease in the affordability of detached homes.

How we determined what's affordable

To determine whether or not middle-income earners can afford a detached home in a given market, HuffPost took the average household income for all Canadians — estimated at $87,000 annually, based on StatsCan data — and polled a handful of mortgage experts to see what that income would get you, in terms of a mortgage.

The average of the mortgage experts’ estimates came to $460,000 — that’s what you can borrow, assuming a household income of $87,000, a 25-year amortization period, a 5-per-cent down payment, no other debts and current mortgage rates.

Any market where the average price of a detached house is more than $100,000 above the $460,000 mark we define as “unaffordable.”

You might still be able to buy a standalone house in these markets for a middle-income wage (even in super-pricey Toronto you can still buy a house, every now and then, for an average income) but at these price levels you’re almost certain to get a substandard home in a less desirable area.

Any market where the average price of a house is above the maximum mortgage middle earners can get, but by less than $100,000, is defined as “borderline.” There are still houses here that middle earners can afford, but not many.

All other housing markets are defined as “affordable.”

Also on HuffPost: