In multi-apartment buildings, changes in energy demand may influence cost-optimal heat supply options. District heat based on combined heat and power production has proved to be cost- and primary energy-efficient option for heating purposes in the residential sector. However, for customers with a low heat demand, local heat supply options may be more cost-efficient than district heat supply options. In this study, we investigated cost-optimal options to supply heat to a multi-apartment building in Växjö city, Sweden. We considered biomass-based alternatives for district heating and local heating based on wood pellet boiler and ground-source electric heat pump, also combined with solar heating systems. Furthermore, we evaluated how a varied yearly heat demand influences the cost and primary energy efficiency of the different heat technologies. We found that both fuel costs and initial investment costs of heating systems play an important role for the cost efficiency of the different heat supply options. District heat is not always cost efficient for multi-apartment buildings especially for low energy buildings with minimum heat demand. There is also a tradeoff between heating cost and primary energy use in supplying heat to multi-apartment buildings.