The invention relates to a method for collecting milk in a milk tank. The method comprises the steps of: milking a milking animal of a herd of milking animals by means of a milking station establishing a quality parameter for the milk obtained from the milking animal during the milking estimating a quality level of the total amount of milk in a milk tank connected to the milking station, wherein the estimation is based at least on the quality parameter and collecting, in the milk tank, the milk obtained from the step of milking if the result from the estimation indicates that the quality of the total amount of milk in the milk tank would then result in a desired quality level. The invention also relates to computer program products and a milking system.