anion gap test, a calculation used to help identify the causes of metabolic acidosis, most of which are associated with an increased anion gap. The most commonly used formula is Anion Gap (AG) = Sodium – (Chloride + Bicarbonate [total CO2]). See also anion gap.