Lactoferrin (LTF) is a milk glycoprotein favorably associated with the immune system of dairy cows. Somatic cell count is often used as an indicator of mastitis in dairy cows, but knowledge on the milk LTF content could aid in mastitis detection. An inexpensive, rapid and robust method to predict milk LTF is required. The aim of this study was to develop an equation to quantify the LTF content in bovine milk using mid-infrared (MIR) spectrometry. LTF was quantified by enzyme-linked immunosorbent assay (ELISA), and all milk samples were analyzed by MIR. After discarding samples with a coefficient of variation between 2 ELISA measurements of more than 5% and the spectral outliers, the calibration set consisted of 2499 samples from Belgium (n = 110), Ireland (n = 1658) and Scotland (n = 731). Six statistical methods were evaluated to develop the LTF equation. The best method yielded a cross-validation coefficient of determination for LTF of 0.71 and a cross-validation standard error of 50.55 mg/l of milk. An external validation was undertaken using an additional dataset containing 274 Walloon samples. The validation coefficient of determination was 0.60. To assess the usefulness of the MIR predicted LTF, four logistic regressions using somatic cell score (SCS) and MIR LTF were developed to predict the presence of mastitis. The dataset used to build the logistic regressions consisted of 275 mastitis records and 13 507 MIR data collected in 18 Walloon herds. The LTF and the interaction SCS × LTF effects were significant (P < 0.001 and P = 0.02, respectively). When only the predicted LTF was included in the model, the prediction of the presence of mastitis was not accurate despite a moderate correlation between SCS and LTF (r = 0.54). The specificity and the sensitivity of models were assessed using Walloon data (i.e. internal validation) and data collected from a research herd at the University of Wisconsin – Madison (i.e. 5886 Wisconsin MIR records related to 93 mastistis events – external validation). Model specificity was better when LTF was included in the regression along with SCS when compared with SCS alone. Correct classification of non-mastitis records was 95.44% and 92.05% from Wisconsin and Walloon data, respectively. The same conclusion was formulated from the Hosmer and Lemeshow test. In conclusion, this study confirms the possibility to quantify an LTF indicator from milk MIR spectra. It suggests the usefulness of this indicator associated to SCS to detect the presence of mastitis. Moreover, the knowledge of milk LTF could also improve the milk nutritional quality.