As cities expand, new buildings are constructed and they require heating. With increasing integration of the heating and electricity sectors and forecasts of rapid growth in electricity demand, heating choices become critical for the sustainability transition. The main heating options are communal or individual, where the communal option is represented by district heating (DH) and the individual option mainly by heat pumps or biomass heating. Which option is best from the cost perspective depends on the building type and on the energy system development. Thus, this paper investigates cost-efficient heating of new city-level housing in a systems perspective under various scenarios.The investigation was carried out using an energy systems optimization model based on a case representing Swedish conditions. A dynamic approach was used to investigate cost-efficient development of the supply side and demand side simultaneously.The results indicate that the most cost-efficient heating systems are: DH for apartment buildings; and individual heating options for single-family housing with low heat demands. For large single-family housing with high heat demands, the cost-efficient solution depends on the heat demand profile. Higher heat use during winter favors DH and individual biomass boilers, but diminishes the economic feasibility of individual heat pumps.