A computer program for determination of at least one physiological parameter related to the ELV, cardiac output, EPBF and/or the CO2 content of venous blood of a subject from flow and CO2 measurements obtained during mechanical ventilation of said subject by means of a breathing apparatus, the computer program comprising computer readable code which, when executed by a processing unit of the breathing apparatus, causes the breathing apparatus to ventilate the subject using a ventilation pattern comprising at least one phase of decreased ventilation and at least one phase of increased ventilation, wherein each of the phase of decreased ventilation and the phase of increased ventilation comprises at least two breaths during which a level of CO2 expired by said subject assumes a substantially steady state (SS1, SS2), and determine the at least one physiological parameter from flow and CO2 measurements obtained during an analysed sequence of breaths during which the subject is ventilated using said ventilation pattern, effectuate a first change in effective ventilation of the subject in order to initiate a phase of decreased or increased ventilation comprising at least a first breath which differs in duration and/or volume from a preceding breath, for generating a substantial change in the level of expired CO2 compared to the preceding breath, wherein the substantial change in the level of expired CO2, when measured as a fraction of CO2 in expired gas, is at least 0,3 percentage units, characterised in that the code, when executed by said processing unit, further causes the breathing apparatus to effectuate a second change in effective ventilation of the subject within said phase of increased or decreased ventilation, wherein the second change in effective ventilation causes the phase to comprise at least a second breath that is different in duration and/or volume than said first breath and adapted to cause the level of expired CO2 to assume a substantially steady state during at least two consecutive breaths of said phase of decreased or increased ventilation, such that a level of expired CO2, when measured as a fraction of CO2 in expired gas, does not deviate by more than 0,1 percentage units between the consecutive breaths. ventilate the subject using a ventilation pattern comprising at least one phase of decreased ventilation and at least one phase of increased ventilation, wherein each of the phase of decreased ventilation and the phase of increased ventilation comprises at least two breaths during which a level of CO2 expired by said subject assumes a substantially steady state (SS1, SS2), and determine the at least one physiological parameter from flow and CO2 measurements obtained during an analysed sequence of breaths during which the subject is ventilated using said ventilation pattern, effectuate a first change in effective ventilation of the subject in order to initiate a phase of decreased or increased ventilation comprising at least a first breath which differs in duration and/or volume from a preceding breath, for generating a substantial change in the level of expired CO2 compared to the preceding breath, wherein the substantial change in the level of expired CO2, when measured as a fraction of CO2 in expired gas, is at least 0,3 percentage units, characterised in that the code, when executed by said processing unit, further causes the breathing apparatus to effectuate a second change in effective ventilation of the subject within said phase of increased or decreased ventilation, wherein the second change in effective ventilation causes the phase to comprise at least a second breath that is different in duration and/or volume than said first breath and adapted to cause the level of expired CO2 to assume a substantially steady state during at least two consecutive breaths of said phase of decreased or increased ventilation, such that a level of expired CO2, when measured as a fraction of CO2 in expired gas, does not deviate by more than 0,1 percentage units between the consecutive breaths.