🩺
Free global health tool · Reviewed 2026-10-02

ABG Calculator — Anion Gap and pH Arithmetic

Calculate an uncorrected anion gap and Henderson–Hasselbalch pH estimate from labeled laboratory inputs for education, without diagnosis or treatment decisions.

Reviewed by Mohammad QasimMethod and limitations disclosed
Interactive calculatorYour values stay on this device
Ready to calculate

Your result

Click Calculate

Enter your values, then click Calculate result.
Result uses last calculated inputs

How this calculator helps

This ABG calculator supports a limited educational review of acid-base arithmetic. It reports an uncorrected anion gap without potassium and a Henderson–Hasselbalch pH estimate from supplied bicarbonate and arterial carbon dioxide pressure. A measured pH input allows you to compare the calculated estimate with the recorded result. These numbers are not an automated diagnosis, a severity category, a compensation assessment or a treatment recommendation. Acid-base interpretation requires the appropriate sample basis, laboratory methods, history and qualified clinical judgment. The page provides no oxygenation model and does not accept oxygen partial pressure in place of PaCO₂.

How to use it

  1. 1

    Use a teaching dataset or appropriately handled laboratory record and confirm the sample, time and unit basis of every value.

  2. 2

    Enter measured arterial pH and PaCO₂ in mmHg, then bicarbonate, sodium and chloride in mmol/L on a compatible basis.

  3. 3

    Click Calculate result. Review the uncorrected gap, equation estimate and measured-minus-estimated difference as separate quantities.

  4. 4

    Compare with the actual laboratory report and qualified assessment. Do not use the outputs to diagnose, choose treatment or postpone evaluation.

ƒ

Formula and methodology

Uncorrected anion gap = sodium − chloride − bicarbonate, in mmol/L, without potassium or albumin adjustment. Estimated pH = 6.1 + log10[bicarbonate/(0.03 × PaCO₂)], with PaCO₂ in mmHg. Difference = measured pH − estimated pH.

The calculator applies the displayed arithmetic to the values entered on this device. It does not silently load a local tax rate, currency conversion or commercial assumption.

Worked calculation example

For a teaching example with pH 7.40, PaCO₂ 40 mmHg, bicarbonate 24 mmol/L, sodium 140 mmol/L and chloride 104 mmol/L, the anion gap is 12 mmol/L and the equation gives pH about 7.401. This is arithmetic, not a patient classification.

How to interpret your result

Educational arithmetic only, no diagnosis, compensation model, albumin correction or treatment advice. Same-time compatible laboratory basis and stated units required. Editorial source review is not clinician validation. Inputs are processed locally.

For different inputs or formulas, use Molarity Calculator; Adult Blood Pressure Category Calculator; Mean and Standard Deviation Calculator.

Related questions this calculator covers

  • abg calculator

Scenario comparison

ScenarioWhat it shows
Teaching values 140 − 104 − 24 give an uncorrected gap of 12 mmol/L.
Bicarbonate 24 and PaCO₂ 40 give pH about 7.401 under the stated equation.
A measured pH difference is an arithmetic comparison without a clinical cutoff.

Common mistakes to avoid

  • Entering oxygen pressure instead of carbon dioxide pressure.
  • Mixing kPa with a coefficient specified for mmHg.
  • Treating an uncorrected gap or equation estimate as a diagnosis.
How to verify this result

Recalculate the subtraction directly and evaluate the base-ten equation independently. Confirm laboratory units, timestamps and whether bicarbonate was measured or calculated before interpreting agreement with the pH report.

Authoritative reference. Merck Manual Professional acid-base overview explains the anion-gap definition and the need for contextual interpretation; no universal reference range is applied here.

What can affect the result?

Anion gap is a defined subtraction

The displayed gap excludes potassium and does not adjust for albumin. Different formulas and laboratory reference intervals can produce different interpretations, so a single numerical output must not be compared indiscriminately with every published threshold. Sodium and chloride should come from the appropriate chemistry-panel basis, and bicarbonate must be selected consistently for the intended calculation. A normal-looking gap cannot rule out a disorder, and an unusual gap does not identify a cause. This page therefore supplies the subtraction without labeling a clinical category.

Blood gas and chemistry results have different measurement contexts

