We estimate the transmission of the pandemic shock in 2020 to the residential and commercial real estate market by causal machine learning, using granular data for Germany. We exploit differences in the incidence of Covid infections and short-time work at the municipal level for the identification of epidemiological and economic effects of the pandemic. We find that (i) a larger incidence of Covid infections temporarily reduced rents for retail real estate; (ii) a larger incidence of short-time work temporarily reduced rents of office real estate; (iii) the pandemic increased prices, particularly in the top price segment of commercial real estate.