Advertisement
Advertisement
PHYSICS

Number Density Calculator — particles per unit volume from density or from gas pressure

Convert a mass density and a molar mass into the number of atoms or molecules per cubic metre, or get the same figure for a gas straight from its pressure and temperature.

The first route works for anything you can weigh: a liquid, a metal, a polymer, a doped semiconductor. The second uses the ideal gas law and needs no density at all, because pressure and temperature already fix it.
Use the density at the temperature you care about. Liquid water is 997 kg/m³ near room temperature and 1000 kg/m³ only at 4 °C, which is a 0.3 % shift in the answer.
Leave the second box at 1 to count molecules or formula units. Set it to the number of atoms in the formula to count atoms instead — 3 for H2O, 2 for NaCl, 5 for CaCO3.
Gas pressure must be absolute, not gauge. A tyre reading 2 bar on a gauge is at roughly 3 bar absolute, and using the gauge figure understates the number density by a third.
Number density
 
 
0
Per cubic centimetre
0
Amount concentration
0
Mean particle spacing
0
Mass per particle
Tip: the mean spacing is the sanity check. Condensed matter lands near 0.2–0.4 nm between neighbours; a gas at room conditions lands near 3 nm. If your spacing comes out somewhere else entirely, a unit is wrong.
Advertisement

The number density calculator above answers a question that sits underneath a great deal of physics and chemistry: how many individual particles are packed into a given volume? Number density is written n and carries units of reciprocal volume, usually particles per cubic metre or per cubic centimetre. It is not a mass, not a concentration in the chemist's sense, and not a mole count. It is a raw head count of atoms, molecules, electrons or charge carriers in a defined box, and once you have it a whole family of other quantities becomes computable.

Arb Digital publishes free engineering and science calculators that show their working instead of hiding it. This page takes two published routes to the same quantity, prints the intermediate figures, and gives you the mean spacing between neighbours so you can tell at a glance whether the answer is physically sensible. Every constant it uses is the exact defined value from the current international system of units, and the page names them so you can check.

What This Number Density Calculator Does

For condensed matter — liquids, solids, glasses, melts — the calculator uses the relation n = ρ NA ÷ M, where ρ is the mass density, M is the molar mass and NA is the Avogadro constant. Multiply mass per unit volume by particles per unit mass and you have particles per unit volume. That is the whole derivation.

For a gas the density is usually the thing you do not know, so the calculator takes a different route. The ideal gas law rearranges to n = P ÷ (kB T), where kB is the Boltzmann constant. Notice what is missing: the identity of the gas. At a given pressure and temperature, nitrogen, argon and carbon dioxide all have the same number density. That is Avogadro's hypothesis stated in modern form, and it is why the gas route needs no molar mass at all.

The hero figure is the number density itself. Below it the grid gives the same quantity per cubic centimetre, the equivalent amount-of-substance concentration in moles per litre, the mean spacing between neighbouring particles, and the mass of a single particle.

How to Use It

  1. Pick the route that matches what you actually know. If you have a density on a datasheet, use the condensed-matter route. If you have a pressure gauge and a thermometer, use the gas route. Do not compute a gas density first and feed it back in — you will just add a rounding step.
  2. Get the molar mass right. It is the mass of one mole of the formula unit you are counting, in grams per mole. Water is 18.015, copper is 63.546, silicon is 28.085. The molar mass calculator will build it from a formula if you would rather not add atomic weights by hand.
  3. Decide whether you are counting molecules or atoms. A cubic metre of water contains one number of molecules and three times as many atoms. The particles-per-formula-unit box makes that choice explicit rather than leaving it to be guessed from context.
  4. Use absolute pressure and absolute temperature for gases. The calculator converts Celsius and Fahrenheit to kelvin for you, but it cannot know whether the pressure you typed came from a gauge that reads zero at atmospheric.
  5. Read the spacing before you trust the exponent. Number densities are enormous numbers and a factor of a thousand is easy to miss in scientific notation. The mean spacing in nanometres is a far more human check.

The Formula and a Worked Example

The Avogadro constant is now an exactly defined number: NA = 6.022 140 76 × 1023 mol−1, as published in the NIST reference on constants, units and uncertainty. Since the 2019 redefinition of the SI base units it has no experimental uncertainty at all; the mole is defined so that this number is exact. The Boltzmann constant is likewise exact at 1.380 649 × 10−23 J K−1, and the two are linked by the molar gas constant R = NA kB.

