Milk losses caused by intramammary infections (IMI) have a massive impact on farm profitability and sustainability. In this study, we analyzed milk losses from 4 553 treated IMI cases at 41 AMS dairy farms. Milk losses were estimated based on the difference between the expected and the true production. To estimate the unperturbed lactation curve, we applied an iterative procedure using the Wood model and a variance-dependent threshold on the milk yield residuals. We calculated milk losses both in a fixed window around the first treatment day of each IMI case and in the perturbations corresponding to this day, at cow level as well as at quarter level. In a fixed time window of day -5 to 30 around the first treatment, the absolute median milk losses per case were 101.5 kg, highly dependent on the parity and the lactation stage with absolute milk losses highest in multiparous cows and at peak lactation. Relative milk losses expressed in percentage were highest on the treatment day, and full recovery was often not reached within 30 days from treatment onset. In 62% of the cases, we found a perturbation in milk yield at cow level at the time of treatment. On average, perturbations started 8.7 days before the first treatment and median absolute milk losses increased to 128 kg milk per perturbation. Mastitis is not expected to have equal effects on the four quarters so this study additionally investigated losses in the individual udder quarters. We used a data-based method leveraging milk yield and electrical conductivity to project the presumably infected quarter and compared losses with the average of presumably non-infected quarters. Median absolute losses in a fixed 36-day window around treatment varied between 50.2 kg for front and 59.3 kg for hind infected quarters compared to respectively 24.7 and 26.3 kg for the median losses in the non-infected quarters. Also here, these losses depended on lactation stage and parity. Expressed proportionally to expected yield, the relative median milk losses in infected quarters on the treatment day were 20% higher in infected quarters with a higher variability and slower recovery. In 86% of the treated IMI cases, at least one perturbation was found at the quarter level. This analysis confirms the high impact of IMI on milk production, and the large variation between quarter losses illustrates the potential of quarter analysis for on-farm monitoring at farms with an automated milking system.HighlightsMilk losses were estimated for treated cases of intramammary infectionsMilk losses were highly variable across cases with a median of 101 kgWe found large differences between infected and non-infected quartersQuantification of milk losses can be the basis for better udder health management