DENVER (KDVR) — Denver spends more city money than it’s worth, according to a new report.

Financial adviser site WalletHub analyzed 149 of the largest cities in the U.S. to see which are the best run. The study asks the question of return on investment – how well do city services operate compared to how much the city spends?

The study drew from a wealth of public data on each city’s financial stability, education, health, safety, economy, infrastructure and pollution. There were 36 relevant metrics overall, each of which was graded from one to 100. Each was given a weight and the final results ranked from one to 149.

The results said Denver is one of the worst-run cities in the country, ranking 135 out of 149 cities, sandwiched between Philadelphia and Memphis. San Francisco is dead last, while Nampa, Idaho is first.

It isn’t the quality of Denver’s city services that causes it to rank so low – they rank 63 – but rather the amount of money spent.

Denver is tied with San Francisco, Atlanta, New York and Nashville for the 145th-highest outstanding debt per capita and has the 142nd-highest budget per capita. Despite the spending, however, it has middling-to-low rankings for city services. It ranks 49 for financial stability, 99 for education, 53 for health, 99 for safety, 37 for economy and 80 for infrastructure and pollution.

Other Colorado cities rank considerably higher than Denver, including neighboring Aurora. Aurora ranks 59th overall despite having nearly the same overall quality of city services as Denver, ranking 70th. Aurora simply spends less, with the 68th lowest budget per capita.