ForHosting KIT · Science

Henderson–Hasselbalch calculator

A buffer with a pKa of 4.76 and equal amounts of conjugate base and acid, 0.1 each, has a pH of 4.76. Enter the pKa and both concentrations, or just their ratio, to get the buffer pH and an acidic or basic label. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Pka
4.76
Conjugate base
0.1
Acid
0.1
You get
PKa
4.76
Ratio
1
Log ratio
0
Ph
4.76

A Henderson–Hasselbalch calculator turns a weak-acid pKa and the ratio of conjugate base to undissociated acid into the buffer pH every chemistry lab and textbook uses. Enter pKa and either both concentrations [A−] and [HA] or the single ratio [A−]/[HA]; the tool returns pH equals pKa plus log base ten of that ratio, a short acidity label—acidic, neutral, or basic—and step-by-step substitution you can copy into a notebook. Homework checks, buffer prep, exam review, and automated graders all need that same closed formula without a spreadsheet or a full aqueous speciation package.

What the Henderson–Hasselbalch equation means for buffers

A buffer is a mixture of a weak acid HA and its conjugate base A− that resists large pH swings when small amounts of strong acid or base are added. For a monoprotic weak acid under the usual dilute aqueous approximations, the Henderson–Hasselbalch equation links buffer pH to the acid strength and the composition of the mixture: pH equals pKa plus the base-ten logarithm of the concentration ratio of conjugate base to acid, written pH equals pKa plus log ten of [A−] over [HA].

When the ratio equals one, the log term is zero and the buffer pH equals the pKa of the weak acid—the classic half-equivalence point of a weak-acid titration. When [A−] exceeds [HA], the ratio is greater than one, the log is positive, and the buffer pH sits above the pKa; when the acid form dominates, the ratio is less than one, the log is negative, and the buffer pH sits below the pKa.

Absolute concentrations cancel in the ratio, so you may work in moles per litre, millimoles per litre, or any other consistent unit as long as both species use the same unit. What never cancels is the requirement that both concentrations be strictly positive: a zero or negative value makes the logarithm undefined or meaningless for a real buffer, so this tool rejects those cases instead of inventing a pH.

Teachers and automated graders care about that rejection as much as the happy path, because a silent NaN would hide a data-entry error. The check path recomputes pKa plus log ten of the published ratio with the same fixed rounding used for the ph field, so a successful response always ships with steps you can assert in tests or lab notebooks.

Related classroom topics such as buffer capacity, polyprotic systems with multiple pKa values, or full charge-balance speciation are intentionally out of scope so this landing stays focused on the single search intent of converting a known pKa and base-to-acid ratio into buffer pH.

Practical tips, limits, and related searches

Keep pKa and the concentration ratio inside the published absolute range so the sum pKa plus log ten of ratio cannot overflow into a non-finite pH the solver must reject. Use consistent concentration units for [A−] and [HA]; if your source reports millimoles per litre for one species and moles per litre for the other, convert before calling rather than mixing unit systems inside one request.

Prefer this capability when you already know pKa and the buffer composition ratio; if your source only has [H+] without a buffer context, use a pH-from-concentration calculator instead. Round-trip intuition is easy: ten to the power of pH minus pKa recovers the original ratio within the same twelve-decimal rounding for typical aqueous buffers, and confirming acidity flips correctly when you move the computed pH across seven on the aqueous scale.

Homework checks for buffer pH

Students enter textbook pKa and [A−]/[HA] values and compare hand-written Henderson–Hasselbalch pH against a deterministic result before submitting.

Lab prep of simple monoprotic buffers

Technicians convert a target composition ratio and known weak-acid pKa into expected buffer pH for acetate, phosphate, or ammonia systems before mixing.

What is the Henderson–Hasselbalch equation?

For a monoprotic weak acid buffer, pH = pKa + log10([A−]/[HA]), where [A−] is the conjugate base concentration and [HA] is the weak acid concentration.

What happens when a concentration is zero or negative?

The logarithm is not defined for a real buffer in that case.

Can I send only the ratio instead of both concentrations?

If you also send both concentrations, those take precedence and the ratio is recomputed from them.

Does this solve polyprotic buffers with multiple pKa values?

No. It applies a single pKa term. For polyprotic systems, choose the relevant pKa for the buffer region you are modelling, or use a full speciation tool.

Is the Henderson–Hasselbalch calculator free?

The browser tool is free and runs locally.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/chem/henderson-hasselbalch

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/chem/henderson-hasselbalch \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pka":4.76}'
{
  "pka": 4.76
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "chem.henderson_hasselbalch",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_abs1000000000000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Zero or non-positive concentrations (or a non-positive ratio) are rejected with a clear invalid_input error so a blank cell or a negative typo never silently produces a non-finite log.

How to call the API and what comes back

When both concentrations and a ratio are present, the concentrations take precedence and the ratio is recomputed from them. Concentrations and ratios at or below one times ten to the minus fifteen are treated as zero and rejected along with any explicit negative. Send a JSON body with one required finite number pka (aliases pKa, pk_a, acid_pka) and a buffer composition in one of two forms. Either provide both conjugate_base (aliases A_minus, base, base_concentration, a_minus, salt) and acid (aliases HA, acid_concentration, ha, weak_acid) as strictly positive concentrations in any consistent unit, or provide ratio (aliases base_to_acid, A_over_HA, salt_to_acid) as the strictly positive quotient [A−]/[HA]. Absolute values must stay within the published limit of one trillion so intermediate results remain finite in IEEE double precision on the Worker and in the browser. On success the response echoes rounded pka and pKa, sets ratio and log_ratio to the rounded base-to-acid ratio and its base-ten log, ph and pH to the same rounded buffer pH, formula to the string pH equals pKa plus log ten of [A−] over [HA], acidity to acidic, neutral, or basic, message to a short English summary, and steps to an ordered array of substitution lines. When concentrations were supplied they are echoed as conjugate_base and acid with unit_concentration set to mol/L as the conventional label. Failed validation—missing pka, missing composition, only one of the two concentrations, non-finite numbers, values outside absolute limits, zero or non-positive concentration or ratio, or a non-finite computed pH—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item and zero marginal unit price. Prefer sending numeric JSON rather than pre-formatted strings when you control the client; string numbers are accepted only when they match a strict finite numeric pattern including optional scientific notation.

Practical tips, limits, and related searches

When teaching, pair classic examples: acetic acid pKa about four point seven six with equal zero point one molar acid and acetate yields ratio one and pH equal to pKa; the same pKa with a ten-to-one base-to-acid ratio raises pH by one unit; a one-to-ten ratio lowers pH by one unit; and a zero acid concentration demonstrates the hard invalid_input path. This landing targets people searching for a Henderson–Hasselbalch calculator, buffer pH from pKa, or conjugate base to acid ratio online; it is not a full titration-curve tool, not a polyprotic speciation solver, and not a pH-from-[H+] converter. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when learners deliberately send zero concentrations.

Unit tests for chemistry helpers

Generate known-good equal-ratio, base-rich, and acid-rich cases plus deliberate zero-concentration rejections for coding kata and grading pipelines.

Read the full KIT documentation →