Affordable housing isn't just a big problem in Southwest Florida.

Median-priced homes are not affordable for average wage earners in 71 percent of markets across the country including Collier and Lee counties, according to a report by ATTOM Data Solutions based in Irvine, California.

The report also shows 65 percent of the markets included in the study are less affordable than a year ago, including Lee.

The findings are based on first-quarter data.

To determine affordability, ATTOM looked at the income needed to make monthly house payments on a median-priced home, assuming a 3 percent down payment.

The median price is the price at which half the homes sell for more and half for less.

ATTOM defined affordable as not having to spend more than 28 percent of one's annual income on a house payment including the mortgage, property taxes and insurance.

On average, it takes 52.4 percent of annual wages to cover the cost of a median-priced home in Collier County. That compares with 39.7 percent in Lee.

Median-home prices aren't affordable for average wage earners in 335 of the 473 counties analyzed for the report. That means they're only affordable in 138 of counties in the study.

Housing market in flux

The housing market is in "flux across the United States, with a mix of tailwinds and headwinds that are pricing many people out of the housing market, but also are creating potentially better conditions for buyers," said Todd Teta, chief product officer for ATTOM Data Solutions, in a news release.

"Continually rising home prices in many areas do remain a financial stretch — or simply unaffordable — for a majority of households," Teta added. "However, quarterly wage gains have been outpacing price increases for more than a year and mortgage rates are falling, which have helped make homes a bit more affordable now than they've been in a year."

According to a heat map, Lee County's median home price stood at $222,000 in the first quarter, while Collier's was $329,000.

In the first quarter, Collier homes got a bit more affordable. Wages grew 6.5 percent, while the median home price dropped 4.4 percent over the year.

In case you missed it:Collier commissioners pass measures to lure affordable housing

In Lee prices got a little less affordable. In the county, wages grew 4 percent over the year, but home prices rose 3.3 percent, making them more out of reach for the average worker.

Affordability in Lee County declined 1 percent from a year ago, but rose 8 percent in Collier.

A year ago, the typical home purchase would have consumed 39.3 percent of an average wage earner's income in Lee County, while in Collier it would eaten up 56.4 percent.

In the first quarter, the annual income needed to buy a median-priced home in Lee was $63,555, compared with $91,192 in Collier, Teta explained in an email. Those amounts, he said, remain well above the average annual wage of $44,850 in Lee and $48,750 in Collier.

"Homes in both counties are less affordable to local residents than in the nation as a whole," Teta said.

In the nation as a whole, he said, buyers need 32.7 percent of their income to afford the typical home.

Collier County "dead last"

Lee ranked 297th and Collier came in 416th for affordability. Among the 36 Florida counties included in the study, Lee ranked 24th and Collier came in "dead last" in the state, Teta said.

Other unaffordable counties include: Miami-Dade in Florida, Maricopa in Arizona and Orange in California.

Homes are much more affordable in counties such as Cook in Illinois, Harris in Texas, Wayne in Michigan and Cuyahoga in Ohio, according to the report.

Among the counties analyzed, 232 — or 49 percent — saw affordability fall below their historic levels in the first quarter, including Lee.

The county with the most affordability? Warren in New Jersey.

More:Collier County commission votes not to abolish PACE despite consumer protection worries

Brent Batten:On laws, guidelines, economics and affordable housing

Buyers would pay the biggest share of their income on housing in Kings County in Brooklyn (115.9 percent) and New York County in Manhattan (115 percent).

Other counties with high housing costs include Santa Cruz and Marin in California, and Maui in Hawaii.

The areas where workers could spend the lowest share of their income include: Bibb County in Georgia (11.1 percent), Baltimore City in Maryland (12.4 percent), and Wayne County in Michigan (13.2 percent).

Home price appreciation outpaced average weekly wage growth In the first quarter in 232 of the markets analyzed. That didn't happen in Collier County or Lee.

Nationwide the median home price stood at $237,500 in the first quarter. According to ATTOM's analysis that would require a gross annual income of more than $66,300.

The average worker in the United States earns $56,832 a year.

More signs of a changing market

The latest report by Florida Realtors points to a changing market, that could impact affordability in Southwest Florida and statewide.

In February, Florida's housing market had higher median prices and increased inventory, when compared with a year ago, according to the monthly report.

The statewide report is based on resales — or existing homes.

Last month the median price for resales in Florida rose 1.3 percent over the year to $250,000, while the price paid for condominiums and townhomes grew 4.7 percent to $187,500.

In a news release, Brad O'Connor, a chief economist for Florida Realtors, said one statistic to note is an increase in the days on market, which is prevalent throughout Florida.

"Competition between buyers is clearly not as fierce as it was even a year ago," he said. "However, that doesn't mean we're quite in buyers' market territory yet. Home sale activity in January and February is usually lighter than other months and not always representative of what's to come."

According to Florida Realtors's report, the median price paid for a single-family home in the Cape Coral-Fort Myers metro was $253,250 in February, up 1.2 percent over the year. In the Naples-Immokalee-Marco Island metro, it was much higher — at $444,500, down 9.5 percent from a year ago, but still the highest price in the state.

More:Market Watch 2019 speakers: It's time to face change

Another view of the market

A separate report by the Naples Area Board of Realtors showed a 4 percent decline in the closing price for homes and condos in February. That reflects all existing home sales made in Collier County, excluding Marco Island.

Overall, the median price fell to $335,000 last month in the Naples market, down from $350,000 a year ago, according to NABOR's report.

Meanwhile, the inventory of homes for sale increased 7 percent to 7,442 last month, up from 6,912 a year ago, giving home buyers more options to choose from in the market.

More:This Fort Myers duo turns condemned homes into affordable dreams

There were 100 less closed sales in the Naples area in February, when compared with last year — a 14 percent decline.

Dominic Pallini, a broker at Vanderbilt Realty in Naples, said he's convinced buyers are more carefully evaluating all their options, now that there are more new and existing homes available for sale.

"The average days on the market increased in February, which tells me that buyers are looking at more homes before they make an offer," Pallini said in a statement. "Plus, there is a lot more new construction this year than a year ago. Agents were rarely in the office in February because showings really increased dramatically."