Bragg's Law Calculator

Solve for diffraction angle, X‑ray wavelength, crystal plane spacing, or reflection order. Interactive visualization of coherent scattering from atomic planes — essential for crystallography, materials characterization, and XRD analysis.

Positive integer (typically 1,2,...)
? NaCl (111): d=2.82Å, λ=1.54Å ? Si (400): d=1.357Å, λ=1.5406Å ? Quartz (101): d=3.34Å, λ=1.54Å
Incident X‑ray beam
Diffracted beam
Crystal planes (d-spacing)
Angle θ (Bragg angle)
100% client-side — calculations and graphics run locally. No data is stored or transmitted.

The Bragg's Law: Foundation of X‑ray Crystallography

Bragg's Law (nλ = 2d sinθ) was derived by Sir William Henry Bragg and his son Sir William Lawrence Bragg in 1913, earning them the Nobel Prize in Physics (1915). It describes the condition for constructive interference of X‑rays scattered by parallel crystal planes separated by distance d. When the path difference between rays reflected from successive planes equals an integer multiple of the wavelength, a diffraction peak is observed at angle θ.

n · λ = 2 · d · sin θ

where n = order of reflection (1,2,3…), λ = X‑ray wavelength, d = interplanar spacing, θ = Bragg angle (angle between beam and crystal plane).

Bragg's law is the central equation in X‑ray diffraction (XRD), a non‑destructive technique to determine crystal structures, phase identification, residual stress, and thin‑film quality. Modern powder diffractometers, single‑crystal instruments, and even high‑energy synchrotron experiments rely on this relationship. The law also applies to electron diffraction and neutron scattering, making it truly universal in structural analysis.

Practical applications in science & industry

  • Pharmaceutical crystallography: Determining polymorphs of drug molecules.
  • Geology & mineralogy: Identifying clay minerals, carbonates, and ore phases.
  • Semiconductor manufacturing: Monitoring epitaxial layer strain and superlattice quality.
  • Corrosion science: Analysing oxide scales and phase transformation.
  • Forensic science: Characterising trace evidence like pigments, explosives.

Derivation of Bragg's Law

Consider two parallel crystallographic planes with spacing d. An incident X‑ray beam with wavelength λ hits the planes at angle θ. The extra path travelled by the wave scattered from the deeper plane is 2d sinθ. For constructive interference, this path difference must equal an integer multiple of λ: nλ = 2d sinθ. This elegant relation links measurable angles directly to atomic‑scale distances.

Characteristic X‑ray wavelengths & common d‑spacings

Target/Anode Kα₁ wavelength (Å) Common crystal plane d-spacing (Å) 2θ peak position (Cu Kα)
Copper (Cu) 1.54060 Si (111) 3.1355 ~28.44°
Molybdenum (Mo) 0.70930 NaCl (200) 2.821 ~31.5° (Mo)
Iron (Fe) 1.93604 Quartz (101) 3.343 ~33.9° (Fe)
Chromium (Cr) 2.28970 Alumina (104) 2.085 ~57.5° (Cr)
For cubic crystals: \( d_{hkl} = \frac{a}{\sqrt{h^2+k^2+l^2}} \), where a is the lattice constant. Example: NaCl (200) → a = 5.64 Å gives d = 2.82 Å.
Case study: Thin‑film solar cells (CIGS)

In Cu(In,Ga)Se₂ photovoltaic absorbers, Bragg’s law is used to track the (112) peak shift. A slight variation in d‑spacing indicates lattice strain due to gallium grading. Using λ = 1.5406 Å (Cu source), the diffraction angle θ is measured with 0.01° precision to compute composition gradients, optimising bandgap and device efficiency. Our calculator replicates the same physics, enabling students to explore how d changes θ.

In a real XRD pattern, peak positions follow Bragg's law, while intensities are modulated by the structure factor, multiplicity, and Lorentz-polarization factors. For example, silicon powder shows its strongest (111) reflection at 2θ ≈ 28.4° (Cu Kα).

How to use this tool

  1. Enter any three known values: order (n), wavelength (λ), d‑spacing, or Bragg angle θ.
  2. Select the variable you want to solve for using the dropdown.
  3. Click Compute Bragg's Law – the missing parameter will be instantly calculated.
  4. The interactive canvas updates to visualise incident/diffracted beams, crystal planes and the Bragg angle.
  5. Toggle example buttons to explore real crystallographic data.

All calculations use consistent internal units (converted to Ångströms), ensuring precision. Angle is always in degrees, and the tool automatically checks for physically possible values (e.g., sinθ ≤ 1).

Frequently Asked Questions

If nλ/(2d) exceeds 1, no real Bragg angle exists — the order reflection is not geometrically possible. The calculator will raise an error; you can decrease λ, increase d, or lower n.

Higher orders (n > 3) are usually very weak or overlap with other reflections. In practice, n=1 is the most intense. The calculator allows positive decimals but recommends integer orders.

Yes, Bragg’s law is equally valid for electrons (TEM/LEED) and neutrons, though the wavelength is given by the de Broglie relation. Input the appropriate λ value.

Wavelength and d‑spacing are often expressed in Ångströms (1 Å = 10⁻¹⁰ m) or nanometers. The calculator supports both and automatically converts internally.

The calculator uses double-precision arithmetic and is accurate to at least 6 decimal places. However, real XRD experiments have additional errors (sample displacement, zero shift). The tool provides an uncertainty estimate for common inputs (see after calculation).
Authoritative references: Cullity, B.D. "Elements of X‑Ray Diffraction"; Bragg, W.L. "The Diffraction of Short Electromagnetic Waves by a Crystal" (1913); International Centre for Diffraction Data (ICDD). This tool is based on standard crystallography literature and open-source scientific computing principles. For feedback, use the "Report" button next to results.