Home › Chemistry › Henderson–Hasselbalch Calculator
Henderson–Hasselbalch Calculator
Computes the pH of a buffer from the acid's pKa and the concentrations (or ratio) of conjugate base and weak acid with the Henderson–Hasselbalch equation, or the base/acid ratio required for a target pH.
When to use
You are preparing or analysing a buffer and need its pH from pKa and composition, or the acid-to-base ratio that gives a chosen pH.
Do not use when: The solution is a strong acid or base (use ph), the buffer is very dilute (below about 1 mM) or the pH is more than about 1.5 units from pKa, where the approximation breaks down.
Formula
pH = pKa + log10([A⁻] / [HA]); ratio = [A⁻]/[HA] = 10^(pH − pKa); base_percent = 100 × ratio / (1 + ratio)
Valid when both buffer components are much more concentrated than [H⁺] and [OH⁻] and activity coefficients are close to 1; for accurate work use the pKa at the working temperature and ionic strength.
Inputs
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
pka | number | yes | Acid dissociation constant exponent of the weak acid (e.g. acetic acid 4.76, H2PO4⁻ 7.21, NH4⁺ 9.25, carbonic acid in blood 6.1). Range: ≥ -10, ≤ 25 | |
base_concentration | number | no | Concentration of the conjugate base (e.g. acetate), in any unit shared with acid_concentration. Range: > 0 | |
acid_concentration | number | no | Concentration of the weak acid (e.g. acetic acid), same unit as base_concentration. Range: > 0 | |
ratio_base_to_acid | number | no | Base-to-acid ratio; alternative to giving both concentrations. Range: > 0 | |
ph | number | no | When given, the calculator solves for the [A⁻]/[HA] ratio that produces this pH instead of computing pH. Range: ≥ -2, ≤ 16 |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
ph | number | Buffer pH = pKa + log10([A⁻]/[HA]). | |
ratio_base_to_acid | number | Conjugate base to weak acid ratio, given or solved. | |
log_ratio | number | pH − pKa. | |
base_percent | number | % | Share of the pair present as conjugate base: 100 × ratio / (1 + ratio). |
acid_percent | number | % | Share present as undissociated acid. |
base_concentration | number | Conjugate base concentration (when known or derivable from acid_concentration and the ratio). | |
acid_concentration | number | Weak acid concentration (when known or derivable from base_concentration and the ratio). | |
buffer_range | string | pKa ± 1, the range in which the buffer resists pH change effectively. | |
solved_for | string | ph or ratio_base_to_acid. |
Example
Acetate buffer 0.2 M acetate / 0.1 M acetic acid: {"pka":4.76,"base_concentration":0.2,"acid_concentration":0.1} → {"ph":5.061,"ratio_base_to_acid":2,"log_ratio":0.301,"base_percent":66.67,"buffer_range":"3.76 – 5.76","solved_for":"ph"}
Bicarbonate ratio at blood pH 7.4: {"pka":6.1,"ph":7.4} → {"ratio_base_to_acid":19.953,"log_ratio":1.3,"base_percent":95.23,"acid_percent":4.77,"solved_for":"ratio_base_to_acid"}
GET https://tttkmbb.com/api/v1/calculate/henderson-hasselbalch?pka=4.76&base_concentration=0.2&acid_concentration=0.1
Machine access
- API:
GET https://tttkmbb.com/api/v1/calculate/henderson-hasselbalch(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/henderson-hasselbalch · Markdown: https://tttkmbb.com/chemistry/henderson-hasselbalch.md · JSON definition: https://tttkmbb.com/chemistry/henderson-hasselbalch.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="henderson-hasselbalch" - OpenAPI operationId:
calculate_henderson_hasselbalch_ph - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
- OpenStax Chemistry 2e – 14.6 Buffers (textbook)
- Wikipedia – Henderson–Hasselbalch equation (reference)
FAQ
Do I need molar concentrations?
No. Only the ratio matters, so moles, mmol or any concentration unit work as long as both components use the same unit.
Why does my measured pH differ from the calculated value?
pKa shifts with temperature and ionic strength, and the equation ignores activity coefficients; deviations of 0.1–0.2 pH units are common in concentrated buffers.
Related calculators
- pH Calculator — pH of strong acids and bases without a buffer.
- Molarity Calculator — Prepare the acid and base components at the required concentrations.
- Logarithm Calculator — log10 arithmetic used in the equation.