Work the water default through by hand. The molar mass 18.015 g/mol becomes 0.018015 kg/mol. Dividing the density gives 997 ÷ 0.018015 = 55,342.8 mol per cubic metre, which is 55.34 mol/L — the familiar molarity of pure water. Multiplying by the Avogadro constant gives 55,342.8 × 6.02214076 × 1023 = 3.333 × 1028 molecules per cubic metre, or 3.333 × 1022 per cubic centimetre.

The mean spacing is the cube root of the volume each particle occupies: d = n−1/3. Here that is (3.333 × 1028)−1/3 = 3.11 × 10−10 m, or 0.311 nm. That is the right order for a hydrogen-bonded liquid, and it is close to the oxygen–oxygen distance measured by neutron scattering. The mass per molecule is simply M ÷ NA = 0.018015 ÷ 6.02214076 × 1023 = 2.99 × 10−26 kg.

For the gas route at one standard atmosphere and 20 °C: n = 101,325 ÷ (1.380649 × 10−23 × 293.15) = 2.50 × 1025 per cubic metre. Cool it to 0 °C and it rises to 2.69 × 1025, which is the Loschmidt constant — the number density of an ideal gas at standard temperature and pressure.

Advertisement

Why Number Density and Concentration Are Not the Same Question

Chemists usually work in moles per litre and physicists usually work in particles per cubic metre, and the two communities routinely talk past each other. The conversion is a single multiplication by the Avogadro constant, but the framing differs in a way that matters. Concentration is a bookkeeping quantity for reactions: it tells you how much stuff will react. Number density is a geometric quantity: it tells you how close the particles are, and therefore how often they collide, how strongly they scatter light, and how far a projectile travels before it hits something.

That geometric reading is what makes number density the input to so many other calculations. Mean free path is inversely proportional to number density and collision cross-section. Scattering and absorption coefficients are number density multiplied by a per-particle cross-section. Electrical conductivity in a metal is carrier number density multiplied by charge and mobility. In each case the mole is irrelevant and the head count is everything. If your work is on the reaction side instead, the molarity calculator and the mole fraction calculator stay in the chemist's units throughout.

Where the Ideal Gas Route Breaks Down

The gas relation n = P ÷ kBT assumes particles of zero volume with no forces between them except during instantaneous collisions. Real gases meet that description well at ordinary pressures and comfortably above their condensation temperature. They stop meeting it in three situations worth naming.

Near saturation the attraction between molecules pulls them closer than the ideal law predicts, so the true number density is higher than the calculator says. Steam approaching its dew point and refrigerants near their saturation line both behave this way. At high pressure the finite size of the molecules pushes the other way and the true density falls below the ideal prediction; above roughly 10 bar for a diatomic gas the error becomes visible in the second decimal place, and above 100 bar the ideal law is unusable. At very low pressures the law itself stays excellent, but the assumption behind any continuum treatment fails instead: once the mean free path is comparable to the size of your apparatus, the gas stops behaving like a fluid and starts behaving like a stream of independent particles.

For a compressibility-corrected treatment you need a real-gas equation of state. This page deliberately does not attempt one, because the correction factor depends on the specific gas and its reduced temperature and pressure. The ideal gas law calculator covers the pressure, volume, temperature and mole relationships in the same idealised framework, and the Avogadro's law calculator handles the volume-to-mole proportionality directly.

Number Density in Solids: Where the Formula Quietly Assumes Something

Applying n = ρNA/M to a solid assumes the material is homogeneous and that its measured bulk density reflects the atoms rather than the voids between them. That assumption fails for porous and powdered materials in a way that catches people out. A sintered ceramic with 8 % porosity has a bulk density 8 % below its theoretical density, and the calculator will faithfully report a number density 8 % low for the ceramic phase itself. If you want the atomic packing of the material, use the crystallographic or theoretical density. If you want the atom count in a real component, the bulk density is the right input — but then say so, because the two answers differ.

Alloys need care with the molar mass too. There is no single molar mass for brass; you either treat it as a weighted average and get an average atom count, or you compute each element separately from its mass fraction and add. For a doped semiconductor the dopant number density is a completely different and far smaller number than the host lattice density, and mixing them up by a factor of 10−7 is a classic first-year error. Copper's carrier density of roughly 8.5 × 1028 m−3 happens to match its atom density because copper contributes about one conduction electron per atom, but that coincidence does not generalise.

Using the Answer: What Number Density Feeds Into

