Drinking water (DW) production treatments can be affected by climate change, in particular intense rainfall events, having an impact on the availability and quality of the water source. The current study proposes a methodology for the evaluation of the costs of the different treatment steps for surface water (SW) and groundwater (GW), through the analysis and quantification of the main cost items. It provides the details to count for strong variations in the key quality parameters of inlet water following severe rainfalls (namely turbidity, iron, manganese, and E. coli). This methodology is then applied to a large drinking water treatment plant (DWTP) in Italy, which treats both SW, around 70 %, and GW, around 30%. It discusses the overall DW production costs (from 7.60 c€/m3 to 10.43 c€/m3) during the period 2019–2021 and analyzes the contributions of the different treatment steps in water and sludge trains. Then it focuses on the effects on the treatments of significant variations in SW turbidity (up to 1863 NTU) due to intense rainfalls, and on the daily costs of DW with respect to the average (baseline) costs evaluated on the annual basis. It emerges that, when SW has low turbidity levels, the energy-based steps have the biggest contribution on the costs (final pumping 22 % for SW and 10 % for GW, withdrawal 15 % and 14 %, respectively), whereas at very high turbidity levels, sludge greatly increases, and its treatment and disposal costs become significant (up to 14 % and 50 %). Efforts are being made to adopt the best strategies for the management of DWTPs in these adverse conditions, with the aim to guarantee potable water and optimize water production costs. A mitigation measure consists of increasing GW withdrawal up to the authorized flow rate, thus reducing SW withdrawal. In this context, the study is completed by discussing the potential upgrading of the DWTP by only treating GW withdrawn from riverbank filtration. The DW production cost would be 7.76 c€/m3, which is lower than that seen for the same year (2021) with the current plant configuration (8.32 c€/m3).