An apparatus for measuring a quantity of milk yielded by an animal during a milking process comprises a container, a supply unit, a discharge unit, a filling level measuring device, a control unit and an evaluation unit. The supply unit is configured to feed milk into the container and can be connected to the milking unit of a milking machine. The discharge unit is configured to discharge milk from the container and can be connected to the milking line of the milking machine, which is adapted to have applied thereto a milking vacuum. The discharge unit comprises the means for changing the size of a discharge opening through which the milk flows when it is being discharged from the container. The discharge opening allowing milk to flow through the discharge opening can be adjusted to at least two sizes. The filling level measuring device is configured to measure a filling level of the milk in the container. The control unit is configured to control the means for changing the size of the discharge opening in dependence on the milk level in the container determined by the filling level measuring device, in order to adjust a size of the discharge opening such that the filling level remains within a predetermined range. The evaluation unit is configured to calculate a milk flow into the container on the basis of the set size of the discharge opening and of the filling level measured by the filling level measuring device.