Home Calculators Categories Category: Science & Engineering

Henderson–Hasselbalch equation calculator

This Henderson–Hasselbalch equation calculator estimates the pH of a buffer from the pKa of its weak acid and the concentrations of the acid and its conjugate base. It can also run the equation backwards: infer a conjugate acid pKa from a measured pH and a known ratio, or find the base-to-acid ratio needed to reach a target pH.

Input
Load sample concentrations and the acid pKa into Simple mode.
Use the acid form’s pKa at the solution temperature.
Equilibrium mol/L of the form with one more proton. The slider uses a logarithmic scale.
mol/L
Equilibrium mol/L of the form with one fewer proton. The slider uses a logarithmic scale.
mol/L
Visual
Composition of the conjugate pair Relative shares of the two forms. Composition of the pair Equal shares at pH = pKa Acid Conjugate base
Output

Henderson–Hasselbalch pH

—

Use equilibrium concentrations in mol/L for one dilute conjugate pair. Use the acid pKa at the solution temperature.

Equation with your values

What the calculator measures

The calculator evaluates one aqueous conjugate acid–base pair at a time. The acid is the proton-donating form, and the conjugate base has one fewer proton. Acetic acid and acetate are a pair. So are ammonium (NH4+\mathrm{NH_4^+}) and ammonia (NH3\mathrm{NH_3}).

It has three tasks, and the conjugate base is always the numerator of the ratio.

Task Mode What you enter Result
Estimate buffer pH Simple Conjugate acid pKa, acid concentration, conjugate base concentration Henderson–Hasselbalch pH
Infer conjugate acid pKa Advanced → Solve for: Conjugate acid pKa Buffer pH, conjugate base per 1 part acid Estimated conjugate acid pKa
Find the ratio for a target pH Advanced → Solve for: Base-to-acid ratio Buffer pH, conjugate acid pKa Conjugate base : acid

The calculator opens in Simple mode with acetate values: pKa 4.76, 0.100 mol/L acid and 0.200 mol/L conjugate base. Only the fields for the active task are visible and used.

The Henderson–Hasselbalch equation

For a buffer, the equation relates pH, pKa, and the ratio of the two forms:

pH=pKa+log⁡10[conjugate base][acid]\mathrm{pH}=\mathrm{p}K_a+\log_{10}\frac{[\text{conjugate base}]}{[\text{acid}]}

Define R=[conjugate base]/[acid]R=[\text{conjugate base}]/[\text{acid}]. RR is dimensionless, and both concentrations refer to the final mixture. Then the three rearrangements the calculator uses are:

Task Equation
pH from pKa and concentrations pH=pKa+log⁡10R\mathrm{pH}=\mathrm{p}K_a+\log_{10}R
pKa from measured pH and a known ratio pKa=pH−log⁡10R\mathrm{p}K_a=\mathrm{pH}-\log_{10}R
Ratio from target pH and known pKa R=10pH−pKaR=10^{\mathrm{pH}-\mathrm{p}K_a}

Three anchor points are worth memorizing:

  • Equal concentrations give R=1R=1, so pH = pKa.
  • A tenfold excess of base gives pH = pKa + 1.
  • A tenfold excess of acid gives pH = pKa − 1.

The equation is sometimes searched under misspellings such as "handerson and hasselbalch equation." It is the same relationship, and the calculator above handles it directly. The "pH pKa equation" is the same idea too: pH and pKa differ only by the logarithm of the base-to-acid ratio.

Deriving the Henderson–Hasselbalch equation

The equation follows from the acid dissociation equilibrium. For HA⇌H++A−\mathrm{HA \rightleftharpoons H^+ + A^-}, the thermodynamic equilibrium constant is written with activities, aa:

Ka=aH+ aA−aHAK_a=\frac{a_{\mathrm{H^+}}\,a_{\mathrm{A^-}}}{a_{\mathrm{HA}}}

