Cubic Cell Calculator

Find the density of a cubic unit cell, or back-solve edge length from a known density, with built-in presets for simple cubic, BCC, and FCC lattices.

🧊 Cubic Cell Calculator
pm
g/mol
g/cm³
g/mol
Density (ρ)
—
Cell Volume
—

🧊 What is a Cubic Unit Cell?

A cubic unit cell is the smallest repeating box of atoms that, stacked in three dimensions, builds an entire crystal with all sides equal length and all angles at 90 degrees. Crystallographers describe every crystalline solid by its unit cell, and the cubic system is the simplest and most common starting point for teaching how atomic arrangement determines a material's bulk properties, including its density.

This calculation connects the microscopic world of individual atoms to a macroscopic, measurable property. Materials scientists use it to verify a proposed crystal structure by comparing a calculated theoretical density against the density measured with a balance and a graduated cylinder. Metallurgists use the same relationship to identify unknown alloys or confirm phase changes, since body-centered cubic and face-centered cubic phases of the same metal (like iron at different temperatures) have measurably different densities. Chemistry and materials science courses use it as a standard exercise connecting stoichiometry, geometry, and Avogadro's number in a single formula.

A common point of confusion is what "atoms per unit cell" (Z) actually counts. It is not simply the number of atom centers drawn inside or on the edges of the cube. Corner atoms are shared among 8 neighboring unit cells, so each contributes only 1/8 of an atom to any single cell, and face-centered atoms are shared between 2 cells, contributing 1/2 each. Working through this sharing is exactly why simple cubic, body-centered cubic, and face-centered cubic come out to Z = 1, 2, and 4 respectively, even though a simple cubic cell diagram shows 8 atoms drawn on it.

This calculator handles both directions of the problem: computing density from a known edge length, Z, and molar mass, or back-solving the edge length when density is already known from measurement. Built-in presets set Z automatically for the three most common metallic lattice types, and the diagram updates to show exactly which atoms (corner, body-centered, or face-centered) are included in the current lattice.

📐 Formula

ρ  =  ZM / (a³ × NA)
ρ = theoretical density (g/cm³)
Z = number of atoms per unit cell (1 for simple cubic, 2 for BCC, 4 for FCC)
M = molar mass (g/mol)
a = edge length of the cubic unit cell, converted to cm (cell volume V = a³)
NA = Avogadro's number = 6.0221×10²³ mol⁻¹
Rearranged for edge length: a = (ZM / (ρ × NA))1/3
Example: Silver (FCC): Z = 4, M = 107.87 g/mol, a = 408.6 pm → ρ ≈ 10.503 g/cm³, close to silver's accepted density of about 10.49 g/cm³.

📖 How to Use This Calculator

Steps

1
Choose a mode - select Find Density or Find Edge Length, depending on which quantity is unknown.
2
Pick a lattice type - choose Simple Cubic, BCC, FCC, or Custom, which sets the number of atoms per unit cell (Z).
3
Enter the remaining values - fill in edge length and molar mass (or density and molar mass), then click Calculate to see the result and the updated unit cell diagram.

💡 Example Calculations

Example 1 — Silver, face-centered cubic

Silver crystallizes as FCC with edge length 408.6 pm and molar mass 107.87 g/mol.

1
Z = 4, a = 408.6 pm, M = 107.87 g/mol
2
V = a³ = (408.6 pm)³ = 68.22 ų
3
ρ = ZM / (V × NA) = 10.503 g/cm³
Theoretical density is 10.503 g/cm³, close to silver's accepted density of about 10.49 g/cm³.
Try this example →

Example 2 — Tungsten, body-centered cubic

Tungsten crystallizes as BCC with edge length 316.5 pm and molar mass 183.84 g/mol.

