By HOLDEN LEWIS

NerdWallet

Big coastal cities have some of the highest house prices in the country. In comparison, medium-size cities are often relative bargains. But not always.

Each quarter, NerdWallet calculates home affordability for 172 metropolitan areas for which the National Association of Realtors publishes home prices. NerdWallet narrowed its focus this quarter to 87 medium-size metros with populations between 250,000 and 1 million. They range from Yakima, Washington (population 250,193), to Tulsa, Oklahoma (990,706).

Affordability for buying a home was estimated by comparing each metro area’s median household income with the monthly principal-and-interest payment for a median-priced single-family home in the third quarter. After a 20 percent down payment, house payments were calculated at 4.74 percent, the average interest rate for a 30-year fixed-rate mortgage in the third quarter in NerdWallet’s daily mortgage rates survey. Payments exclude insurance and property taxes.

Rankings were compiled using data from the National Association of Realtors, the U.S. Census Bureau and NerdWallet surveys. Even medium-size cities can boast a touch of Hollywood, so we’ve mentioned movies and TV shows that were filmed or set in each of these.

MOST AFFORDABLE MEDIUM-SIZE METRO AREAS IN 3Q

1. YOUNGSTOWN-WARREN-BOARDMAN, OHIO-PENNSYLVANIA

Median home price: $97,600 (national median price: $266,900)

Median household income: $45,382

Principal and interest payment: $407 (10.8 percent of median monthly income)

Population: 541,926

Low house prices make Youngstown affordable, although typical household income is well below the national median of $60,336. Youngstown was the filming location for portions of the 1978 movie “The Deer Hunter.”

2. PEORIA, ILLINOIS

Median home price: $131,300

Median household income: $57,453

Principal and interest payment: $547 (11.4 percent of monthly income)

Population: 372,427

Peoria had the highest median household income among the five most affordable metros on this list. Parts of the 1986 Richard Pryor movie “Jo Jo Dancer, Your Life Is Calling” were filmed here.

3. ROCKFORD, ILLINOIS

Median home price: $131,600

Median household income: $55,484

Principal and interest payment: $549 (11.9 percent of monthly income)

Population: 338,291

This city was home to the Rockford Peaches, a women’s professional baseball team in the 1940s and 1950s that was fictionalized in the 1992 movie “A League of Their Own.”

4. ERIE, PENNSYLVANIA

Median home price: $123,200

Median household income: $50,614

Principal and interest payment: $514 (12.2 percent of monthly income)

Population: 274,541

Erie lies on the shore of Lake Erie. Portions of 2009’s “The Road” were filmed in Presque Isle State Park, offshore from downtown.

5. DAVENPORT-MOLINE-ROCK ISLAND, IOWA-ILLINOIS

Median home price: $133,900

Median household income: $54,173

Principal and interest payment: $558 (12.4 percent of monthly income)

Population: 382,263

This metro area, called the Quad Cities, straddles the Mississippi River. The 1991 biopic “Bix,” about Davenport native and jazz cornetist Bix Beiderbecke, was filmed partly here.

LEAST AFFORDABLE MEDIUM-SIZE METRO AREAS IN 3Q

1. HONOLULU, HAWAII

Median home price: $818,600

Median household income: $81,284

Principal and interest payment: $3,412 (50.4 percent of monthly income)

Population: 988,650

Honolulu’s high household incomes are matched by high house prices. Parts of the 2004-2010 TV series “Lost” were made in Honolulu.

2. BOULDER, COLORADO

Median home price: $604,200

Median household income: $80,834

Principal and interest payment: $2,519 (37.4 percent of monthly income)

Population: 322,514

Boulder is home to the University of Colorado. In the 1980 horror classic “The Shining,” the exterior of the Torrance family’s apartment was filmed in Boulder.

3. NAPLES-IMMOKALEE-MARCO ISLAND, FLORIDA

Median home price: $425,000

Median household income: $66,048

Principal and interest payment: $1,772 (32.2 percent of monthly income)

Population: 372,880

This area is known for its fishing. Part of the 1997 comedy “Gone Fishin'” starring Danny Glover and Joe Pesci was filmed on Marco Island.

4. RENO, NEVADA

Median home price: $385,800

Median household income: $61,360

Principal and interest payment: $1,608 (31.5 percent of monthly income)

Population: 464,593

Reno calls itself “The Biggest Little City in the World” and has big-city housing prices, dealing it a bad hand for affordability. Some of “Sister Act,” the 1992 Whoopi Goldberg comedy, was filmed in Reno.

5. EUGENE, OREGON

Median home price: $302,700

Median household income: $50,654

Principal and interest payment: $1,262 (29.9 percent of monthly income)

Population: 374,748

Eugene is home to the University of Oregon, where much of the 1978 comedy “Animal House” was filmed.

This article was provided to The Associated Press by the personal finance website NerdWallet. Holden Lewis is a writer at NerdWallet. Email: hlewis@nerdwallet.com. Twitter: @HoldenL.