We examined consistency of the relationship between intramammary infection (IMI) and somatic cell score (SCS) across several classes of cow, herd, and sampling time variables. Microbial cultures of composite milk samples were performed by New York Quality Milk Production Services from 1992 to 2004. SCS was from the most recent Dairy Herd Improvement test before IMI sampling. Records were analyzed from 79,308 cows in 1,124 commercial dairy herds representing a broad range of production systems. Three binary dependent variables were presence or absence of contagious IMI, environmental IMI, and all IMI. Independent variables in the initial models were SCS, SCS2, lactation number, days in milk, sample day milk yield, use of coliform mastitis vaccine, participant type (required by regulation or voluntary), production system (type of housing, milking system, and herd size), season of sampling, year of sampling, and herd; also the initial models included interactions of SCS and SCS2 with other independent variables, except herd and milk yield. Interaction terms characterize differences in the IMI-SCS relationship across classes of the independent variables. Models were derived using the Glimmix macro in SAS (SAS Institute Inc., Cary, NC) with a logistic link function and employing backward elimination. The final model for each dependent variable included all significant independent variables and interactions. Simplified models omitted SCS2 and all interactions with SCS. Interactions of SCS with days in milk, use of coliform mastitis vaccine, participant type, season, and year were not significant in any of the models. Interaction of SCS with production system was significant for the all IMI model, whereas interaction of SCS with lactation number was significant for the environmental and all IMI models. Each 1 point increase in SCS (or doubling of somatic cell count) was associated with a 2.3, 5.5%, and 9.1% increase in prevalence of contagious, environmental, and all IMI, respectively. Empirical receiver operator characteristic curves and areas under the curve were derived for final and simplified models. The areas under the curve for simplified and final models within each type of IMI differed by 0.009 or less. We concluded that the relationship of IMI with SCS was generally stable over time and consistent across seasons, production systems, and cow factors.