Prevalence of mastitis pathogens in milk samples from dairy cows and heifers was studied over a period of 1 year (Aug 2005–Aug 2006) in ten dairy herds in Germany. Milk samples (n=8240) were collected from heifers without clinical mastitis at parturition (n=6915), from primiparous cows with clinical mastitis (n=751) and from older cows with clinical mastitis (n=574). Coagulase negative staphylococci (CNS) were the predominant group of bacteria isolated (46·8% of samples) from clinically healthy quarters of primiparous cows around parturition, followed by streptococci (12·6%), coliforms (4·7%) and Staphylococcus aureus (4·0%). Thirty-three percent of samples were negative on culture (range on farm level, 12·0–46·4%). In cases of clinical mastitis in primiparous and older cows, streptococci were the predominant finding (32·1 and 39·2%) followed by CNS (27·4 and 16·4%), coliforms (10·3 and 13·1%) and Staph. aureus (10·0 and 11·7%). Negative results were obtained from 21·3% (range, 0·0–30·6%) and 19·5% (range, 0·0–32·6%) of these samples. Results indicated substantial differences in the prevalence of pathogens among herds. There was a positive within-herd correlation between the monthly prevalences for Streptococcus dysgalactiae between the three groups of samples. This correlation was also found between clinical samples of primiparous and older cows for Staph. aureus. These correlations were not found for the other pathogens. Besides herd, prevalence of pathogens was influenced by parity, type of sample and season.