The mass of urea in a fluid volume is calculated by performing mass exchange between the fluid volume and an exchange fluid flow. The concentration of the urea is repeatedly measured in the exchange fluid flow after the mass exchange to obtain a concentration curve. An approximation curve is fitted to at least a portion of the concentration curve. The logarithm of the approximation curve is a straight line whose slope is used to calculate the urea concentration.