The economic weights for somatic cell score (SCS) have been calculated using profit functions. Economic data were collected in the Latxa breed. Three aspects have been considered: bulk tank milk payment, veterinary treatments due to high SCS, and culling. All of them are non-linear profit functions. Milk payment is based on the sum of the log-normal distributions of somatic cell count, and veterinary treatments on the probability of subclinical mastitis, which is inferred when individual SCS surpass some threshold. Both functions lead to non-standard distributions. The derivatives of the profit function were computed numerically. Culling was computed by assuming that a conceptual trait culled by mastitis (CBM) is genetically correlated to SCS. The economic weight considers the increase in the breeding value of CBM correlated to an increase in the breeding value of SCS, assuming genetic correlations ranging from 0 to 0.9. The relevance of the economic weights for selection purposes was checked by the estimation of genetic gains for milk yield and SCS under several scenarios of genetic parameters and economic weights. The overall economic weights for SCS range from − 2.6 to − 9.5 € per point of SCS, with an average of − 4 € per point of SCS, depending on the expected average SCS of the flock. The economic weight is higher around the thresholds for payment policies. Economic weights did not change greatly with other assumptions. The estimated genetic gains with economic weights of 0.83 € per l of milk yield and − 4 € per point of SCS, assuming a genetic correlation of − 0.30, were 3.85 l and − 0.031 SCS per year, with an associated increase in profit of 3.32 €. This represents a very small increase in profit (about 1%) relative to selecting only for milk yield. Other situations (increased economic weights, different genetic correlations) produced similar genetic gains and changes in profit. A desired-gains index reduced the increase in profit by 3%, although it could be greater depending on the genetic parameters. It is concluded that the inclusion of SCS in dairy sheep breeding programs is of low economic relevance and recommended only if recording is inexpensive or for animal welfare concerns.