One solute's concentration in every form from one form, a stated density and the formula or molar mass, version 1.0.2
calc-concentration-forms@1.0.2: 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; one solute in one solvent; density and temperature as stated; mass fraction of the formula as written. 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 · Every method · What the levels mean
Version 1.0.2
Level: Checked against a reference; one solute in one solvent; density and temperature as stated; mass fraction of the formula as written. Reference kind: our own exact-arithmetic script and a hand-worked case. calc-concentration-forms@1.0.2
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: one solute in one solvent; density and temperature as stated; by-volume forms at that temperature; mass fraction of the formula as written
From the one form the caller states (mass fraction, amount or mass concentration, molality, mole fraction, or the amount concentration of the equivalent entity), the solution's density at a stated temperature and the solute's formula or molar mass, every other form, through the shared routine solution-concentration.
- How results are reported: Inputs as their shortest decimals, converted exactly and rounded once; bounds decided on that value, ends included unless stated as above or below; DENSITY_TEMPERATURE on every computed reply; then, where raised, DENSITY_OUTSIDE_PLAUSIBLE_BAND, AMMONIA_AS_NH3, MOLE_FRACTION_TWO_COMPONENTS, in that order; none: the nearest double to each exact rational. A result whose exact value is not zero but lies outside the normal range of a double refuses the whole call as RESULT_OUTSIDE_DOUBLE_RANGE.
- Uncertainty: Exact arithmetic on the stated values; no uncertainty in the density or the molar mass is propagated.
- Reference, as its record states it: exact rational arithmetic, against a second implementation in Python by a separate agent of the same model family; molar masses against molmass
- Computes through:
solution-concentration@1.0.1,formula-reading@1.0.2 - Level confirmed by this project's ruling of 25 November 2026
What this page can and cannot show
What was checked
104 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: 64 agree within the tolerance the file states, 40 refuse as the case expects, 0 differ, 0 were not run.
File 1, 37 cases
- Where the expected values came from: our own exact-arithmetic script and a hand-worked case
- Recorded on: 2026-11-11
- Reference: Python fractions, every form derived from the definitions on a basis of 100 g; its own formula reading and hand-typed CIAAW weights, CPython 3.13.18; licence PSF-2.0
- Tolerance as the file states it: relative 1e-15 on every number (absolute 1e-21 below 1e-6, in its own unit); statuses, codes, units, labels and withheld rules exact
File 2, 67 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: every number relative 1e-12 (absolute 1e-15 below 1e-3, in each value's unit); strings, notes, statuses and codes 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
More than one solute; ionic mole fractions and activities; a temperature correction of the density (none is made); that the density is the solution's and the formula the substance labelled. A formula starting with a digit (13HCl) is refused FORMULA_INVALID since 1.0.2, through formula-mass 1.3.0, with no case in this method's fixtures; the refusal is covered by stored reference values and unit tests only.
Definition or model
A closed form: the result follows from the inputs by the equations alone.
Equations
w from the stated form
then c = 1000·w·ρ/M, γ = 1000·w·ρ, b = 1000·w/((1 − w)·M), x = (w/M)/(w/M + (1 − w)/M_A), c((1/z)B) = z·c (the shared routine solution-concentration)
z below one is outside the input's range (the kit's code), so solution-concentration's Z_NOT_A_POSITIVE_INTEGER is not reached through this tool
'% w/v' is a refused unit answered PERCENT_W_V
AMMONIA_AS_NH3 is raised only for a solute formula that reads as NH4OH (Hill H5NO), never for a molar mass alone
with a molar mass alone the entity is written with B for the solute
| Symbol | Meaning and unit |
|---|---|
| w | mass fraction of the solute B |
| ρ | density of the solution at its stated temperature, g/mL |
| M | molar mass of B as its formula is written, or as stated, g/mol |
| c | amount concentration of B, M |
| γ | mass concentration of B, g/L |
| b | molality of B, per mass of solvent, mol/kg |
| x | mole fraction of B |
| M_A | molar mass of the solvent, g/mol |
| z | equivalents per mole for the stated reaction |
Source: Cohen ER et al. Quantities, Units and Symbols in Physical Chemistry (the IUPAC Green Book), IUPAC and RSC, section §2.10, printed pp. 47–48 (w_B, M_B, x_B, γ_B, c_B note 16, b_B note 14) and §2.10.1(v), printed pp. 53–54 (the relation on p. 54) (the equivalent entity), with ρ = m/V (§2.2, printed p. 14), 3rd edition (2007), 2nd printing, December 2012 searchable PDF from iupac.org; read in full on 2026-11-11 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; all rights reserved), 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 (host refused the connection, 11 November 2026). The copy read is taken as uncorrected; whether any entry falls in §2.10 is unknown. (2026-11-11).
Conventions
DENSITY_PLAUSIBLE_BAND= 0.6 g/mL, 3 g/mL: Fixed by the method; not an argument. A solution density outside this band, compared as exact decimals with the band's ends inside it, is noted, never refused or corrected (Drybench's ruling).
Constants
| Constant | Value and unit | Source | Date read |
|---|---|---|---|
| standard atomic weights (CIAAW abridged), through formula-mass 1.1.0 (A_r) | a table of values, part of the method | IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW), Abridged Standard Atomic Weights, table Abridged Standard Atomic Weights | 2026-11-10 |
Worked example
Worked example: one case of calc-concentration-forms@1.0.2, 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
- solute.formula = HCl
- solvent.formula = H2O
- massFraction = 0.37
- density = 1.19 g/mL
- densityTemperature = 20 degC
Steps
- c = 12.07691 M, from massFraction, density, solute.formula; by the equation above; gives amountConcentration.
- gamma = 440.3 g/L, from massFraction, density; by the equation above; gives massConcentration.
- b = 16.108991 mol/kg, from massFraction, solute.formula; by the equation above; gives molality.
- x = 0.22492845, from massFraction, solute.formula, solvent.formula; by the equation above; gives moleFraction.
The working, as the case writes it:
M(HCl) = 1.0080 + 35.45 = 36.458 g/mol. c = 1000 × 0.37 × 1.19 / 36.458 = 12.07691 M
γ = 1000 × 0.37 × 1.19 = 440.3 g/L
b = 1000 × 0.37 / (0.63 × 36.458) = 16.10899 mol/kg
x = (0.37/36.458) / (0.37/36.458 + 0.63/18.015) = 0.2249285 (Drybench's: 12.077, 440.30, 16.109, 0.22493).
Answer
amountConcentration= 12.07691 MmassConcentration= 440.3 g/Lmolality= 16.108991 mol/kgmoleFraction= 0.22492845
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, labels and withheld rules exact.
Who worked this case: not recorded.
What it refuses, and its input ranges
NO_SOLVENT_REMAINS: the stated form leaves no solvent: a mass or mole fraction of one, or a concentration whose solute mass equals or exceeds the solution's Next: Check the concentration, the density and its unit, and the solute's formula; the values given leave no mass for the solvent.FORM_COUNT(invalid input): not exactly one concentration form is statedEQUIVALENT_ENTITY_INPUTS(invalid input): only one of z and the reaction is given, or the equivalent-entity concentration is the stated form without bothSOLVENT_REQUIRED(invalid input): the mole fraction is the stated form and no solvent is namedMOLAR_MASS_SOURCE(invalid input): the solute or the solvent gives both, or neither, of a formula and a molar massPERCENT_W_V(invalid input): a mass fraction is given in % w/v, which is a mass per volume and ambiguous here; for making up a percent solution, calc_percent_solution
Flags and notes a reply may carry
A note a reply may carry:
DENSITY_TEMPERATURE: The amount and mass concentrations, and the equivalent-entity concentration, hold at the density's temperature only; the mass fraction, molality and mole fraction do not depend on temperature. No temperature correction is made.DENSITY_OUTSIDE_PLAUSIBLE_BAND: The density is outside the method's plausible band for a solution density: check its value and unit, and that it is the solution's density, not the solvent's.AMMONIA_AS_NH3: Commercial ammonia solutions are labelled as a mass fraction of NH3, not of NH4OH; the two readings differ by the ratio of their molar masses. Give the formula the label names.MOLE_FRACTION_TWO_COMPONENTS: The mole fraction is of a two-component system, the rest of the mass all solvent; for an electrolyte it counts formula units, not ions.
Changes
2026-11-25-calc-concentration-forms@1.0.2-1
2026-11-25 · calc-concentration-forms@1.0.2 · Corrections to our methods
- What was wrong: A number written before the solute or solvent formula was read as a multiplier. 37 % hydrochloric acid at 1.19 g/mL with the solute written 13HCl was read as Cl13H13, 473.954 g/mol for 36.458: 0.929 M for 12.08 M.
- Affected: calc_concentration_forms at calc-concentration-forms 1.0.1 and earlier, only where the solute or solvent formula starts with a digit. Every other output is unchanged.
- What changed: In 1.0.2, through formula-mass 1.3.0, a formula starting with a digit is now refused (FORMULA_INVALID); every other output is unchanged, and every pinned output hash is the same.
- How it was found: A review of the formula reader's grammar on 24 November 2026 found that no rule or test documented a number at the start of a formula, while the shared reader (formula-mass) applied the adduct multiplier to the first part as well; the scientific review ruled the same day that such a formula is refused. A sweep of the tools' worked examples with 13 written before each formula argument, before and after the fix, found which tools computed on it.
- Cases added: None in the fixtures: no published case starts a formula with a digit, and every pinned output hash is unchanged. The refusal is covered by the formula reader's hand cases and unit tests; the widened sweep records each tool's reply before and after.
Tools that use it
Cite this version
One solute's concentration in every form from one form, a stated density and the formula or molar mass. Drybench; calc-concentration-forms@1.0.2; https://www.drybench.com/methods/m/calc-concentration-forms/1.0.2 (accessed [date]).