# Buffer recipe and pH setpoint

`calc_buffer_recipe` is a tool of the Drybench MCP server. It runs the same engine and reporting rules as Drybench Calc.

## What it answers

Computes weighed mass (CIAAW 2021) and preparation pH setpoint (Goldberg 2002 equation 12) for supported buffers (tris, hepes, mops, mes, pipes, phosphate-2, etc.). Refuses open CO2 systems, missing weighed form, out-of-range temperatures, target pH too far from pKa or near overlapping steps, or a mass outside double range.

The reply's result carries these fields (each measured number carries its unit, or a withheld notice when a rule applies):

- `buffer` (object, required)
  - `id` (string, required)
  - `name` (string, required)
  - `reaction` (string, required)
- `form` (string, required)
- `formulaWeight` (number, unit `g/mol`, required)
- `formulaWeightExact` (string, required)
- `mass` (number, unit `g`, required)
- `pKaAtUse` (number, unit `1`, required)
- `pKaAtAdjust` (number, unit `1`, required)
- `setpointPH` (number, unit `pH`, required)
- `concentration` (number, unit `M`, required)
- `volume` (number, unit `L`, required)
- `notes` (array of object, optional)
  - `id` (string, required)
  - `text` (string, required)
- `flags` (array of object, optional)
  - `id` (string, required)
  - `text` (string, required)
  - `paths` (array of string, required)

**Limits:**

- The stock, dilution and buffer calculations here are not for dosing or clinical preparation.
- It computes from the inputs it receives. It does not check the person's data, design or sample.
- Every computed number a reply returns, other than an integer or an exact decimal, is rounded once to 12 significant figures: to the nearest, a change of at most 5 × 10⁻¹² of its value, except that a lower bound is rounded down and an upper bound up, a change of less than 1 × 10⁻¹¹; the method computes, and decides any pass or fail, on the unrounded value.

> Research and education software; not for diagnosis or treatment decisions.
>
> Not medical advice. Nothing here is advice about any medicine, treatment or condition, and nothing here is an assessment of any person's variant, sample or molecule. Decisions made with it are yours.

## What this page can and cannot show

Weakest level among this tool's methods: Checked against a reference. Reference kind not recorded for 3 of 3 methods.

Not fully recorded, and not independently reviewed. Items marked "Not recorded" are missing from this project's records for the version named. Apart from any worked example shown, the cases and their values are not printed, so a reader cannot re-run these checks. No independent scientist has yet reviewed these methods or checks.

