Shunt equation

The Shunt equation quantifies the extent to which venous blood bypasses oxygenation in the capillaries of the lung.
“Shunt” and “dead space“ are terms used to describe conditions where either blood flow or ventilation do not interact with each other in the lung, as they should for efficient gas exchange to take place. These terms can also be used to describe areas or effects where blood flow and ventilation are not properly matched, though both may be present to varying degrees. Some references refer to “shunt-effect” or “dead space-effect” to designate the ventilation/perfusion mismatch states that are less extreme than absolute shunt or dead space.
The following equation relates the percentage of blood flow that is not exposed to inhaled gas, called the shunt fraction formula_1, to the content of oxygen in venous, arterial, and pulmonary capillary blood. 
Derivation.
The blood entering the pulmonary system will have oxygen flux formula_3, where formula_4 is oxygen content of the venous blood and formula_5 is the total cardiac output.
Similarly, the blood emerging from the pulmonary system will have oxygen flux formula_6, where formula_7 is oxygen content of the arterial blood.
This will be made up of blood that bypassed the lungs (formula_8) and that which went through the pulmonary capillaries (formula_9).
We can express this as 
formula_10.
We can solve for formula_9:
formula_12.
If we add the oxygen content of Qs to Qc we get the oxygen content of Qt:
formula_13 Substitute Qc as above, CcO2 is the oxygen content of pulmonary (alveolar) capillary blood.
formula_14Multiply out the brackets.
formula_15Get the Qs terms and the Qt terms on the same side.
formula_16Factor out the Q terms.
formula_17 Divide by Qt and by (CcO2 - CvO2).