Understanding the number density calculator — concept and principle
This calculator finds the number density of particles, how many atoms, molecules or electrons there are per unit volume, from a particle count and volume, from a material's density and molar mass, or from the pressure and temperature of an ideal gas. It also gives the amount concentration and the mean spacing between particles. It is used in physics, chemistry and materials science.
How it is calculated
From a count: n = N ÷ V
From density: n = ρ × N_A ÷ M
For an ideal gas: n = p ÷ (k_B T)
Mean spacing = n^(−1/3); amount concentration = n ÷ N_A
- N_A = 6.02214076 × 10²³ mol⁻¹ and k_B = 1.380649 × 10⁻²³ J/K (exact). Volume in cm³, density in g/cm³, pressure in kPa.
The principle
Density tells you mass per volume, and molar mass tells you mass per mole; dividing gives moles per volume, and multiplying by Avogadro's number gives particles per volume. For gases the ideal gas law p = n k_B T means that at the same temperature and pressure every gas has the same number density, whatever its molecules. The mean spacing is the side of the small cube each particle would have to itself.
Worked example
Default inputs: from density, ρ = 2.70 g/cm³, M = 26.98 g/mol (aluminium).
- ρ = 2.70 × 10⁶ g/m³.
- n = 2.70 × 10⁶ ÷ 26.98 × 6.02214 × 10²³ = 6.027 × 10²⁸ m⁻³ = 6.027 × 10²² cm⁻³.
- Amount concentration = n ÷ N_A ≈ 100,100 mol/m³.
- Mean spacing = (6.027 × 10²⁸)^(−1/3) = 0.2551 nm.
How to read the result
Solids and liquids have number densities around 10²⁸–10²⁹ m⁻³, with atoms a few tenths of a nanometre apart. A gas at 0 °C and 1 atm has about 2.687 × 10²⁵ m⁻³ (Loschmidt's number), roughly a thousand times fewer, so its molecules are about ten times farther apart. For metals, multiply n by the number of free electrons per atom (three for aluminium, one for copper) to get the electron density.
Common mistakes
- Mixing g/cm³ with kg/m³.
- Counting formula units when you need atoms (or the reverse).
- Using the ideal-gas formula for liquids or dense gases.
Frequently asked questions
What is Loschmidt's number?
The number density of an ideal gas at 0 °C and 1 atm, about 2.687 × 10²⁵ m⁻³.
Why does every gas have the same number density at equal p and T?
The ideal gas law contains no property of the molecules.
How do I get electron density in a metal?
Multiply the atomic number density by the number of free electrons per atom.
What is the mean spacing?
The edge of the cube each particle would occupy, n^(−1/3).
Sources: BIPM, SI Brochure, 9th edition (2019), defining constants N_A and k_B