Device constructed for measuring the stack height or thickness of a print medium by means of measurement of charge times of a measuring capacitor, comprising: - the measuring capacitor with a first plate constructed for reception of print media, the first plate being connected with the reference potential, and with a second plate, - a measuring circuit, with a measuring amplifier with an output and a measuring resistor and the measuring capacitor, wherein the measuring resistor and the measuring capacitor form a first RC element, - a comparator having a first input and an output, wherein the first input of the comparator is connected with the output of the measuring amplifier, and - a control unit, which is connected with the output of the comparator and, by means of a first output, with the first RC element, wherein the control unit acts at a first instant by a charging current on the first RC element by means of the first output and wherein the control unit is arranged to detect the first voltage change arising at the output of the comparator at a second instant and to determine a charging time from the difference of the first instant and the second instant, characterised in that the comparator has a second input, which is connected with the control unit, and a first reference voltage (UREF1) is applied by means of the control unit to the second input during application of the charging current, and the RC element is acted on by a discharging current at a third instant by means of the control unit and during application of the discharging current a second reference voltage (UREF2) is applied to the second input by means of the control unit and the second voltage change arising at the output of the comparator at a fourth instant is detected by means of the control unit and a discharging time is determined from the difference of the third instant and the fourth instant, and a first correction variable is determined from the ratio of the charging time and the discharging time in order to correct the charging time and/or the discharging time by means of the first correction variable and the stack height or the thickness of the print medium is determined from a comparison of the corrected charging time and/or discharging time and a stored reference time. - the measuring capacitor with a first plate constructed for reception of print media, the first plate being connected with the reference potential, and with a second plate, - a measuring circuit, with a measuring amplifier with an output and a measuring resistor and the measuring capacitor, wherein the measuring resistor and the measuring capacitor form a first RC element, - a comparator having a first input and an output, wherein the first input of the comparator is connected with the output of the measuring amplifier, and - a control unit, which is connected with the output of the comparator and, by means of a first output, with the first RC element, wherein the control unit acts at a first instant by a charging current on the first RC element by means of the first output and wherein the control unit is arranged to detect the first voltage change arising at the output of the comparator at a second instant and to determine a charging time from the difference of the first instant and the second instant,