Here is a map of the houses prices variation in Germany. As always, Baviera is the most expensive region. Munchen has the most expensive prices in all Germany.
Hamburg and Frankfurt are also very expensive cities not only in terms of rent/purchase price of an apartment but also in living expenses.
Just to compare, in Munchen or Hamburg a coca-cola in a Bar costs around 3 Euro. If you try the same in Butzbach or even in Berlin, you pay between 1 and 1,50 Euro.
The big number of refugees and economic migrants that came in 2016 resulted in a price increase of apartments especially in Berlin, a city where in reality more than 50% of the population is foreign.