How to Calculate Number Density
Number density (symbol n) is the count of particles — atoms, molecules, ions, or other elementary entities — packed into a unit of volume. Its most general definition is simply n = N/V: divide the number of particles N by the volume V they occupy, giving units of particles per cubic meter (m⁻³) or particles per cubic centimeter (cm⁻³). In practice you rarely count particles directly; instead this calculator derives n from a material's mass density and molar mass, two quantities that are easy to measure or look up.
Deriving number density from mass density and molar mass
Start with the molar concentration c = ρ / M, which converts mass density ρ into moles of formula units per unit volume. Multiplying by Avogadro's number N_A = 6.02214076 × 10²³ /mol converts moles into an actual particle count, giving the number density of formula units: nformula = c × N_A = ρ × N_A / M. If each formula unit contains more than one particle of interest — for example, three atoms per SiO₂ formula unit, or two ions per NaCl formula unit — multiply by that count Z to get the final number density: n = ρ × N_A × Z / M. For pure copper (ρ = 8.96 g/cm³, M = 63.55 g/mol, Z = 1 atom per formula unit), this gives n ≈ 8.49 × 10²⁸ atoms/m³, matching the textbook atomic number density of copper.
Working with units
- Density is commonly given in g/cm³ (solids, liquids) or kg/m³ (SI base units); 1 g/cm³ = 1000 kg/m³, so convert before mixing the two.
- Molar mass is normally read off the periodic table in g/mol; convert to kg/mol by dividing by 1000 if you need SI base units throughout.
- Number density in m⁻³ and cm⁻³ differ by a factor of 10⁶ (1 m³ = 10⁶ cm³), not 10³ — a common source of order-of-magnitude errors.
Where number density is used
Solid-state and semiconductor physics use atomic or carrier number density to model conductivity, doping, and X-ray diffraction intensities. Plasma physics and astrophysics track electron and ion number densities to characterize a plasma or the interstellar medium. The ideal gas law can also be rearranged to n = P / (kBT) to give the number density of a gas directly from its pressure and temperature — a related but distinct calculation from the density/molar-mass approach used here.