Systematic factors affecting the activities of L-lactate dehydrogenase (LDH) and N-acetyl-β-D-glucosaminidase (NAGase) and somatic cell count (SCC), the association between the activities of LDH and NAGase and SCC with respect to udder health status, and the ability of LDH and NAGase to classify cows in udder health categories for early detection of mastitis were studied. A dataset of records from 74 Danish Holstein, 76 Danish Red and 47 Jersey cows on one research farm was used. Cows were grouped into healthy and clinically mastitic. A healthy cow was defined as having no veterinary treatment and SCC<100000 cells/ml. A clinically infected cow was one receiving veterinary treatment after showing clinical signs of mastitis and SCC >800000 cells/ml. Breed, month of production, and days in milk significantly influenced (P<0·001) LDH activity, NAGase activity and SCC in both healthy and clinically mastitic cows. In healthy cows, LDH activity, NAGase activity and SCC started at a high level immediately after calving and decreased to low levels approximately 30–40 d post partum. All the three parameters increased due to clinical mastitis. NAGase activity had numerically higher variation in healthy cows than in clinically mastitic cows (CV=56·2% v. CV=53·5%). The relationship between LDH activity and SCC was stronger in milk from clinically mastitic than from healthy cows (r=0·76 v. r=0·48 and r=0·67 v. r=0·44 for correlation of observed values and residuals, respectively). LDH activity had higher sensitivity than NAGase activity (73–95% v. 35–77%) while specificities were in a similar range (92–99%). Further, sensitivities for LDH activity were more robust to changes in the threshold value than those for NAGase activity. Opportunities for automated, in-line real-time mastitis detection are discussed.