This disclosure describes systems and methods for detecting disconnect conditions in a ventilator. The disclosure describes a model-based enhancement to conventional disconnect detection. The methods and systems described herein compensate for the additional leakage that occurs due to inelastic and elastic leaks in the ventilation system. One method described includes calculating the actual leakage from the ventilation system including leaks from elastic leakage and inelastic leakage based on measurements of pressure and flow in the ventilation system for a breath and then comparing this leakage to a calculated hypothetical maximum allowable leakage determined based on an operator-selected maximum allowable leakage and the measurements of pressure for the same breath. Disconnection is assumed if the actual leakage is greater than the maximum allowable leakage.