A blood-gas bicarbonate may be calculated from measured pH and carbon dioxide, while a chemistry-panel total carbon dioxide measurement has a different methodological basis. Reusing a calculated bicarbonate to reconstruct pH can reproduce its source equation rather than provide an independent check. Pairing results from different times or sample types can introduce a discrepancy that reflects the data selection instead of an algebra error. Verify the report’s labels and collection times rather than assuming all values bearing similar names are interchangeable.

Henderson–Hasselbalch requires consistent units

The coefficient 0.03 in this stated educational equation corresponds to the supplied carbon dioxide pressure in mmHg under its physiological approximation. Entering kPa without conversion changes the denominator and produces an invalid estimate. The logarithm is base ten, and the bicarbonate concentration must be positive. PaCO₂ is carbon dioxide pressure, not oxygen pressure or oxygen saturation. The interface’s arithmetic bounds reject certain implausible or singular inputs but are not normal ranges, diagnostic thresholds or approval of any patient value.

The difference output is not a diagnostic test

Measured minus estimated pH is shown so the teaching arithmetic can be examined. Its size can reflect rounding, equation constants, measurement methods, sample differences or inconsistent inputs. The calculator applies no clinically validated discrepancy cutoff and gives no automated interpretation of the sign. It cannot detect all specimen errors, mixed disorders or conditions that require urgent care. A numerical comparison is useful within a qualified review of the actual laboratory context; it is not an independent clearance or a substitute for that review.

What the tool deliberately leaves out

There is no compensation formula, delta-gap classification, albumin correction, base-excess model, oxygenation index or treatment dose in this implementation. Supplying additional outputs without the required inputs and clinical assumptions would imply capabilities the tool does not have. For example, a compensation assessment depends on identifying the relevant primary disturbance and using an applicable physiological model. This bounded calculator instead keeps its two equations visible and reproducible. For a real person, use the clinician’s assessment and laboratory documentation rather than extrapolating from a teaching example.

Privacy and browser processing

Values entered on this page are processed in the current browser session. SolvePilot does not require an account and does not receive the values entered into the calculator. Refreshing or closing the page clears the working values unless the browser itself restores a previous session. Avoid entering identifying or account information because the calculation needs summary values only.

Accuracy and verification

Accuracy depends first on input quality. Confirm definitions, scales, dates and source information before entering a value. Keep an independent record of any result used for planning because this page does not create an official statement or retain a calculation history.

Limits of this estimate

Educational arithmetic only, no diagnosis, compensation model, albumin correction or treatment advice. Same-time compatible laboratory basis and stated units required. Editorial source review is not clinician validation. Inputs are processed locally.

Important: Treat the result as a planning estimate. Confirm official requirements and consequential decisions with the relevant institution, authority or qualified professional.

Sources and review information

This tool uses a disclosed calculation and user-entered values; it does not embed private institutional data or guarantee an outcome.Read our editorial and calculation policy →About the author and reviewer →

Frequently asked questions

Does this ABG calculator diagnose acidosis or alkalosis?+

No. It gives an uncorrected anion-gap subtraction and a pH equation estimate. Diagnosis requires qualified assessment of the measured values, laboratory reference intervals, sample context and clinical situation. No automatic disturbance or severity category is assigned.

Can I enter PaCO₂ in kPa?+

Not directly. The displayed coefficient uses mmHg. Convert with an appropriate verified pressure conversion before entering the value and retain the original laboratory unit in your record. Never substitute PaO₂ or oxygen saturation for carbon dioxide pressure.

Is the anion gap corrected for albumin?+

No. Albumin is not an input, and potassium is excluded. The result must be interpreted against a compatible laboratory method and reference basis. It should not be presented as an adjusted gap or a cause-specific diagnosis.

Why might calculated pH match the report closely?+

If the supplied bicarbonate was itself calculated from the same pH and PaCO₂ relationship, reconstructing pH is not an independent validation. Confirm whether each reported value was measured or derived and whether the samples were obtained at the same time.

Does the result determine treatment or urgency?+

No. The calculator does not prescribe fluids, ventilation, medication or any other intervention and does not assess urgency. For actual symptoms, concerning laboratory results or care decisions, contact the qualified team responsible for evaluating the person.