A method of determining whether a milking animal has mastitis is disclosed. It has been found that a decrease in oxygen levels in milk is related to an increase in the somatic cell count (SCC) levels, which is probably due to the neutrophils using oxygen and not the mammary secretary cells. Once the SCC level rises above a certain threshold (which is derived from oxygen readings) it is considered that most oxygen will be used up the neutrophils. Thus, by using this information and historical oxygen readings, it will be possible to determine the threshold at which an infection (mastitic condition) occurs. This is of considerable advantage from a management of herd treatment. The method has the steps of a) measuring on-line the level of oxygen within milk passing through the milking system at a point sufficiently close to the animal to reduce potential contamination of the milk with oxygen in the system and b) determining the mastitic condition of the animal using historical data including at least one previously measured oxygen level in combination with the oxygen level measurement from a).