1
Z = 2, a = 316.5 pm, M = 183.84 g/mol
2
V = a³ = (316.5 pm)³ = 31.70 ų
3
ρ = ZM / (V × NA) = 19.257 g/cm³
Theoretical density is 19.257 g/cm³, close to tungsten's accepted density of about 19.25 g/cm³.
Try this example →

Example 3 — Aluminum, edge length from density

Aluminum is FCC with a measured density of 2.70 g/cm³ and molar mass 26.98 g/mol. What is its unit cell edge length?

1
Z = 4, ρ = 2.70 g/cm³, M = 26.98 g/mol
2
V = ZM / (ρ × NA) = 66.37 ų
3
a = V1/3 = 404.88 pm (4.0488 Å)
Edge length is 404.88 pm, matching aluminum's accepted lattice constant of about 404.95 pm.
Try this example →

Example 4 — Sodium, edge length from density

Sodium is BCC with a measured density of 0.971 g/cm³ and molar mass 22.99 g/mol. What is its unit cell edge length?

1
Z = 2, ρ = 0.971 g/cm³, M = 22.99 g/mol
2
V = ZM / (ρ × NA) = 78.63 ų
3
a = V1/3 = 428.42 pm (4.2842 Å)
Edge length is 428.42 pm, close to sodium's accepted lattice constant of about 429.06 pm.
Try this example →

❓ Frequently Asked Questions

What is the formula for cubic unit cell density?+
Density rho = ZM / (a cubed times NA), where Z is the number of atoms per unit cell, M is the molar mass in g/mol, a is the cubic cell edge length converted to cm, and NA is Avogadro's number, 6.022 times 10 to the 23 per mole.
How do I find edge length from density instead of density from edge length?+
Rearrange the formula to a = (ZM / (rho times NA)) to the power of one third. Switch to Find Edge Length mode, enter the known density, Z, and molar mass, and the calculator solves for the edge length directly in picometers and angstroms.
What is Z (atoms per unit cell) for simple cubic, BCC, and FCC?+
Simple cubic has Z = 1 (8 corner atoms, each shared by 8 cells, contributing 8 times 1/8 = 1). Body-centered cubic (BCC) has Z = 2 (the same 8 corners plus 1 full body-centered atom). Face-centered cubic (FCC) has Z = 4 (8 corners plus 6 face-centered atoms, each shared by 2 cells, contributing 6 times 1/2 = 3, plus the 1 from the corners).
Why does the calculator ask for edge length in picometers?+
Atomic-scale unit cell dimensions are typically a few hundred picometers, far too small to conveniently work with in centimeters or meters. The calculator handles the conversion internally, so the final density comes out directly in the familiar g/cm cubed.
Is this calculator the same as the Unit Cell Density Calculator?+
They share the same underlying physics, but this calculator adds a second mode that back-solves edge length from a known density, plus one-click lattice presets and a diagram that updates to show corner, body-center, or face-center atoms depending on the selected structure. The Unit Cell Density Calculator computes density only, in one direction.
How accurate is theoretical density compared to the real measured density?+
Theoretical density from this formula assumes a perfect, defect-free crystal lattice. Real measured densities are usually very close, within a percent or two, but slightly lower, since actual crystals contain vacancies, dislocations, and impurities that reduce the true mass per unit volume.
Can Z be a number other than 1, 2, or 4?+
Yes. Those three values cover the common metallic lattice types, but compounds with multiple formula units per cell, or less common lattice types, can have other whole-number Z values. Select Custom in the lattice dropdown and enter any positive whole number directly.
Why is my calculated density slightly different from a textbook value?+
Small differences usually come from rounding in the published edge length or molar mass, or from the textbook using a slightly different measured lattice constant. Differences under about 1 percent are normal and expected for this type of theoretical calculation.
Does temperature affect unit cell density?+
Yes, indirectly. Most materials expand slightly as temperature rises, which increases the edge length a and therefore decreases the calculated density. Reference edge lengths are usually reported at room temperature (around 293 to 298 K) unless stated otherwise.
What is the difference between Z and the coordination number?+
Z (atoms per unit cell) counts how many whole atoms belong to one unit cell after accounting for shared corners, edges, and faces. Coordination number counts how many nearest-neighbor atoms directly touch a given atom, for example 8 in BCC and 12 in FCC. They describe different things and are not interchangeable.
Why is simple cubic rare among real metals?+
Simple cubic packing leaves a lot of empty space between atoms (about 52 percent packing efficiency), so it is energetically unfavorable for most metals, which prefer the denser BCC (68 percent) or FCC (74 percent) arrangements. Polonium is the best-known real element with a simple cubic structure at room temperature.

