A ventilator system for determining respiratory system resistance (R) comprising a flowmeter that measures the flow rate (V) and volume (V) of gas received by a patient;a pressure sensor that measures pressure near the airway of the patient (Paw); and electronic circuitry to receive the Paw, V and V signals and which is also connected to a control system of the ventilator, comprising :- circuitry to generate an output that results in a step decrease (negative pulse) in the pressure and/or flow output of the ventilator during selected inflation cycles;- circuitry to measure Paw, V and V at a point (To) near the beginning of the pulse, at a point (Ti) near the trough of the negative pulse, and at a point preceding To but after the onset of inspiratory effort; and- circuitry to calculate the value of resistance (R) based on the measured values.