A gas or vapour's amount fraction in air to its mass concentration and back, at a stated temperature and pressure, version 1.1.2
calc-gas-concentration@1.1.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; an ideal, dry gas or vapour; amount fraction by amount; the temperature and absolute pressure stated. Reference kind: our own exact-arithmetic script and a hand-worked case; the source's own worked example, HSE EH40/2005 Workplace exposure limits, Table 1, 4th edition 2020, web version of the printed edition, read 24 November 2026 (SHA-256 736c6fc0…).
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.1.2
Level: Checked against a reference; an ideal, dry gas or vapour; amount fraction by amount; the temperature and absolute pressure stated. Reference kind: our own exact-arithmetic script and a hand-worked case; the source's own worked example, HSE EH40/2005 Workplace exposure limits, Table 1, 4th edition 2020, web version of the printed edition, read 24 November 2026 (SHA-256 736c6fc0…). calc-gas-concentration@1.1.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.
The mass concentration of a gas or vapour in air from its amount fraction, or the reverse, by ρ = x·M/V_m with V_m = RT/p from calc-gas-law, at the temperature and absolute pressure stated.
- 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; notes IDEAL_DRY_GAS, EXACT_MOLAR_VOLUME, SATURATION_NOT_CHECKED, in that order, on every computed reply; each input converted to its working unit (amount fraction µmol/mol, mass concentration mg/m³, temperature K, pressure Pa, molar mass g/mol), its range and subnormal checks made there; outputs in µmol/mol, mg/m³, L/mol and g/mol whatever the input units; none: the nearest double to each exact rational. An amount fraction given above 1000000 µmol/mol is invalid-input OUT_OF_RANGE; one implied by a mass concentration above it is refused AMOUNT_FRACTION_ABOVE_ONE.
- Uncertainty: Exact for the ideal-gas conversion at the stated temperature and pressure; how far a real gas departs from the ideal-gas molar volume is not estimated.
- Reference, as its record states it: exact rational arithmetic, against a second implementation in Python by a separate agent of the same model family; HSE EH40/2005 Table 1 at its printed digits
- Computes through:
calc-gas-law@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
63 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; the source's own worked example, HSE EH40/2005 Workplace exposure limits, Table 1, 4th edition 2020, web version of the printed edition, read 24 November 2026 (SHA-256 736c6fc0…): 40 agree within the tolerance the file states, 23 refuse as the case expects, 0 differ, 0 were not run.
File 1, 44 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
File 2, 19 cases
- Where the expected values came from: the source's own worked example, HSE, EH40/2005 Workplace exposure limits, 4th edition 2020, Table 1 (paragraphs 68 and 69, p. 29)
- Recorded on: 2026-11-24
- Reference: HSE EH40/2005 Workplace exposure limits, Table 1, 4th edition 2020, web version of the printed edition, read 24 November 2026 (SHA-256 736c6fc0…); licence OGL-UK-3.0
- Tolerance as the file states it: mass concentration within half a unit in the last significant figure EH40 prints (paragraph 69's rounding); the paths EH40 does not print (molar mass, amount fraction, molar volume) relative 1e-12 against the second implementation (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
Exposure limits (no comparison is made); EH40/2005 Table 1's carbon monoxide short-term row, whose printed 117 mg.m-3 departs from EH40's own paragraphs 68 and 69 (116), and its molar volume 24.05526 L/mol, which implies R = 8.31451 (an older value; 6e-6 relative from RT/p today); condensation of a vapour; particulates; ppm by mass; humid air; real-gas behaviour. A formula starting with a digit (13NH3) is refused FORMULA_INVALID since 1.1.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
ρ = x·M/V_m = x·M·p/(R·T)
x = ρ·V_m/M
| Symbol | Meaning and unit |
|---|---|
| ρ | mass concentration of the substance in air, mg/m^3 |
| x | amount fraction of the substance (by amount, never by mass), umol/mol |
| M | molar mass of the substance, g/mol |
| V_m | molar volume of an ideal gas at the stated temperature and pressure, L/mol |
| p | absolute pressure (with R in J/(mol·K), R·T/p comes out in L/mol), kPa |
| T | temperature, t in °C + 273.15, K |
| R | molar gas constant N_A·k, exact (calc-gas-law), J/(mol*K) |
Source: Cohen ER et al. Quantities, Units and Symbols in Physical Chemistry (the IUPAC Green Book), IUPAC and RSC, section §2.10, printed p. 48: x_B = n_B/Σn_i, with the ideal-gas molar volume of calc-gas-law; µmol/mol × g/mol ÷ L/mol comes out exactly in mg/m³, 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).
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-gas-concentration@1.1.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
- substance.formula = CO2
- phase = gas
- amountFraction = 1000 umol/mol
- temperature = 20 degC
- absolutePressure = 101.325 kPa
Steps
- Vm = 24.055117 L/mol, from temperature, absolutePressure; by the equation above; gives molarVolume.
- rho = 1829.5068 mg/m³, from amountFraction, substance.formula, Vm; by the equation above; gives massConcentration.
The working, as the case writes it:
M(CO2) = 12.011 + 2 x 15.999 = 44.009 g/mol
Vm = 8.31446261815324 x 293.15 / 101325 = 0.0240549 m3/mol
rho = 1000e-6 x 44.009 / 0.0240549 = 1.8295068 g/m3 = 1829.5068 mg/m3 (worked by hand by the raising builder, 14 November 2026)
Answer
molarVolume= 24.055117 L/molmassConcentration= 1829.5068 mg/m³
Where these values came from: our own exact-arithmetic script and a hand-worked case; the second implementation's run(arguments).
At build the tool returned this answer within the tolerance the file states: every number relative 1e-12 (absolute 1e-15 below 1e-3, in each value's unit); strings, notes, statuses and codes exact; where one path carries more than one unit, or a logarithmic unit, absolute at the relative value times the smallest nonzero magnitude under it (the largest, for a logarithm).
Who worked this case: not recorded.
What it refuses, and its input ranges
AMOUNT_FRACTION_ABOVE_ONE: the mass concentration given implies more than one mole of the substance per mole of air at this temperature and pressure Next: Check the mass concentration, its unit, the temperature and the pressure.FORM_COUNT(invalid input): not exactly one of the amount fraction and the mass concentration is givenPARTICULATE(invalid input): the substance is declared an aerosol or particulate, which has a mass concentration onlyMOLAR_MASS_SOURCE(invalid input): the substance gives both, or neither, of a formula and a molar mass
Flags and notes a reply may carry
A note a reply may carry:
IDEAL_DRY_GAS: Ideal gas only: no compressibility correction is made, and the gas is taken as dry, with no water vapour subtracted.EXACT_MOLAR_VOLUME: The molar volume is RT/p computed exactly; occupational tables print factors from a conventional molar volume at room temperature rather than from RT/p, so they can differ in the last figure.SATURATION_NOT_CHECKED: Whether a vapour at this amount fraction would condense at the stated temperature is not checked, and no comparison with an exposure limit is made.
Changes
2026-11-25-calc-gas-concentration@1.1.2-1
2026-11-25 · calc-gas-concentration@1.1.2 · Corrections to our methods
- What was wrong: A number written before the substance formula was read as a multiplier: 1 µmol/mol of ammonia at 25 °C and 1 atm, written 13NH3, was read as H39N13, 221.403 g/mol for 17.031, and gave 9.050 mg/m³ for 0.696.
- Affected: calc_gas_concentration at calc-gas-concentration 1.1.1 and earlier, only where the substance formula starts with a digit. Every other output is unchanged.
- What changed: In 1.1.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
A gas or vapour's amount fraction in air to its mass concentration and back, at a stated temperature and pressure. Drybench; calc-gas-concentration@1.1.2; https://www.drybench.com/methods/m/calc-gas-concentration/1.1.2 (accessed [date]).