What is the formula for cubic unit cell density?

Density rho = ZM / (a cubed times NA), where Z is the number of atoms per unit cell, M is the molar mass in g/mol, a is the cubic cell edge length converted to cm, and NA is Avogadro's number, 6.022 times 10 to the 23 per mole.

How do I find edge length from density instead of density from edge length?

Rearrange the formula to a = (ZM / (rho times NA)) to the power of one third. Switch to Find Edge Length mode, enter the known density, Z, and molar mass, and the calculator solves for the edge length directly in picometers and angstroms.

What is Z (atoms per unit cell) for simple cubic, BCC, and FCC?

Simple cubic has Z = 1 (8 corner atoms, each shared by 8 cells, contributing 8 times 1/8 = 1). Body-centered cubic (BCC) has Z = 2 (the same 8 corners plus 1 full body-centered atom). Face-centered cubic (FCC) has Z = 4 (8 corners plus 6 face-centered atoms, each shared by 2 cells, contributing 6 times 1/2 = 3, plus the 1 from the corners).

Why does the calculator ask for edge length in picometers?

Atomic-scale unit cell dimensions are typically a few hundred picometers, far too small to conveniently work with in centimeters or meters. The calculator handles the conversion internally, so the final density comes out directly in the familiar g/cm cubed.

Is this calculator the same as the Unit Cell Density Calculator?

They share the same underlying physics, but this calculator adds a second mode that back-solves edge length from a known density, plus one-click lattice presets and a diagram that updates to show corner, body-center, or face-center atoms depending on the selected structure. The Unit Cell Density Calculator computes density only, in one direction.

How accurate is theoretical density compared to the real measured density?

Theoretical density from this formula assumes a perfect, defect-free crystal lattice. Real measured densities are usually very close, within a percent or two, but slightly lower, since actual crystals contain vacancies, dislocations, and impurities that reduce the true mass per unit volume.

Can Z be a number other than 1, 2, or 4?

Yes. Those three values cover the common metallic lattice types, but compounds with multiple formula units per cell, or less common lattice types, can have other whole-number Z values. Select Custom in the lattice dropdown and enter any positive whole number directly.

Why is my calculated density slightly different from a textbook value?

Small differences usually come from rounding in the published edge length or molar mass, or from the textbook using a slightly different measured lattice constant. Differences under about 1 percent are normal and expected for this type of theoretical calculation.

Does temperature affect unit cell density?

Yes, indirectly. Most materials expand slightly as temperature rises, which increases the edge length a and therefore decreases the calculated density. Reference edge lengths are usually reported at room temperature (around 293 to 298 K) unless stated otherwise.

What is the difference between Z and the coordination number?

Z (atoms per unit cell) counts how many whole atoms belong to one unit cell after accounting for shared corners, edges, and faces. Coordination number counts how many nearest-neighbor atoms directly touch a given atom, for example 8 in BCC and 12 in FCC. They describe different things and are not interchangeable.

Why is simple cubic rare among real metals?

Simple cubic packing leaves a lot of empty space between atoms (about 52 percent packing efficiency), so it is energetically unfavorable for most metals, which prefer the denser BCC (68 percent) or FCC (74 percent) arrangements. Polonium is the best-known real element with a simple cubic structure at room temperature.