Take the negative base-10 logarithm of both sides. With pH=−log⁡10aH+\mathrm{pH}=-\log_{10}a_{\mathrm{H^+}} and pKa=−log⁡10Ka\mathrm{p}K_a=-\log_{10}K_a:

pKa=pH−log⁡10aA−aHA\mathrm{p}K_a=\mathrm{pH}-\log_{10}\frac{a_{\mathrm{A^-}}}{a_{\mathrm{HA}}}

Rearranging gives:

pH=pKa+log⁡10aA−aHA\mathrm{pH}=\mathrm{p}K_a+\log_{10}\frac{a_{\mathrm{A^-}}}{a_{\mathrm{HA}}}

The calculator then makes its one key approximation: it replaces the activity ratio with the concentration ratio, which is reasonable for dilute solutions. That substitution is where the model's limits come from, discussed below.

How to enter the right quantities

Simple mode: estimate buffer pH

  1. Enter the conjugate acid pKa for the acid and dissociation step you are using, at the solution temperature.
  2. Enter the acid concentration and the conjugate base concentration in mol/L. Both must be positive and between 10−1210^{-12} and 10 mol/L.
  3. Read the Henderson–Hasselbalch pH, shown to two decimal places.

If your recipe is in millimolar, divide by 1,000 first. A 50 mM acid is entered as 0.050 mol/L.

Advanced mode: infer pKa

Choose Conjugate acid pKa under Solve for. Enter a measured buffer pH and the conjugate base per 1 part acid. For example, pH 5.76 with a ratio of 10 gives an estimated pKa of 4.76.

Advanced mode: find the ratio for a target pH

Choose Base-to-acid ratio. Enter the buffer pH you want and the conjugate acid pKa. The result is displayed as base relative to 1 part acid, so 1.549 : 1 means 1.549 parts base for every 1 part acid.

The ratio input is a single number. One part base to two parts acid is entered as 0.5, not 1:2. The ratio accepts 10−1810^{-18} through 101810^{18}, and pH and pKa accept −2 through 16.

Worked examples

Acetate buffer (an acidic buffer)

Acetic acid is the weak acid and acetate is its conjugate base. With pKa 4.76, 0.100 mol/L acetic acid, and 0.200 mol/L acetate:

pH=4.76+log⁡100.2000.100=4.76+log⁡102≈5.0610\mathrm{pH}=4.76+\log_{10}\frac{0.200}{0.100}=4.76+\log_{10}2\approx 5.0610

The calculator displays 5.06. The composition bar shows 33.3% acid and 66.7% conjugate base. You can load this from the Buffer examples menu by choosing Acetate buffer.

For an acidic buffer, use the pKa of the acid form and put the concentration of its conjugate base in the numerator. The conjugate base has one fewer proton and can be electrically neutral.

Ammonia buffer (a weak-base buffer)

For a weak base, work with its conjugate acid. In the ammonia buffer, NH4+\mathrm{NH_4^+} is the acid and NH3\mathrm{NH_3} is the conjugate base. The relevant pKa is the pKa of ammonium, 9.25.

With 0.200 mol/L ammonium and 0.100 mol/L ammonia, R=0.5R=0.5:

pH=9.25+log⁡100.1000.200=9.25−log⁡102≈8.949\mathrm{pH}=9.25+\log_{10}\frac{0.100}{0.200}=9.25-\log_{10}2\approx 8.949

The calculator displays 8.95. Choose Ammonia buffer in the examples menu to load it.

If you only know the base's pKb, convert it at the same temperature:

pKa=pKw−pKb\mathrm{p}K_a=\mathrm{p}K_w-\mathrm{p}K_b

The calculator has no pKb input, so do this conversion first and enter the pKa. At 25 °C with pKw=14\mathrm{p}K_w=14, a pKb of 4.75 gives pKa 9.25.

Phosphate buffer

