In one embodiment, a method for accurate leak estimation in a flow generation system includes measuring a total flow through the flow generation system, measuring a pressure in in the primary flow circuit of the flow generation system, determining when the measured pressure is within a predetermined threshold of EPAP, and calculating an intentional leak flowrate and an unintentional leak flowrate based on the relationship QFS(t)=QIL(t)+QUL(t) when the measured pressure is within the predetermined threshold. In another embodiment, a flow generation system includes in one embodiment an airflow generator connected in-line to a flow sensor, a pressure sensor and a patient interface connection by a first gas flow circuit, and a controller electrically coupled to the airflow generator, the flow sensor and the pressure sensor. The controller sends a control signal to the airflow generator based on a first flow value measured from the flow sensor and an unintentional leak flow value that is derived from a proportional relationship with an intentional leak flow value.