Purchasing a home is one of the most important investments there is. More than a place to live, homeownership is an asset with the potential to tremendously rise in value. But with home prices reaching record heights, affordability plays a huge role for buyers.

The typical home value in the United States was a record $351,423 in August, 1.3% higher than the year before.

High mortgage rates are also making monthly payments more expensive; as of Sept. 21, the 30-year fixed mortgage rate sits at 7.19%.

The Keystone State's Costliest Cribs: Top Cities for Expensive Homes

Although home prices have inflated all across the U.S., there are some cities that command a higher price tag than others. Location, size, age, and condition are all contributing factors to home value.

Stacker compiled a list of cities with the most expensive homes in Pennsylvania using data from Zillow. Cities are ranked by the Zillow Home Values Index for all homes as of August 2023. The charts in this story were created automatically using Matplotlib.

LOOK: Cities with the most expensive homes in Pennsylvania

Stacker compiled a list of cities with the most expensive homes in Pennsylvania using data from Zillow.

Gallery Credit: Stacker