Hagerstown anchors the Hagerstown-Martinsburg, MD-WV Metropolitan Statistical Area, which lies just northwest of the Washington-Baltimore-Northern Virginia, DC-MD-VA-WV Combined Statistical Area in the Great Appalachian Valley. The population of the metropolitan area in 2020 was 293,844 (ranked 167th in the United States).