# Stock to add to reach a target concentration, or two stocks blended to it

`calc_mix_to_target` · Runs: On the server · Level: Checked against a reference: exact rational arithmetic, against a second implementation in Python by a separate agent of the same model family

Works out the stock volume to add, or two stock volumes to blend, to reach a target concentration.

Research and education software; not medical advice, and not for diagnosis or treatment decisions. It computes from the inputs it receives. It does not check the person's data, design or sample.

[Catalogue](https://www.drybench.com/mcp/catalogue) / [Solutions](https://www.drybench.com/mcp/catalogue/solutions)

[Ask your assistant](https://www.drybench.com/mcp/connect)

```cite
Stock to add to reach a target concentration, or two stocks blended to it (calc_mix_to_target), Drybench MCP server 1.0.0; calc-mix-to-target@1.0.1 (Checked against a reference); https://www.drybench.com/mcp/tools/calc-mix-to-target
```

## What it is

Returns the stock volume to add, or two stock volumes to blend, to reach a target concentration. The solution being topped up may already hold the solute. Use when topping up a medium, feeding a culture to a target or blending two buffer strengths, with every concentration on one basis. Volumes are taken as additive. Not for a diluent with no solute, or for making up to a mark: use \`calc\_c1v1\`.

Field: [Solutions and bench arithmetic](https://www.drybench.com/mcp/catalogue/solutions).

## What it does

**You give**

- `task` (required): addStock: stock added to a solution already holding the solute; blendStocks: two stocks blended to a final volume.
- `targetConcentration` (required): Target concentration, on the same basis as the others. Given as amount-concentration or mass-concentration; no conversion between them is assumed. Must be at least 0 M. Must be at least 0 g/L.
- `initialVolume`: addStock: volume of the solution already present. Must be above 0 mL. Optional.
- `initialConcentration`: addStock: concentration of the solution already present. Given as amount-concentration or mass-concentration; no conversion between them is assumed. Must be at least 0 M. Must be at least 0 g/L. Optional.
- `stockConcentration`: addStock: concentration of the stock added. Given as amount-concentration or mass-concentration; no conversion between them is assumed. Must be at least 0 M. Must be at least 0 g/L. Optional.
- `stockAConcentration`: blendStocks: concentration of stock A. Given as amount-concentration or mass-concentration; no conversion between them is assumed. Must be at least 0 M. Must be at least 0 g/L. Optional.

and 3 more, listed below

No request is recorded for this tool.

**Limits**

- Bench arithmetic on solutions you describe.
- Research and education software: it does not look up densities, check that a label is right, or assess hazards.
- Arithmetic on the volumes and concentrations you give, for one solute, with volumes taken as additive: the final volume is the sum of the volumes mixed.
- That assumption fails for ethanol and water, for concentrated salts and acids, and wherever mixing changes the volume.
- Concentrations must be all amount per volume or all mass per volume.
- Nothing is converted between the two, and molality, mass fraction and percent are not accepted.
- 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.

**It will not answer when**

- the target does not lie between the two concentrations mixed, equals the stock added, or the two concentrations are equal.
- the final volume would exceed the stated vessel capacity.
- the concentrations are not all amount per volume or all mass per volume; the tool holds no molar mass to convert between them.
- addStock needs initialVolume, initialConcentration and stockConcentration; blendStocks needs stockAConcentration, stockBConcentration and finalVolume; both need targetConcentration and may take vesselCapacity; an argument of the other task is refused.

### Every input, with its units

9 inputs

- `task` (required): addStock: stock added to a solution already holding the solute; blendStocks: two stocks blended to a final volume.
- `targetConcentration` (required): Target concentration, on the same basis as the others. Given as amount-concentration or mass-concentration; no conversion between them is assumed. Must be at least 0 M. Must be at least 0 g/L.
- `initialVolume`: addStock: volume of the solution already present. Must be above 0 mL. Optional.
- `initialConcentration`: addStock: concentration of the solution already present. Given as amount-concentration or mass-concentration; no conversion between them is assumed. Must be at least 0 M. Must be at least 0 g/L. Optional.
- `stockConcentration`: addStock: concentration of the stock added. Given as amount-concentration or mass-concentration; no conversion between them is assumed. Must be at least 0 M. Must be at least 0 g/L. Optional.
- `stockAConcentration`: blendStocks: concentration of stock A. Given as amount-concentration or mass-concentration; no conversion between them is assumed. Must be at least 0 M. Must be at least 0 g/L. Optional.
- `stockBConcentration`: blendStocks: concentration of stock B. Given as amount-concentration or mass-concentration; no conversion between them is assumed. Must be at least 0 M. Must be at least 0 g/L. Optional.
- `finalVolume`: blendStocks: final volume of the blend. Must be above 0 mL. Optional.
- `vesselCapacity`: Capacity of the vessel, if the final volume must fit. Must be above 0 mL. Optional.

### Every refusal, with its code

4 refusals

| Code | When |
| --- | --- |
| `TARGET_NOT_REACHABLE` | the target does not lie between the two concentrations mixed, equals the stock added, or the two concentrations are equal. |
| `VESSEL_CAPACITY_EXCEEDED` | the final volume would exceed the stated vessel capacity. |
| `MIXED_BASIS` | the concentrations are not all amount per volume or all mass per volume; the tool holds no molar mass to convert between them. |
| `TASK_ARGUMENTS` | addStock needs initialVolume, initialConcentration and stockConcentration; blendStocks needs stockAConcentration, stockBConcentration and finalVolume; both need targetConcentration and may take vesselCapacity; an argument of the other task is refused. |

## The calculation

The method's equations, constants and worked example.

### [Stock to add to a solution already holding the solute, or two stocks blended, to reach a target concentration](https://www.drybench.com/methods/m/calc-mix-to-target/1.0.1)

`calc-mix-to-target@1.0.1`

**Equation 1**

```text
C0·V0 + Cs·Vs = Ct·(V0 + Vs), so Vs = V0·(Ct − C0)/(Cs − Ct)
final volume Vt = V0 + Vs
volumes in mL (L × 1000)
the concentrations in any one unit of one basis, the ratio being unit-free, and the final concentration given in M or g/L
Ct in the closed interval from C0 to Cs, Ct ≠ Cs and C0 ≠ Cs, else TARGET_NOT_REACHABLE
Vs = 0 at Ct = C0
the volume fits a stated vessel when Vt ≤ its capacity
the final concentration is recomputed as (C0·V0 + Cs·Vs)/Vt
```

| Symbol | Meaning |
| --- | --- |
| `C0` | concentration of the solution already present; M (amount) or g/L (mass), by every concentration in a call is on the same basis, the one the caller gives |
| `Cs` | concentration of the stock added; M (amount) or g/L (mass), by every concentration in a call is on the same basis, the one the caller gives |
| `Ct` | target concentration; M (amount) or g/L (mass), by every concentration in a call is on the same basis, the one the caller gives |
| `V0` | volume of the solution already present, mL |
| `Vs` | volume of stock to add, mL |

Source 1.

**Equation 2**

```text
Va + Vb = Vt and Ca·Va + Cb·Vb = Ct·Vt, so Va = Vt·(Cb − Ct)/(Cb − Ca) and Vb = Vt − Va
Ct in the closed interval from Ca to Cb, Ca ≠ Cb
Va = 0 at Ct = Cb and Vb = 0 at Ct = Ca
capacity as for add-stock
the final concentration is recomputed as (Ca·Va + Cb·Vb)/Vt
```

| Symbol | Meaning |
| --- | --- |
| `Ca` | concentration of stock A; M (amount) or g/L (mass), by every concentration in a call is on the same basis, the one the caller gives |
| `Cb` | concentration of stock B; M (amount) or g/L (mass), by every concentration in a call is on the same basis, the one the caller gives |
| `Ct` | target concentration; M (amount) or g/L (mass), by every concentration in a call is on the same basis, the one the caller gives |
| `Vt` | final volume, mL |
| `Va` | volume of stock A, mL |
| `Vb` | volume of stock B, mL |

Source 1.

**Conventions**

- VOLUME\_ADDITIVE = volumes additive: Fixed by the method; not an argument. The final volume is the sum of the volumes mixed (Drybench's ruling); a final volume made up to the mark is calc\_c1v1's.

A definition, not a model: the equation states what the quantity means. A different convention gives a different number.

**Worked example**

Worked example: one case of calc-mix-to-target\@1.0.1, from its inputs through each step to the answer. Values are written as a person writes them; the working carries more digits, so your own figure may differ in the last digit shown.

**Inputs**

- task = addStock
- initialVolume = 1 L
- initialConcentration = 2 mM
- stockConcentration = 200 mM
- targetConcentration = 5 mM

**Steps**

1. Vs = 15.384615 mL, from initialVolume, initialConcentration, stockConcentration, targetConcentration; by equation 1; gives stockVolume.
2. Vt = 1015.3846 mL, from initialVolume, Vs; by equation 1; gives finalVolume.

The working, as the case writes it:

```text
Vs = V0·(Ct − C0)/(Cs − Ct) = 1000 mL × (5 − 2) mM / (200 − 5) mM = 3000/195 = 200/13 mL = 15.38462 mL
check: (2 mmol + 0.2 M × 200/13 mL) / (13200/13 mL) = 5 mM.
```

**Answer**

- stockVolume = 15.384615 mL
- finalVolume = 1015.3846 mL

Where these values came from: our own exact-arithmetic script and a hand-worked case; worked by hand, and in exact rationals.

At build the tool returned this answer within the tolerance the file states: relative 1e-15 on every number (absolute 1e-21 below 1e-6, in its own unit); statuses, codes, units and the basis exact.

Who worked this case: not recorded.

## Sources

1. Cohen ER et al. Quantities, Units and Symbols in Physical Chemistry (the IUPAC Green Book), IUPAC and RSC Used for: Stock to add to a solution already holding the solute, or two stocks blended, to reach a target concentration. At: section §2.10, printed p. 48: c\_B = n\_B/V and γ\_B = m\_B/V. The balance is Drybench's algebra on these definitions, with the amount (or mass) of B conserved and the volumes additive (VOLUME\_ADDITIVE); the Green Book does not print it.. **Read in full, 11 November 2026**

Read by AI-assisted sessions. No person has checked these readings.

## How it is checked

**Level:** Checked against a reference.

**Checked against:** Our own exact-arithmetic script and a hand-worked case.

**Cases:** No case set is linked to this version.

**Not checked:** Volume change on mixing (Drybench's convention takes volumes as additive); molality, w/w, v/v and bare percent concentrations (not accepted); more than one solute; dilution to a mark.

No independent scientist has yet reviewed this.

### Changes to its methods

1 change

- [14 November 2026, calc-mix-to-target\@1.0.1](https://www.drybench.com/methods/corrections#2026-11-14-calc-mix-to-target101-1): In 1.0.1 such a call is refused whole as RESULT\_OUTSIDE\_DOUBLE\_RANGE, naming the volume; an exact zero (a target equal to the starting concentration) is still reported as 0. No published case's number moved.
