As a result of the increase in city populations, and the high energy consumption and emissions of buildings, cities in general, and buildings in particular, are the focus of attention for public organizations and utilities. Heating is among the largest consumers of energy in buildings. This study examined the influence of the income of inhabitants on the consumption of energy for heating and the CO2 emissions in city buildings. The study was carried out using equivalized disposable income as the basis for the analysis and considered the economies of scale of households. The results are shown per inhabitant and household, by independently considering each city. Furthermore, to more clearly identify the influence of the population income, the study was also carried out without considering the influence of the climate. The method was implemented in the case of Spain. For this purpose, Spanish cities with more than 50,000 inhabitants were analyzed. The results show that, both per inhabitant and per household, the higher the income of the inhabitants, the greater the consumption of energy for heating and the greater the emissions in the city. This research aimed to help energy utilities and policy makers make appropriate decisions, namely, planning for the development of facilities that do not produce greenhouse gases, and enacting laws to achieve sustainable economies, respectively. The overall aim is to achieve the objective of mitigating the impact of emissions and the scarcity of energy resources.