Device for the optical, non-invasive determination of a concentration of constituents in a flexible container, wherein the device comprises - a light source that is configured to irradiate light onto the flexible container so that light irradiates through the flexible container, - a mechanical arrangement that is designed to change a distance between two walls of the flexible container in the area of a measuring field during a measurement in a defined manner so that a path length of the light irradiated through the constituents in the flexible container can be changed, - at least one detector, wherein the detector is designed to carry out measurements to record an intensity attenuation of the light irradiated from the light source onto the flexible container and light irradiated through it with different radiation-through path lengths through the constituents in the flexible container for each concentration of a constituent to be recorded at at least one wavelength or a wavelength range which is absorbed by the constituents more strongly than by unknown attenuations, - a calculating unit, wherein the calculating unit is designed to eliminate an influence of the specifically present container wall through quotient formation of the measuring data recorded by the detector at the different radiation-through path lengths through the constituents in the flexible container, wherein the calculating unit is also designed evaluate the measuring data using a response function R which calculates the concentration of constituents to be determined from the measuring data recorded by the detector, characterised in that the response function R is produced by way of a linear or non-linear regression from calibration measurements with the inclusion of the quotient formation. - a light source that is configured to irradiate light onto the flexible container so that light irradiates through the flexible container, - a mechanical arrangement that is designed to change a distance between two walls of the flexible container in the area of a measuring field during a measurement in a defined manner so that a path length of the light irradiated through the constituents in the flexible container can be changed, - at least one detector, wherein the detector is designed to carry out measurements to record an intensity attenuation of the light irradiated from the light source onto the flexible container and light irradiated through it with different radiation-through path lengths through the constituents in the flexible container for each concentration of a constituent to be recorded at at least one wavelength or a wavelength range which is absorbed by the constituents more strongly than by unknown attenuations, - a calculating unit, wherein the calculating unit is designed to eliminate an influence of the specifically present container wall through quotient formation of the measuring data recorded by the detector at the different radiation-through path lengths through the constituents in the flexible container, wherein the calculating unit is also designed evaluate the measuring data using a response function R which calculates the concentration of constituents to be determined from the measuring data recorded by the detector, characterised in that the response function R is produced by way of a linear or non-linear regression from calibration measurements with the inclusion of the quotient formation. wherein the calculating unit is also designed evaluate the measuring data using a response function R which calculates the concentration of constituents to be determined from the measuring data recorded by the detector, characterised in that the response function R is produced by way of a linear or non-linear regression from calibration measurements with the inclusion of the quotient formation. <EOS>