xraytools.

CHN Calculator

The molecular weight a formula implies and the elemental analysis it predicts — the percentages a combustion analysis is compared against.

You supply
A chemical formula. Brackets nest and may carry a fractional multiplier (Cu(NO3)2, K3[Fe(CN)6], (SiO2)0.5), and a charge may be written after a caret (SO4^2-) or as a bare sign (Na+). Adducts and hydrates are written with a dot or an asterisk, with the count in front of the part it multiplies (CuSO4·5H2O, KAl(SO4)2*12H2O); a full stop is a decimal point here and not a separator, since CuSO4.5H2O is also a formula with a count of 4.5 in it. The charge is noted and left out of the arithmetic: every quantity here is a sum over atoms, and an electron is one part in 105 of a carbon.
Reading it
Percentages are by mass, which is how elemental analysis is reported. An unrecognised element symbol is refused rather than dropped, because dropping it would renormalise the rest and still look right.

Worked examples: aspirin · a nickel complex · copper nitrate · blue vitriol

Input

The percentages are rounded by the largest-remainder method so that they add up to exactly 100 % — every figure is first rounded down, then the leftover units go to the values whose discarded fraction was largest. Where that prints an element one unit away from its own rounded value, the table says which one, nothing moves by more than that one unit, and every cell keeps its exact percentage in a tooltip.

Results

Formula as entered CuSO4*5H2O
Read as CuSO9H10
Elemental contributions
Cu63.546 g/mol63.546(3) r
S32.0675 g/mol[32.059,32.076]
O143.9946 g/mol[15.99903,15.99977] m
H10.0798 g/mol[1.00784,1.00811] m
Molecular weight 249.688(6) g/mol
Elemental analysis
Cu25.45 %± 0.0007
S12.84 %± 0.0017
O57.67 %± 0.0013
H4.04 %± 0.0003
Total100.00 %± 0

The ± figures come from the uncertainty of the atomic weights themselves. They are strongly correlated and must not be added up — the same atomic weight enters every row, so the total is exactly 100 % whatever the weights turn out to be.

The ± figures are the uncertainty of the atomic weights, from the IUPAC standard atomic weights — the spread of normal terrestrial materials, not the precision of a measurement. For an ordinary organic compound they are a few thousandths of a percentage point, far below what a combustion analysis can resolve, so they decide how many digits are worth printing rather than whether a sample matches. Where an element's weight is published as an interval, the value used here is its midpoint.

Where this comes from