Phosphoric acid dissociates in steps, and each step has its own pKa. Near neutral pH, the relevant pair is the second step: acid H2PO4−\mathrm{H_2PO_4^-} and conjugate base HPO42−\mathrm{HPO_4^{2-}}. The calculator has no reagent selector, so you choose the pair, look up the appropriate pKa for it, and enter that value.

To estimate the phosphate ratio for a target pH of 7.40 using a pKa of 7.21, choose Base-to-acid ratio in Advanced mode:

R=107.40−7.21=100.19≈1.5488R=10^{7.40-7.21}=10^{0.19}\approx 1.5488

The calculator displays 1.549 : 1. The base then makes up R/(1+R)≈60.8%R/(1+R)\approx 60.8\% of the pair, and the acid about 39.2%. For a total of 0.100 mol/L of the two forms, that ratio corresponds to roughly 0.0608 mol/L HPO42−\mathrm{HPO_4^{2-}} and 0.0392 mol/L H2PO4−\mathrm{H_2PO_4^-}. This is an estimate from the concentration model. At that concentration, ionic strength can shift the actual pH, so measure the pH of the prepared solution.

Inferring a pKa from a measurement

Suppose you measured pH 5.76 in a mixture with 10 parts base per 1 part acid. Then:

pKa=5.76−log⁡1010=4.76\mathrm{p}K_a=5.76-\log_{10}10=4.76

Treat this as an estimate. It inherits the concentration approximation and assumes the measured ratio is the equilibrium ratio.

Reading the composition bar and warnings

The composition bar shows the acid share, 1/(1+R)1/(1+R), and conjugate base share, R/(1+R)R/(1+R), as percentages of the two forms. The midpoint marks equal shares, and its pH label is the pKa.

Outside the usual buffer range

This warning appears when ∣log⁡10R∣>1|\log_{10}R|>1, meaning a ratio outside 0.1–10, or a pH more than one unit from pKa. At exactly 0.1 or 10 there is no warning. Beyond that, one form falls below about 9.1% of the pair (1/111/11). Staying inside the window does not guarantee adequate buffer capacity. That depends on the total concentration, which the calculator does not evaluate.

Check the recipe approximation

In Simple mode, the calculator screens whether the inputs could be trusted if they came from a recipe rather than from measured equilibrium concentrations. At 25 °C it assumes pKw=14\mathrm{p}K_w=14 and nonreactive counterions. Using the calculated pH, it estimates the possible shift relative to the smaller entered concentration:

∣10−pH−10pH−14∣min⁡([acid],[conjugate base])\frac{\left|10^{-\mathrm{pH}}-10^{\mathrm{pH}-14}\right|}{\min([\text{acid}],[\text{conjugate base}])}

If this exceeds 0.05, a warning appears. The warning does not change the calculated pH. It tells you the recipe concentrations may not reflect the true equilibrium concentrations. It does not apply to measured equilibrium concentrations and does not run in Advanced mode.

For instance, at pKa 4.76 with equal acid and base concentrations, the screen is triggered at roughly 0.35 mM or below, because the hydrogen ion concentration at pH 4.76 is about 1.7×10−51.7\times10^{-5} mol/L and becomes a large fraction of the smaller concentration. At pKa 4.76 and 10−1210^{-12} mol/L each, the calculator still shows pH 4.76 but flags the recipe warning.

Applications and when the equation applies

The Henderson–Hasselbalch equation is most useful when:

  • You are preparing or checking a buffer from a weak acid and its conjugate base.
  • You want to know what base-to-acid ratio gives a target pH.
  • You want a quick pKa estimate from a pH measurement and a known composition.
  • The solution is dilute, the pair is a single acid–base couple, and the concentrations are close to their equilibrium values.

It is a poor fit when:

  • The solution is extremely dilute, so water's own ionization and the acid's dissociation shift the concentrations.
  • Ionic strength is high, so activities differ appreciably from concentrations.
  • Several dissociation steps overlap, as in polyprotic systems where adjacent pKa values are close.
  • The temperature differs from the one at which your pKa was determined. Use the pKa for the actual solution temperature.

