This is a very detailed answer. I found that applying for an academic api key can be done by sending them an email: numbeo.com/common/apply_academic_api.jsp. The only drawback is the data is only for limited cities, but it looks like this might be as close as I'm going to get to what I need. Thank you!
– greenJavaDevNov 25 '14 at 23:05

For the US, this information is generally obtained through the Bureau of Labor (BLS) jointly with the US Census. Data is collected on a regional, state and metropolitan statistical area (MSA). Here are some links:

I'm not sure if you want your calculator work for world cities or just the US.

In case it's the first, the National Department of Statistics (Dane) of Colombia posts in a regular basis studies (most likely data with some degree of processing) about prices, with some nice analysis by expenditure groups and the like. You can find them here in Spanish: link to Dane's report on prices to consumers.

I guess each country has some sort of report that is essentially the same.