› Crystal Structure & Miller Indices Visualizer Back
Materials Science Simulator

Miller Indices Calculator | d-Spacing & Bragg Angle

Calculate d-spacing and Bragg angles θ and 2θ for SC, BCC, FCC and NaCl. Explore a rotating unit cell and Miller plane, with reflection-condition checks. HCP is reference-only, not a diffraction calculation.

Crystal System
Structure Type
Lattice Parameter a
Å
Miller Indices (hkl)
Results
—
d-spacing
—
Bragg Angle θ (Cu Kα)
—
2θ
—
Coordination Number
—
Packing Fraction
—
Atoms / Unit Cell

Crystal
Illustrative XRD — peak heights are not quantitative
Theory & Key Formulas

Cubic d-spacing:

$$d_{hkl}= \frac{a}{\sqrt{h^2+k^2+l^2}}$$

Bragg's Law:

$$n\lambda = 2d\sin\theta \quad (\lambda_{\text{CuK}\alpha}=1.54\,\text{Å})$$

Inputs and operation

Choose a structure and enter the lattice parameter a from 2.00 to 6.00 Å. The numeric field and slider are linked in 0.01 Å increments. h, k and l must be integers from 0 to 4; (000) does not specify a plane.

Worked examples

Increasing a at fixed hkl increases d and decreases 2θ. Changing hkl selects a plane; it does not restrict the entire powder pattern to that single reflection.

BCC: a=3.30 Å, (110) → d=2.3335 Å, θ=19.27°, 2θ=38.54°.

FCC: a=3.65 Å, (220) → d=1.2905 Å, θ=36.63°, 2θ=73.27°.

NaCl: a=5.64 Å, (200) → d=2.8200 Å, θ=15.85°, 2θ=31.69°.

Model and limitations

The calculation uses rounded Cu Kα wavelength λ=1.54 Å and order n=1. Displayed angles are geometric Bragg conditions, not a guarantee of an allowed peak. The illustrative powder pattern uses indices 0–5 and 2θ=10–120°. Heights and widths are arbitrary: atomic scattering factors, texture, absorption and instrumental broadening are not modeled. Do not use it for material identification or quantitative phase analysis.

d = a / √(h²+k²+l²); 2d sinθ = λ; λ = 1.54 Å.

HCP needs an independent lattice parameter c, which this interface does not provide. HCP d-spacing, diffraction angles, curve and crystal drawing are therefore unavailable; the cubic formula is not substituted. Coordination 12, ideal packing fraction 74.0%, and 6 atoms per conventional hexagonal prism are reference values only.

For NaCl, one ion occupies FCC corners and face centers; the other occupies edge centers and the body center. The conventional cell contains four ion pairs, eight ions in total. Displayed sphere radii are schematic, not measured ionic radii. Packing fraction depends on the specified ionic radii and is therefore shown as “—”.

Questions and answers

How do θ and 2θ differ?

θ is the Bragg angle; 2θ is the angle between the incident and diffracted beams. Use the 2θ output when comparing with an experimental diffraction axis.

Why can an angle be displayed without a peak?

A geometric angle can exist for a forbidden reflection. BCC requires an even h+k+l; FCC and NaCl require indices that are all even or all odd. Peaks outside the plotted range are also absent from the curve.

Why is HCP not calculated?

A hexagonal cell needs both a and c, but c cannot be entered here. HCP spacing and diffraction are excluded to avoid displaying incorrect cubic results.

Can this plot identify an unknown material?

No. Peak heights are illustrative and temperature, composition and defects are not modeled. Use this tool to learn the relation between spacing and peak positions in a known cubic structure.

References

🎬 Watch it in motion

Phase Transitions of Matter Explained | Melting, Boiling and Sublimation Visualized
Phase Transitions of Matter Explained | Melting, Boiling and Sublimation Visualized