An increasing number of municipalities are striving for energy autonomy. This study determines in which municipalities and at what additional cost energy autonomy is feasible for a case study of Germany. An existing municipal energy system optimization model is extended to include the personal transport, industrial and commercial sectors. A machine learning approach identifies a regression model among 19 methods, which is best suited for the transfer of individual optimization results to all municipalities. The resulting levelized cost of energy (LCOE) from the optimization of 15 case studies are transferred using a stepwise linear regression model. The regression model shows a mean absolute percentage error of 12.5%. The study demonstrates that energy autonomy is technically feasible in 6,314 (56%) municipalities. Thereby, the LCOEs increase in the autonomous case on average by 0.41 €/kWh compared to the minimum cost scenario. Apart from energy demand, base-load-capable bioenergy and deep geothermal energy appear to have the greatest influence on the LCOEs. This study represents a starting point for defining possible scenarios in studies of future national energy system or transmission grid expansion planning, which for the first time consider completely energy autonomous municipalities.