The main objective of this study was to compare the performance of different ‘nonlinear quantile regression’ models evaluated at the τth quantile (0·25, 0·50, and 0·75) of milk production traits and somatic cell score (SCS) in Iranian Holstein dairy cows. Data were collected by the Animal Breeding Center of Iran from 1991 to 2011, comprising 101 051 monthly milk production traits and SCS records of 13 977 cows in 183 herds. Incomplete gamma (Wood), exponential (Wilmink), Dijkstra and polynomial (Ali & Schaeffer) functions were implemented in the quantile regression. Residual mean square, Akaike information criterion and log-likelihood from different models and quantiles indicated that in the same quantile, the best models were Wilmink for milk yield, Dijkstra for fat percentage and Ali & Schaeffer for protein percentage. Over all models the best model fit occurred at quantile 0·50 for milk yield, fat and protein percentage, whereas, for SCS the 0·25th quantile was best. The best model to describe SCS was Dijkstra at quantiles 0·25 and 0·50, and Ali & Schaeffer at quantile 0·75. Wood function had the worst performance amongst all traits. Quantile regression is specifically appropriate for SCS which has a mixed multimodal distribution.