Systems and methods for estimating a leak flow in a breathing assistance system (10) including a ventilation device (22,50) connected to a patient (24) are provided. Data of a flow waveform indicating the flow of gas between the ventilation device and the patient is accessed. A specific portion of the flow waveform is identified, and a linear regression of the identified portion of the flow waveform is performed to determine an estimated leak flow in the breathing assistance system.