How this instrument works
Miller indices (h, k, l) are the standard shorthand crystallographers use to label a family of parallel planes cutting through a crystal lattice. Rather than describing a plane by three points in space, Miller indices describe it by how it intersects the crystal's three axes — specifically, by the reciprocals of those intercepts, cleared of fractions. The (111) plane, the (100) plane, the (200) plane: each label uniquely identifies a distinct orientation and spacing of atomic planes within the same crystal.
Interplanar spacing, d, is the perpendicular distance between adjacent planes in that (hkl) family — and it is exactly the quantity Bragg's law (n-lambda = 2d sin(theta)) uses to convert an X-ray diffraction angle into structural information about a crystal. For the simplest crystal geometry, a cubic lattice (equal edge lengths, all 90-degree angles), that spacing reduces to a clean closed-form expression: d = a / sqrt(h^2 + k^2 + l^2), where a is the cubic lattice constant — the length of one edge of the repeating unit cell.
This calculator implements exactly that cubic-crystal formula, so it is scoped to cubic materials only — face-centered cubic metals like copper or aluminum, rock-salt structures like NaCl, diamond-cubic silicon, and similar. Non-cubic crystal systems (tetragonal, hexagonal, orthorhombic, and so on) use different, more involved d-spacing formulas that also depend on the specific unit-cell angles, since those lattices aren't equal along every axis the way a cube is.
- Enter the cubic lattice constant, a, in Angstrom into Cubic lattice constant, a (Angstrom) — the edge length of the repeating cubic unit cell.
- Enter the plane's three Miller indices into Miller index h, Miller index k, and Miller index l.
- Read Interplanar spacing, d (Angstrom) below the inputs — it updates instantly as any field changes.
- This formula applies to cubic crystal systems only; a non-cubic material (hexagonal, tetragonal, etc.) needs a different d-spacing formula that this calculator does not compute.
- Larger h, k, l combinations always shrink d — higher-index planes are more closely spaced, which is why high-angle diffraction peaks correspond to higher-index planes.
Worked example — the (111) planes in copper
Copper is face-centered cubic with a real, well-known lattice constant of 3.615 Angstrom. Enter 3.615 into Cubic lattice constant, a (Angstrom), then 1 into each of Miller index h, Miller index k, and Miller index l for the (111) plane family. Interplanar spacing, d reads about 2.0871 Angstrom, from 3.615 / sqrt(1^2+1^2+1^2) = 3.615 / sqrt(3).
That 2.0871 Angstrom figure is the actual real-space spacing between successive (111) atomic planes stacked through the copper crystal — plug it into Bragg's law with copper's characteristic X-ray wavelength and it predicts exactly where the (111) diffraction peak shows up in a copper powder diffraction pattern, which is the whole reason crystallographers need this number in the first place.
Questions
Does this formula work for any crystal, or only cubic ones?
Only cubic crystals — where the unit cell has equal edge lengths along all three axes and all angles are 90 degrees. Cubic symmetry is what lets a single lattice constant, a, and the simple sum h^2+k^2+l^2 fully describe the geometry. Tetragonal, orthorhombic, hexagonal, and other lower-symmetry crystal systems need a more general d-spacing formula that also brings in each axis's own length and the angles between them.
What do the Miller indices h, k, l actually represent?
They're the reciprocals of where a plane intercepts the crystal's three axes (in units of the lattice constant), cleared of fractions and reduced to the smallest integers. A (100) plane intercepts only the a-axis; a (111) plane intercepts all three axes at equal distances. Negative indices are written with a bar over the digit (in plain text, sometimes as a minus sign) and mean the plane crosses that axis on the negative side.
Why does d get smaller as h, k, l get larger?
Because d is inversely proportional to sqrt(h^2+k^2+l^2), and higher Miller indices always increase that sum. Physically, higher-index planes are packed more densely through the crystal — there are more of them per unit length along that direction — so the perpendicular gap between adjacent planes shrinks. This is also why higher-index reflections appear at larger diffraction angles in Bragg's law.
How is interplanar spacing connected to X-ray diffraction?
Through Bragg's law, n x lambda = 2 x d x sin(theta), where lambda is the X-ray wavelength and theta is the angle at which constructive interference (a diffraction peak) occurs. Interplanar spacing d is the input Bragg's law needs from the crystal structure; this calculator supplies exactly that value for a cubic lattice given its Miller indices, which is the standard first step in interpreting a powder X-ray diffraction pattern.
Can h, k, or l be zero or negative?
Yes. A zero index means the plane never intercepts that axis (it runs parallel to it) — the (100) plane, for instance, only cuts the a-axis. A negative index means the plane intercepts that axis on the negative side of the origin; the formula itself only depends on h^2+k^2+l^2, so the sign doesn't change the computed spacing, only the plane's labeled orientation.