A programmable calculator program calculates loss of milk yield in dairy cows based on linear somatic cell count scores. The program displays the distribution of the herd by lactation number and linear score for present and optimal goal situations. Loss of yield is in pounds and dollars by cow and herd. The program estimates optimal milk production and numbers of fewer cows at the goal for mastitis infection.