Abstract. This article presents a flood risk assessment for Shanghai, which provides an indication of what buildings (including residential, commercial, office, and industrial) will be exposed to flooding and its damage. Specifically, this assessment provides a risk assessment that buildings may face after construction. To achieve the flood risk assessment on buildings, we developed an integrated flood model and collected data on building shape and number of floors, land use, and construction costs for different building types in Shanghai. The extreme compound flood scenarios (1/200-, 1/500-, 1/1000-, and 1/5000-year floods) and building metadata were aggregated using a risk analysis chain. According to the damage for different flood scenarios, the average annual loss (AAL) can be calculated and is referred to as building flood risk. The AAL of residential, commercial, office, and industrial buildings is USD 12.3, 2.5, 3.7, and 3.4 million, respectively. Among the 15 (non-island) districts in Shanghai, Pudong has the highest AAL. The risk analysis chain developed in this study can be reproduced for other megacities. The results provide a clear picture for future building flood risks which links directly to disaster risk management, which implies the extent of flood risk in building types, sub-districts, and districts related to the Shanghai Master Plan. This assessment takes into consideration future climate change scenarios, information for scenario-based decision making, and a cost–benefit analysis for extreme flood risk management in Shanghai. We also discussed different potential adaptation options for flood risk management.