# Calculated osmolarity or osmolality of a solution from its components' concentrations, dissociation numbers and osmotic coefficients, version 1.0.1

form-osmolarity\@1.0.1: this version's equations with their symbols, each constant's value, their sources and whether each was read, a worked example where the record holds one, its level and what it was checked against, the number of cases, and what was not checked. This version's record is not rewritten; a correction is added under Changes.

## What this page can and cannot show

**Level: Checked against a reference; caller's ν and φ; per-component φ and molarity basis Drybench's forms; Green Book erratum list unread. Reference kind: our own exact-arithmetic script and a hand-worked case.**

Checked by this project, not independently reviewed. Every method on this page has its equations, constants, sources and cases on record, and its cases agree with the stated reference within the stated tolerance. A reader can follow each method's worked example by hand; that shows the stated method gives the stated answer for one set of inputs, and does not test the code. The other cases and their values are not printed, so a reader cannot re-run these checks. No independent scientist has yet reviewed them.

[Every version of this method](https://www.drybench.com/methods/m/form-osmolarity) · [Every method](https://www.drybench.com/methods/m) · [What the levels mean](https://www.drybench.com/methods/levels)

## Version 1.0.1

**Level: Checked against a reference; caller's ν and φ; per-component φ and molarity basis Drybench's forms; Green Book erratum list unread. Reference kind: our own exact-arithmetic script and a hand-worked case.** `form-osmolarity@1.0.1`

Built, not hosted. Generated from a snapshot of the library's records taken on 2026-11-25, as committed on 2026-11-25. A later snapshot replaces this one, so these records and this page can change.

**Verification statement:** Osmolarity Σνᵢφᵢcᵢ or osmolality Σνᵢφᵢmᵢ from the caller's ν, φ and concentrations, on the basis stated. The per-component φ and the concentration basis are Drybench's forms of the osmotic coefficient, which the IUPAC Green Book, 3rd edition, §2.11 p. 59 defines once for the solution on molality (re-read 14 November 2026; its 2010 erratum list not read). A mass concentration is converted by c = γ/M (NIST SP 811 (2008) §8.6.5 note 1, §8.6.4). Computed in double precision. Compared with exact arithmetic in a Python program and with a second implementation in Python by a separate agent of the same model family (62 cases, 28 at the edges). No outside program is compared: the method is sums and products of the stated values, checked in exact rationals. A calculated value, not a measured osmolality.

Input codes: a particles (ν) below 1 is OUT\_OF\_RANGE and a fractional one NOT\_AN\_INTEGER; an osmoticCoefficient with coefficients ideal, or a molarMass with an amount concentration or a molality (taken only with a mass concentration), is UNKNOWN\_ARGUMENT. Osmolarity (per litre of solution) = Σᵢ νᵢ·φᵢ·cᵢ on a molarity basis, or osmolality (per kilogram of water) = Σᵢ νᵢ·φᵢ·mᵢ on a molality basis; the basis is stated, never inferred, and the two are never converted (that needs the solution's density). νᵢ (entities per formula unit) and φᵢ are the caller's; φ = 1 for every component only in the explicit \`ideal\` mode. The IUPAC osmotic coefficient is defined on the molality basis for the whole solution (φ\_m against Σ\_B m\_B over independent entities); a per-component φᵢ, and φ applied to molar concentrations, are the caller's approximations. A mass concentration is converted with the molar mass the caller states. φ is per entity: ν·φ (e.g. 1.86 for NaCl) is never given as φ, and a non-integer van 't Hoff i is given as ν (full dissociation) with φ (e.g. ν = 2, φ = 0.9), never as ν = 1.8. The unit osmol is one mole of independent osmotically active entities, weighted by the stated osmotic coefficients; the IUPAC Green Book (§2.11, note 24) discourages the name, and it is used here as the field uses it. A calculated value, not a measured osmolality.

- **How results are reported:** none: full double precision
- **Uncertainty:** Computed in double precision from the caller's values (sums of positive terms). No uncertainty is propagated, and none is given for the caller's ν and φ.
- **Reference, as its record states it:** Exact arithmetic: Python fractions on the recorded equations, written before the engine; a second implementation in Python by a separate agent of the same model family
- **Level confirmed by this project's ruling of** 14 November 2026

[What this page can and cannot show](#what-this-page-can-and-cannot-show)

### What was checked

96 cases in 2 files, linked by this exact version.

Run through the tool at build against our own exact-arithmetic script and a hand-worked case: 59 agree within the tolerance the file states, 37 refuse as the case expects, 0 differ, 0 were not run.

- **File 1, 34 cases**
  - **Where the expected values came from:** our own exact-arithmetic script and a hand-worked case
  - **Recorded on:** 2026-11-10
  - **Reference:** Python standard library (fractions), 3.13.18; licence PSF-2.0
  - **Tolerance as the file states it:** Osmolarity, osmolality and contributions relative 1e-12; no expected value is near zero (every concentration, ν and φ is positive): the near-zero floor (absolute 1e-312 below 1e-300, unit 1) is nominal; statuses, codes and units exact

- **File 2, 62 cases**
  - **Where the expected values came from:** our own exact-arithmetic script and a hand-worked case
  - **Recorded on:** 2026-11-14
  - **Reference:** second implementation (Python 3.13), 2026-11-14; licence BSD-3-Clause
  - **Tolerance as the file states it:** Osmolarity, osmolality and contributions relative 1e-12; no expected value is near zero (every concentration, ν and φ is positive): the near-zero floor (absolute 1e-312 below 1e-300, unit 1) is nominal; statuses, codes and units exact

Apart from the worked example, the cases and their values are not printed here. This shows agreement with this project's recorded cases. It does not show that a method suits your work, and it is not a qualification.

### What was not checked

The osmotic coefficients themselves; non-ideal mixing between components; the density conversion between molarity and molality; measured osmolality (freezing-point or vapour-pressure osmometry). Calculated serum osmolality and the osmolal gap (a diagnostic formula) are out of this method.

### Definition or model

A closed form: the result follows from the inputs by the equations alone.

### Equations

**Equation 1**

```equation
osmolality = Σᵢ νᵢ·φᵢ·mᵢ
```

| Symbol | Meaning and unit |
| --- | --- |
| osmolality | osmolality of the solution, per kilogram of water; returned in osmol/kg, or in mosmol/kg (1 osmol = 1000 mosmol) when outputUnit is mosmol, osmol/kg |
| νᵢ | independent entities per formula unit of component i (the argument particles) |
| φᵢ | osmotic coefficient of component i (the caller's osmoticCoefficient; 1 with coefficients ideal) |
| mᵢ | molality of component i, mol/kg |
| νᵢ·φᵢ·mᵢ | contribution of component i, returned per component as contributions, in the result's unit, osmol/kg |

Source: IUPAC, Quantities, Units and Symbols in Physical Chemistry (the Green Book), 3rd edition, RSC Publishing 2007 (2012 printing, IUPAC's searchable PDF), equation osmotic coefficient, molality basis, φ\_m = (mu\*\_A − mu\_A)/(RT·M\_A·Σ\_B m\_B), mu the chemical potential (spelt out: a reply carries no micro sign), p. 59, section Drybench's form: the sum of the caller's νᵢφᵢ times each molality. Terms after §2.11, notes 23 and 24 (entities B are independent solute molecules, ions, etc.; 'osmoles' discouraged), which defines one φ\_m for the solution on molality, 3rd edition (2007), 2012 second printing, IUPAC's searchable PDF: IUPAC's copy, not the RSC e-book of record; read in full on 2026-11-10 by an AI-assisted session; not yet checked by a person. Read from the file itself, SHA-256 beginning dc9cf52d6cf3. Free to read (free PDF from IUPAC; © 2007 IUPAC, no reuse licence found (definitions used, not text)), checked 2026-11-11. Erratum: An English erratum list (February 2010, ed. J. Stohner), known only through AIST NMIJ's December 2010 Japanese-translation errata; neither read (the host refused the connection, 11 November 2026; the archive's index refused connections, 14 November 2026). The copy read is taken as uncorrected; unverified search summaries place an 'enthalpy' erratum most likely in §2.11. (2026-11-14).

**Equation 2**

```equation
osmolarity = Σᵢ νᵢ·φᵢ·cᵢ
```

| Symbol | Meaning and unit |
| --- | --- |
| osmolarity | osmolarity of the solution, per litre of solution; returned in osmol/L, or in mosmol/L (1 osmol = 1000 mosmol) when outputUnit is mosmol, osmol/L |
| νᵢ | independent entities per formula unit of component i (the argument particles) |
| φᵢ | osmotic coefficient of component i (the caller's osmoticCoefficient; 1 with coefficients ideal) |
| cᵢ | amount concentration of component i (from the mass equation where a mass concentration is given), M |
| νᵢ·φᵢ·cᵢ | contribution of component i, returned per component as contributions, in the result's unit, osmol/L |

Source: IUPAC, Quantities, Units and Symbols in Physical Chemistry (the Green Book), 3rd edition, RSC Publishing 2007 (2012 printing, IUPAC's searchable PDF), p. 59, section Drybench's form: the sum of the caller's νᵢφᵢ times each amount concentration. Terms after §2.11, which defines one φ\_m for the solution on molality; the concentration basis is not printed there, 3rd edition (2007), 2012 second printing, IUPAC's searchable PDF: IUPAC's copy, not the RSC e-book of record; read in full on 2026-11-10 by an AI-assisted session; not yet checked by a person. Read from the file itself, SHA-256 beginning dc9cf52d6cf3. Free to read (free PDF from IUPAC; © 2007 IUPAC, no reuse licence found (definitions used, not text)), checked 2026-11-11. Erratum: An English erratum list (February 2010, ed. J. Stohner), known only through AIST NMIJ's December 2010 Japanese-translation errata; neither read (the host refused the connection, 11 November 2026; the archive's index refused connections, 14 November 2026). The copy read is taken as uncorrected; unverified search summaries place an 'enthalpy' erratum most likely in §2.11. (2026-11-14).

**Equation 3**

```equation
cᵢ = ρᵢ / Mᵢ
```

| Symbol | Meaning and unit |
| --- | --- |
| cᵢ | amount concentration of component i, M |
| ρᵢ | mass concentration of component i (g/L divided by g/mol gives mol/L), g/L |
| Mᵢ | molar mass of the form whose mass the concentration states, g/mol |

Source: NIST Special Publication 811, Guide for the Use of the International System of Units (SI), 2008 edition, section 8.6.5 note 1 (mass concentration of B, ρ\_B = m\_B/V) and 8.6.4 (M = m/n): c = γ/M; as the Green Book §2.10, its 2010 erratum list not read, 2008 edition (NIST PDF); read in full on 2026-11-10 by an AI-assisted session; not yet checked by a person. Read from the file itself, SHA-256 beginning 788dd8f0bcb0. Free to read (a US Government publication; no licence statement found in the PDF), checked 2026-11-11. No erratum found (searched publisher (the 2008 edition's own preface: it corrects the 1995 edition's misprints)), 2026-11-11.

### Constants

Constants: none used.

### Worked example

Worked example: one case of form-osmolarity\@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**

- basis = molarity
- coefficients = stated
- outputUnit = mosmol
- components\[0\].concentration = 9 g/L
- components\[0\].particles = 2
- components\[0\].osmoticCoefficient = 0.93
- components\[0\].molarMass = 58.44 g/mol

**Steps**

1. c = 0.15400411 M, from components\[0\].concentration, components\[0\].molarMass; by equation 3.
2. osmolarity = 286.44764 mosmol/L, from components\[0\].particles, components\[0\].osmoticCoefficient, c; by equation 2; gives osmolarity, contributions\[0\].

The working, as the case writes it:

```equation
2 × 0.93 × 9/58.44 × 1000 = 286.447… mosmol/L
```

**Answer**

- `osmolarity` = **286.44764 mosmol/L**
- `contributions[0]` = **286.44764 mosmol/L**

Where these values came from: our own exact-arithmetic script and a hand-worked case; stored reference values, osmolarity() (exact rational).

At build the tool returned this answer within the tolerance the file states: Osmolarity, osmolality and contributions relative 1e-12; no expected value is near zero (every concentration, ν and φ is positive): the near-zero floor (absolute 1e-312 below 1e-300, unit 1) is nominal; statuses, codes and units exact; this case's near-zero floors restated in its own output units (nominal, as in the file).

Who worked this case: not recorded.

### What it refuses, and its input ranges

- `BASIS_MISMATCH`: a component's concentration is not on the stated basis (a molality on the molarity basis, or a molarity or mass concentration on the molality basis): converting needs the solution's density, which this method does not take Next: State every component's concentration on the stated basis (amount or mass concentrations with basis molarity, molalities with basis molality), or change basis to the one the concentrations are on.

**Input ranges:** components\[\*\].concentration: above 0 M; outside it, invalid input (NOT\_POSITIVE). components\[\*\].concentration: above 0 mol/kg; outside it, invalid input (NOT\_POSITIVE). components\[\*\].concentration: above 0 g/L; outside it, invalid input (NOT\_POSITIVE). components\[\*\].molarMass: above 0 g/mol; outside it, invalid input (NOT\_POSITIVE). components\[\*\].osmoticCoefficient: above 0; outside it, invalid input (NOT\_POSITIVE).

### Changes

No correction is logged for form-osmolarity\@1.0.1.

## Tools that use it

- [`form_osmolarity`](https://www.drybench.com/methods/tools/form-osmolarity)

## Cite this version

Calculated osmolarity or osmolality of a solution from its components' concentrations, dissociation numbers and osmotic coefficients. Drybench; form-osmolarity\@1.0.1; [https://www.drybench.com/methods/m/form-osmolarity/1.0.1](https://www.drybench.com/methods/m/form-osmolarity/1.0.1) (accessed \[date\]).
