While Buffalo is still one of the most affordable places to live in the country, it may not be as affordable as it was a year ago, according to Forbes magazine.

Forbes has ranked Buffalo as No. 3 on the list of most affordable cities in the country, after the magazine ranked the area No. 1 last year. Birmingham, Ala. claimed the top spot this year, followed by Knoxville, Tenn. in second place.

The area’s still-affordable housing assured it was near the top of this year’s rankings.

The ranking’s 100-largest metro cities are based on income, housing affordability, cost of utilities, groceries and other everyday expenses. Many of the most affordable cities are located in the South and Midwest.

Forbes put this region’s median family income at $63,900, the same as the national average and up $400 from the previous year.

The median home sale price in the last three months of 2014 was $118,000, up $18,000 from the same time last year, but well below the national average of $215,000, according to the Housing Opportunity Index from the National Association of Home Builders and Wells Fargo.

That translates to 81.8 percent of homes for sale in the Buffalo area are therefore considered “affordable” for families earning the median income, well above the national figure of 62.8 percent, but below the 88.5 percent from one year earlier.

The study also estimates that area residents, compared to the national average, pay 7.1 percent less for groceries,7.1 percent more for utilities, 2.4 percent more for transportation and 11.8 percent less for health care.