Drug pricing in America is complex.

Prescription drugs are expensive in the United States — this we already know. But as it turns out, people in certain U.S. cities have to shell out more for their medications than others.

And, while all eyes on legislation aimed to curb high prices have mainly been focused on the country as a whole, what few realize is that drug prices will need to be evaluated on a state-by-state and even city-by-city level. Why? As it turns out, drug prices can vary widely by city in America.

To analyze price variation between cities, GoodRx analyzed 'cash' prices of the 500 most commonly prescribed medications in 30 of the most populated cities in the U.S. This is the third iteration of the report. 

San Francisco is the most expensive city for prescription drugs in America, with drugs costing over 18% more than the national average. Denver is the least expensive city at 33% less than the national average.

This data highlights the ill-logical, scale and variable nature of drug pricing in the U.S.