The disclosure relates to a dialysis machine that comprises a dialyzer, a fluid source, a first line connected to the fluid source, and a container containing bicarbonate. The container connects to the first line and the fluid flows from the fluid source, through the first line, to the container. The dialysis machine further includes a second line connected to the container, a flow rate sensor connected to at least one of the lines, a pressure sensor configured for detecting fluid pressure of the container, a display, and a data processing apparatus. The data processing apparatus is configured to receive signals from the flow rate sensor and the pressure sensor. The data processing apparatus is configured to calculate a size of the container based on the received signals.