Concentrations in the calculator are limited by software bounds, and the extremes do not establish physical validity. Valid extreme Simple inputs can give algebraic pH values from −15 to 29, and inferred pKa can range from −20 to 34. Those numbers satisfy the arithmetic, but they are not realistic aqueous results.

Adding strong acid or base

If you add strong acid or base to a buffer, first work out the amounts of acid and conjugate base remaining after neutralization. Divide each amount in moles by the final volume in litres. Enter both concentrations and the acid’s pKa in Simple mode to estimate the new pH. The common volume cancels if you calculate the ratio by hand. If either form is exhausted, use a full equilibrium calculation for the remaining solution.

What the calculator does not do

Be clear about the scope when interpreting a result. The calculator has no activity correction, full equilibrium solver, buffer capacity calculation, or model for coupled dissociation steps. It also has no temperature input and no reagent selector. Equal ratios give the same algebraic pH at the same pKa, but the total concentration controls how much acid or base the buffer can absorb. A 0.001 mol/L buffer and a 1 mol/L buffer with the same ratio and pKa give the same Henderson–Hasselbalch pH, yet they resist added acid or base very differently.

Tips for the calculator interface

  • Units: concentrations are in mol/L.
  • Sliders: the concentration and ratio sliders are logarithmic. Use the numeric fields for exact values.
  • Display: pH and pKa show two decimal places. The ratio shows up to four significant digits, switching to scientific notation if the rounded ratio is below 0.001 or at least 10,000. Calculations and warnings use unrounded values.
  • Shared values: switching modes preserves what you entered until you reset, so the pKa field can carry between Simple mode and the Advanced ratio task.
  • Invalid inputs: an invalid active field shows an error, the result becomes an em dash, and the composition graphic is hidden.
  • Reset: restores Simple mode and the initial acetate values.
  • Copy and print: Copy includes the active inputs, result, substituted equation, and any advisory messages. Print / PDF opens your browser's print dialog.

Frequently asked questions

What is the Henderson–Hasselbalch equation?

It is pH=pKa+log⁡10([conjugate base]/[acid])\mathrm{pH}=\mathrm{p}K_a+\log_{10}([\text{conjugate base}]/[\text{acid}]), an approximation that links the pH of a buffer to the pKa of its weak acid and the ratio of the two forms.

Can I use it for a basic buffer?

Yes, by using the pKa of the conjugate acid. For ammonia, use the pKa of NH4+\mathrm{NH_4^+}, with NH4+\mathrm{NH_4^+} as the acid and NH3\mathrm{NH_3} as the base. If you have a pKb, convert it with pKa=pKw−pKb\mathrm{p}K_a=\mathrm{p}K_w-\mathrm{p}K_b at the same temperature.

Why is pH equal to pKa when the concentrations are equal?

Equal concentrations give R=1R=1, and log⁡101=0\log_{10}1=0.

Do I need the volume of my buffer?

Not for the ratio, because a shared final volume cancels. You do need consistent final concentrations if you enter them in Simple mode.

Does a ratio inside 0.1–10 guarantee a good buffer?

No. The range screens how far pH is from pKa. Buffer capacity also depends on the total concentration, which this calculator does not compute.

How do I enter one part base to two parts acid?

Enter 0.5.

Calculation Methodology Documented

Read the formula definitions, supported input ranges, and limitations before using this estimate.

Review Methodology
Debjeet Bhowmick
Author Debjeet Bhowmick AWS Certified Solutions Architect • Cloud & DevOps Consultant

AWS Certified Solutions Architect Professional and Senior Cloud & DevOps Consultant with over 14 years of hands-on expertise architecting resilient cloud infrastructure across AWS, GCP, and Azure. Specializes in infrastructure as code, continuous delivery automation, and telemetry across Terraform, Ansible, Docker, Kubernetes, ELK, Python, and SQL. Creator of OrangeCalc, delivering client-side high-precision computational tools.