[Use it on the web: Buffer recipe with pH at your working temperature](https://www.drybench.com/calculators/buffer-recipe) · [Open Drybench Calc](https://www.drybench.com/calculators/app) · [Drybench Calc: methods and checks](https://www.drybench.com/methods/calculators) · [What the levels mean](https://www.drybench.com/methods/levels) · [Every assistant tool](https://www.drybench.com/methods/tools)

## Inputs

An omitted input takes the default its description states; the reply's `inputsReceived` shows what was given. Any input not listed here is refused.

- `buffer` (string, required): Buffer and ionisation step id (tris, hepes, mops, mes, pipes, phosphate-2, tes, imidazole, ches, taps, glycine-2, citrate-3, acetate, bicine, tricine, citrate-1, citrate-2, bis-tris, glycylglycine-2, borate, ammonia, ethanolamine, triethanolamine, bes, ada-3, caps, capso, dipso, heppso, tapso, succinate-2, maleate-2).
- `form` (string, optional): Molecular formula of exact weighed chemical form including salt and hydrate (e.g. 'Na2HPO4.7H2O').
- `concentration` (object, required): Target final molar concentration.
  - `value` (number, required)
  - `unit` (string, required): One of `M`, `mM`, `uM`, `nM`, `pM`, `fM`, `mol/L`, `µM`, `μM`.
- `volume` (object, required): Target final solution volume.
  - `value` (number, required)
  - `unit` (string, required): One of `L`, `mL`, `uL`, `nL`, `µL`, `μL`.
- `targetPH` (object, required): Target pH at working temperature.
  - `value` (number, required)
  - `unit` (string, required): One of `pH`.
- `useTemperature` (object, required): Working temperature in degC.
  - `value` (number, required)
  - `unit` (string, required): One of `degC`.
- `adjustTemperature` (object, required): Preparation pH-adjustment temperature in degC.
  - `value` (number, required)
  - `unit` (string, required): One of `degC`.

## What it withholds or refuses

A refusal, a withheld value or another named status is an answer: the reply gives the reason and no number in its place; an absent value is not zero. Invalid input means nothing ran.

- `outside-buffer-range`: The target pH is more than one unit from pK at the working temperature. (`buffer-recipe@1.2.2`)
- `overlapping-pk`: Another step of the same substance is within two units of the target. (`buffer-recipe@1.2.2`)
- `no-form`: No weighed form is stated for the buffer. (`buffer-recipe@1.2.2`)
- `amount`: Concentration or volume missing or not positive. (`buffer-recipe@1.2.2`)
- `formula`: The weighed form cannot be read by formula-mass; since 1.2.2, through formula-mass\@1.3.0, a form starting with a digit (13C4H11NO3) among them, which 1.2.1 weighed as 13 × C4H11NO3. (`buffer-recipe@1.2.2`)
- `magnitude`: The mass to weigh is outside the normal range of a double (since 1.2.1: 1.2.0 gave 0 g for 1e-162 M Tris in 2e-162 L, a true 2.42272e-322 g). (`buffer-recipe@1.2.2`)
- `TEMPERATURE_RANGE`: The working temperature falls outside the range covered by the reference data. (`pka-temperature-goldberg@1.1.0`)
- `INVALID_FORMULA`: The formula cannot be read: an unknown or misspelt element; an element with no standard atomic weight (Tc, Pm, Po onward); a count, multiplier or charge starting with 0; a zero count, multiplier or written "+0"/"-0"; a count or weight beyond exact integer range; one element with a count and a bare sign ("Fe3+"), refused as ambiguous with "Fe+3" suggested; a formula starting with a digit ("13CH4", "2H2O"), refused at position 0 since 1.3.0 (1.2.0 read the number as a multiplier of the first part). (`formula-mass@1.3.0`)
- `MISSING_ARGUMENT`: No formula is given. (`formula-mass@1.3.0`)

## How to cite a number from it

Every reply carries a cite line. It names, in order: the tool and the server version; each method the call went through, with its version and level (and the limit beside a level where the method's record narrows it); the receipt, the first 12 characters of the hashes of the arguments and of the result; and the address where its methods are described. Quote it with any number taken from the reply.

The receipt identifies a computation; it is not a signature. It holds no time, so the same arguments on the same server and method versions give the same receipt, and anyone can call the tool again and compare; a later method version can change the output hash.

### An example

The values asked and the values answered, computed by this tool when this page was built:

**Asked with**

- `buffer`: tris
- `form`: C4H11NO3
- `concentration`: 50 mM
- `volume`: 1 L
- `targetPH`: 7.5 pH
- `useTemperature`: 37 °C
- `adjustTemperature`: 25 °C

It answered (`computed`):

- `form`: C4H11NO3
- `formulaWeight`: 121.1 g/mol
- `formulaWeightExact`: 121.136
- `mass`: 6.057 g
- `pKaAtUse`: 7.753
- `pKaAtAdjust`: 8.072
- `setpointPH`: 7.819 pH
- `concentration`: 0.05 M

The reply carries more values than are shown here.

Its cite line:

```cite
calc_buffer_recipe, server 1.0.0; buffer-recipe@1.2.2 (Checked against a reference); pka-temperature-goldberg@1.1.0 (Checked against a reference); formula-mass@1.3.0 (Checked against a reference); receipt ece051d6baa7/fd90e84a08dc; methods https://www.drybench.com/methods/calculators; page https://www.drybench.com/methods/tools/calc-buffer-recipe. Quote this line with any number taken from this reply.
```

## Methods

Every method and reference the tool's replies cite, with its version and level. A reply names the methods that call went through.

### Buffer mass of the exact chemical form and the pH-meter setpoint at the preparation temperature

- **Method:** `buffer-recipe@1.2.2`
- **Level:** Checked against a reference. Reference kind: not recorded. This level uses the apps' wider definition on the levels page.
- **Reference:** m = C × V × M (CIAAW 2021 atomic weights); pH\_set(T\_prep) = pH\_target(T\_work) + pK(T\_prep) − pK(T\_work) with pK(T) from Goldberg, Kishore and Lennen 2002, equation 12, zero ionic strength. Suitability is checked at the working temperature.
- **How it was checked:** Checked against a CIAAW 2021 sum in Python's decimal module and Goldberg's equation 12 in NumPy 2.5.3 on 18 cases, 8 of them refusals: mass to nine significant figures, setpoint within 0.01 pH (10 October 2026). The 17 buffers 1.2.0 adds are checked in Python decimal on 36 cases, 23 of them refused, and their pK at three temperatures, from a third transcription of the paper's table; 21 October 2026.
- What was not checked: The setpoint rests on the fixed-ratio assumption, which no measured data set here tests: no pH-meter reading at either temperature is among the cases. Ionic strength is not applied: the thermodynamic pK differs from the working pK of a real buffer. No published case set names buffer-recipe\@1.2.0 by exact key. No person has worked these cases or read these sources; the reading and checks recorded here were made by AI sessions.
- [Method, sources and checks](https://www.drybench.com/methods/m/buffer-recipe)
- [On Drybench Calc's methods page: Recipe table](https://www.drybench.com/methods/calculators#recipe-table)

### pK at the working temperature

- **Method:** `pka-temperature-goldberg@1.1.0`
- **Level:** Checked against a reference. Reference kind: not recorded. This level uses the apps' wider definition on the levels page.
- **Reference:** Goldberg RN, Kishore N, Lennen RM. Thermodynamic quantities for the ionization reactions of buffers. J Phys Chem Ref Data 2002;31:231-370 (read 6 October 2026). [doi:10.1063/1.1416902](https://doi.org/10.1063/1.1416902)
- **How it was checked:** Checked against Goldberg's equation 12 in NumPy 2.4.6 within 0.01 on 15 buffers at 4, 25 and 37 °C (6 October 2026), and all 34 buffers in exact decimal arithmetic (Python decimal, 50 digits) from a third transcription of the paper's table, within 1e-9 at 4, 25 and 37 °C and the range's ends, every constant equal to the transcription; 21 October 2026.
- What was not checked: All 34 table entries were compared with section 8 of the NIST copy on 11 November 2026 and agree. The paper marks some ΔrCp° values as approximate (≈), for example borate (≈−240) and the pK2 of maleate (≈−31); the table carries them as plain numbers and the reply does not say they are approximate. The paper grades the uncertainty of each ΔrH° (classes A to D); the grades are not carried, so no uncertainty on pK(T) is given. No published case set names pka-temperature-goldberg\@1.1.0 by exact key. No person has worked these cases or read these sources; the reading and checks recorded here were made by AI sessions.
- [Method, sources and checks](https://www.drybench.com/methods/m/pka-temperature-goldberg)
- [On Drybench Calc's methods page: Buffer pKa at temperature](https://www.drybench.com/methods/calculators#buffer-pka-at-temperature)

### Formula weight from the molecular formula

- **Method:** `formula-mass@1.3.0`
- **Level:** Checked against a reference. Reference kind: not recorded. This level uses the apps' wider definition on the levels page.
- **Reference:** Prohaska T et al. Standard atomic weights of the elements 2021 (IUPAC Technical Report). Pure Appl Chem 2022;94:573-600. doi:10.1515/pac-2019-0603; ciaaw.org, read 6 October 2026. [doi:10.1515/pac-2019-0603](https://doi.org/10.1515/pac-2019-0603)
- **How it was checked:** Checked against a CIAAW 2021 sum in Python's decimal module, with the formula from RDKit 2026.03.6, exactly on 58 fixtures (6 October 2026). The refusals and the decimal-dot warning added in 1.2.0 are unit-tested, not checked against an independent reader (10 November 2026).
- What was not checked: No published case set names formula-mass\@1.3.0. The 58 cases of stored reference values (lab-calculators 0.1.0 and 0.2.0) name no method version, and stored reference values (0.11.0) is for formula-mass\@1.1.0; neither is tied to this version yet. The change notes for 1.2.0 and 1.3.0 say every published mass is unchanged (none of those formulas starts with a digit); tying the sets needs a re-run tool-case file under this project's ruling of 11 November 2026, section S6. The 1.3.0 refusal of a formula starting with a digit is unit-tested and has two hand cases (13CH4, 2H2O), not a published case set. The 58 cases' expected values are CIAAW sums in Python's decimal module over formulas taken from RDKit 2026.03.6: RDKit supplied the formula, not the mass. The 1.2.0 refusals and the decimal-dot warning are unit-tested only, not checked against an independent formula reader. The IUPAC 2021 report (Prohaska et al. 2022) was not read: its publisher's site refused a plain request. The table was checked element by element against CIAAW's abridged table page instead, on 11 November 2026: all 84 values agree. No case runs this method through the served tool on its production runtime. No person has worked these cases or read these sources; the reading and checks recorded here were made by AI sessions.
- [Method, sources and checks](https://www.drybench.com/methods/m/formula-mass)
- [On Drybench Calc's methods page: Molarity and stocks](https://www.drybench.com/methods/calculators#molarity-and-stocks)

No independent scientist has yet reviewed these checks. [What the levels mean](https://www.drybench.com/methods/levels).

## Changes to its methods

- [2026-11-25 · buffer-recipe\@1.2.2](https://www.drybench.com/methods/corrections#2026-11-25-buffer-recipe122-1)
- [2026-11-25 · formula-mass\@1.3.0](https://www.drybench.com/methods/corrections#2026-11-25-formula-mass130-1)

## Where it runs

**Hosted here.** The hosted MCP connection serves this tool, as does the local MCP server. The hosted connection can be paused, or a tool withheld from it, at any time; its own refusals (413, a request too large; 429, too many requests; 503, the service unavailable) are not the tool's answers and carry no receipt.

## Methods and checks

- [Drybench Calc: methods and checks](https://www.drybench.com/methods/calculators)
- [Reference checks: Drybench Calc](https://www.drybench.com/methods/calculators/checks)
- [What the levels mean](https://www.drybench.com/methods/levels)
- [Every assistant tool](https://www.drybench.com/methods/tools)