Once you have n, several standard results open up. The mean free path of a gas particle is λ = 1 ÷ (√2 π d² n) for hard spheres of diameter d, which is why a vacuum chamber's usable pressure is set by the chamber's size. Optical attenuation through a medium follows the Beer–Lambert form with an absorption coefficient equal to number density times cross-section, and the Beer–Lambert law calculator works that relationship in the chemist's concentration units. The average kinetic energy per particle is three-halves kBT regardless of number density, which is why a hot thin gas and a hot dense gas have the same particle speeds but wildly different heat capacities per unit volume.

MIT OpenCourseWare's Intermediate Heat and Mass Transfer materials develop the kinetic-theory link between particle-level quantities like number density and the transport properties measured at the continuum level, if you want the derivations rather than the results.

Need a website that loads fast and actually works?

Arb Digital builds free tools like this one because useful pages earn attention. If you want tools, calculators or content built for your own audience, we can help.

Browse All Free Tools Talk to Arb Digital

Common Mistakes to Avoid

  • Feeding in gauge pressure — the ideal gas relation needs absolute pressure, and a gauge reads zero when the true pressure is about 101 kPa.
  • Leaving molar mass in kilograms per mole — the box expects grams per mole, the unit every periodic table prints. Entering 0.018 for water gives an answer a thousand times too large.
  • Counting molecules when you meant atoms — a mole of water is one mole of molecules and three moles of atoms, and the difference matters for anything that scatters off individual nuclei.
  • Using bulk density for a porous solid — the pores are counted as material, so the atomic number density comes out low by exactly the porosity fraction.
  • Assuming carrier density equals atom density — it happens to be roughly true for copper and is wildly false for a semiconductor, where dopant levels sit many orders of magnitude below the lattice.

Related Free Tools From Arb Digital

The density calculator gets you the mass density this page consumes, and the density converter moves it between unit systems. For the chemistry side, the molar mass calculator, the moles to grams calculator and the molarity calculator keep everything in moles. On the gas side the ideal gas law calculator and the air density calculator both start from pressure and temperature, and the specific heat calculator takes the energy view of the same collection of particles. Everything Arb Digital publishes sits on the free online tools hub.

Frequently Asked Questions

What is number density in simple terms?

It is a head count of particles divided by the volume they occupy. Unlike mass density it says nothing about how heavy the particles are, and unlike concentration it is expressed per particle rather than per mole. The usual units are particles per cubic metre or per cubic centimetre.

How do I convert number density to molarity?

Divide the number density by the Avogadro constant to get moles per unit volume, then convert the volume unit. A number density of 6.022 times ten to the twenty-third per litre is exactly one mole per litre. The calculator prints the amount concentration alongside the particle count so you do not have to do it manually.

Why does the gas route not ask which gas it is?

Because at a given pressure and temperature an ideal gas has the same number density regardless of what the particles are. That is Avogadro's hypothesis. The identity of the gas changes its mass density, its speed of sound and its heat capacity, but not how many particles occupy a cubic metre.

What is a typical number density for a solid?

Most solids and liquids land between roughly ten to the twenty-eighth and ten to the twenty-ninth atoms per cubic metre, which corresponds to neighbours a few tenths of a nanometre apart. Gases at ordinary room conditions are about a thousand times less dense in particle count, near two and a half times ten to the twenty-fifth per cubic metre.

Can I use this for electron or charge carrier density?

Only if you already know how many carriers each atom contributes. For a metal such as copper the contribution is close to one conduction electron per atom, so the atom count is a fair estimate. For a semiconductor the carrier density is set by doping and temperature and is many orders of magnitude smaller than the lattice atom density, so this route will not give it.

How accurate is the ideal gas route?

It is good to well under one per cent for common gases at ordinary pressures and temperatures well above condensation. It degrades near saturation, where attraction raises the true density, and at high pressure, where molecular volume lowers it. Above roughly ten bar you should be using a real-gas equation of state with a compressibility factor.

Why does the calculator show mean particle spacing?

Because number densities are huge numbers written in scientific notation, and an error of three orders of magnitude is almost invisible in that format. Spacing lands in nanometres for everything, so a wrong unit shows up immediately as a spacing that is absurd rather than as an exponent that looks much like any other exponent.

This tool is provided for educational and preliminary engineering use. The condensed-matter route assumes a homogeneous, non-porous material, and the gas route assumes ideal behaviour with no compressibility correction. Verify critical figures against measured data and a real-gas equation of state where the assumptions do not hold.

Advertisement
Advertisement

Take it further

Need something more advanced? Try the free AI Website Audit & Keyword Research tools, or browse our free WordPress plugins.