› XRD Calculator Back
Materials Science

X-Ray Diffraction (XRD) Calculator

Select a crystal structure and X-ray wavelength to calculate allowed reflections, d-spacings, 2-theta angles, and Scherrer peak broadening.

Crystal Structure Parameters
Crystal structure
Lattice constant a (Å)
Å
X-Ray Source
X-ray source
Scherrer broadening
Crystallite size L (nm)
nm
XRD scan animation (Bragg condition)
—
Scan angle 2θ (°)
—
d = λ/(2sinθ) (Å)
—
Highlighted reflection hkl
—
Wavelength λ (Å)
Incident X-rays Diffracted X-rays Lattice planes / XRD pattern
Results
—
Strongest peak 2θ (°)
—
d-spacing (Å)
—
Active peaks
—
Peak width B (°)
Diffraction pattern
#hkld (Å)2θ (°)B (°)Intensity
Theory & key formulas

Bragg's law: $2d_{hkl}\sin\theta = \lambda$

Interplanar spacing (cubic crystal): $$d_{hkl}=\frac{a}{\sqrt{h^2+k^2+l^2}}$$

Scherrer equation: $$B = \frac{K\lambda}{L\cos\theta}$$ (K=0.9)

What This Simulator Shows

X-ray diffraction peaks appear only when Bragg's law is satisfied and the selected crystal structure allows that reflection. Changing the lattice constant moves the peak positions, while changing crystallite size changes peak broadening.

$$n\lambda = 2d\sin\theta$$

How To Read The Results

The bar chart shows relative diffraction intensity versus 2θ. The unit-cell sketch gives a quick visual check of the selected lattice. The peak table lists the strongest allowed reflections with hkl index, d-spacing, 2θ, and Scherrer width.

Applications And Limits

XRD is useful for phase identification, lattice-constant checks, crystallite-size estimation, and residual-stress screening. Peak positions are usually more reliable than peak heights in a simplified simulator, because real intensities depend on texture, absorption, instrument broadening, and sample preparation.

How to Use

  1. Choose the crystal structure (FCC, BCC, SC, diamond cubic or HCP) and set the lattice constant a (2.5–6.0 Å) with the slider or number field; for HCP also set c (3.0–10.0 Å)
  2. Choose the X-ray source (Cu Kα 1.5406 Å, Mo Kα 0.7093 Å or Co Kα 1.7902 Å)
  3. d-spacings and 2θ follow from Bragg's law (nλ = 2d sinθ, n = 1) and update immediately; the crystallite size L sets the Scherrer width B = Kλ/(L cosθ) shown for each peak

Worked Example

FCC with a = 3.65 Å (γ-Fe type) and Cu Kα (λ = 1.5406 Å): the (111) spacing is d = 3.65/√3 = 2.108 Å, so the peak appears at 2θ = 2 arcsin(1.5406/(2×2.108)) ≈ 42.9°. (200) has d = a/2 = 1.825 Å at 2θ = 49.9°, and (220) has d = 1.291 Å at 2θ = 73.3°. With L = 50 nm the (111) Scherrer width is B ≈ 0.17° (K = 0.9).

Practical Notes

  1. With a Cu tube, the Kα1 (1.54056 Å) and Kα2 (1.54439 Å) doublet separates noticeably above 2θ ≈ 80°, so size estimates from high-angle peaks need correction
  2. Intensities here are relative values from multiplicity, structure factor, Lorentz-polarization and an approximate form factor; thermal vibration, preferred orientation and instrument broadening are not included
  3. Crystallite size can change from about 1 nm to 1 µm with annealing or working, so compare patterns measured under the same conditions

🎬 Watch it in motion

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