Shunt equation
The Shunt equation (also known as the Berggren 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 , to the content of oxygen in venous, arterial, and pulmonary capillary blood.

   
Where:
Qs = Pulmonary Physiologic Shunt (mL/min)
Qt = Cardiac Output (mL/min)
CCO2 = End-pulmonary-capillary Oxygen Content
CaO2 = Arterial oxygen content
CVO2 = Mixed Venous Oxygen Content

Derivation 
The blood entering the pulmonary system will have oxygen flux , where  is oxygen content of the venous blood and  is the total cardiac output.

Similarly, the blood emerging from the pulmonary system will have oxygen flux , where  is oxygen content of the arterial blood.

This will be made up of blood which bypassed the lungs () and blood which went through the pulmonary capillaries ().
We can express this as 

.

We can solve for :

.

If we add the oxygen content of Qs to Qc we get the oxygen content of Qt:

     Substitute Qc as above, CCO2 is the oxygen content of pulmonary alveolar capillary blood (i.e. End-pulmonary-capillary Oxygen Content).

Multiply out the brackets.
Get the Qs terms and the Qt terms on the same side.

Factor out the Q terms.

    Divide by Qt and by (CCO2 - CVO2).

Shunt calculation (Qp:Qs ratio) using the Fick principle 
The above equation requires measurement of the end-pulmonary-capillary oxygen content (CcO2) which is difficult to obtain and it is assumed to be equal to the alveolar oxygen content. This is based on the assumption that, if an alveolus is receiving air, then it is perfectly oxygenated. The following equation, provides the ratio of the pulmonary blood flow divided by the systemic blood flow and relates to any type of shunt (intracardiac or extracardiac) using variables that can be easily attained in a cardiac catheterization laboratory. Note that the abbreviations are different from the aforementioned equation to reflect the most widely used terminology in cardiovascular medicine.

Where:
Qp = Pulmonary flow (mL/min)
Qs = Systemic flow (mL/min)
PA02 = Pulmonary Artery oxygen saturation (measured directly)
MV02 = Mixed Venous oxygen saturation before the shunt (calculated from the inferior and superior vena cava saturation using the Flamm formula). Note that, since we may have an intracardiac shunt, the PA02 may not the same as the MV02
PV02 = Pulmonary Vein oxygen saturation (measured directly with wedge saturation)

Derivation 
Based on the Fick principle:

 

By applying the Fick principle for the systemic and pulmonary flow, we can calculate the Qs and Qp as follows:

Qs = systemic oxygen consumption / (Pulmonary Vein oxygen content - Mixed Venous oxygen content)

Qp = pulmonary oxygen consumption / (Pulmonary Artery oxygen content - Pulmonary Vein oxygen content)

The pulmonary oxygen consumption is the net effect of the oxygen that the lung provides to the blood from the atmosphere minus the oxygen that is consumed by the lungs to keep them functional. Since all our oxygen is provided to our body form our lungs, the systemic oxygen consumption is the opposite number of the pulmonary oxygen consumption. We can formulate this as follows:

pulmonary oxygen consumption = -1 * systemic oxygen consumption

In the Qp formula above, let us substitute pulmonary oxygen consumption for systemic oxygen consumption:

Qp = pulmonary oxygen consumption / (Pulmonary Artery oxygen content - Pulmonary Vein oxygen content) = -1 * systemic oxygen consumption / (Pulmonary Artery oxygen content - Pulmonary Vein oxygen content) <=>

Qp = systemic oxygen consumption / (Pulmonary Vein oxygen content - Pulmonary Artery oxygen content)

Now we can divide Qp/Qs and the equation simplifies as the systemic oxygen consumption term cancels out:

Oxygen content is difficult to measure but we can easily measure oxygen saturation. Using the fact that each gram of hemoglobin can carry 1.34 mL of O2, the oxygen content of the blood (either arterial or venous) can be estimated by the following formula:PO2 is the partial pressure of oxygen and reflects the amount of oxygen gas dissolved in the blood. The term 0.0032 * P02 in the equation is very small and therefore negligible. In other words, very little oxygen is transferred diluted in the blood; the vast majority of oxygen is carried by hemoglobin. This term can be omitted and the oxygen content of blood equation simplifies into the following:

Oxygen content of blood =  [Hb](gr/dl) * 1.34(ml02/gr of Hb) * Oxygen saturation

Let's call the [Hb](gr/dl) * 1.34(ml02/gr of Hb) a constant variable x, therefore:

Mixed Venous oxygen content = [Hb](gr/dl) * 1.34(ml02/gr of Hb) * MV02 = x * MV02

Pulmonary artery oxygen content = [Hb](gr/dl) * 1.34(ml02/gr of Hb) * PA02 = x * PA02

Pulmonary vein oxygen content = [Hb](gr/dl) * 1.34(ml02/gr of Hb) * PV02 = x * PV02

Using the above, we can substitute the oxygen content with oxygen consumption in the Qp / Qs formula as follows:

Qp / Qs = (Pulmonary Vein oxygen content - Mixed Venous oxygen content) / (Pulmonary Vein oxygen content - Pulmonary Artery oxygen content) <=>

Qp / Qs = (x * PV02 - x * MV02) / (x * PV02 - x * PA02) <=>

Qp / Qs = [x * (PV02 - MV02)] / [x * (PV02 - PA02)] <=>

Qp / Qs = (PV02 - MV02) / (PV02 - PA02)

Echocardiographic shunt calculation 
In echocardiography, we can measure the Velocity Time Integral (VTI). This is a clinical Doppler ultrasound measurement of blood flow, equivalent to the area under the velocity time curve. Based on the Bernoulli equation for incompressible fluids, the product of VTI (cm/stroke) and the cross sectional area of any cardiac structure (cm2) yields a stroke volume (cm3/stroke), which can be used to calculate cardiac output.

Qp = VTIRVOT × π × (dRVOT / 2)² <=> Qp = VTIRVOT × 0.785 × dRVOT²

Qs = VTILVOT × π × (dLVOT / 2)² <=> Qs = VTILVOT × 0.785 × dLVOT²

Where:

dRVOT - Right ventricular outflow tract diameter

VTIRVOT - Velocity time integral of the right ventricular outflow tract before the pulmonary valve

dLVOT - Left ventricular outflow tract diameter

VTILVOT - Velocity time integral of left ventricular outflow tract before the aortic valve

π – The constant π as, for ease of calculations, we theorize that the cross sectional area is almost circular

Based on the above, a shunt can be quantified by measuring the flow ratio of the pulmonary cardiac output (Qp) to the systemic cardiac output (Qs).

Qp/Qs = (VTIRVOT × 0.785 × dRVOT²) / (VTILVOT × 0.785 × dLVOT²) <=>

Qp/Qs = (VTIRVOT × dRVOT²) / (VTILVOT × dLVOT²)

See also 
 Pulmonary shunt
 Ventilation/perfusion ratio
 Pulmonary contusion

References 

Physiology