Bragg's law (nλ = 2d·sinθ) is the foundational equation of X-ray crystallography, explaining exactly which angles produce a detectable diffraction peak when X-rays scatter off a crystal's atomic planes. This calculator solves the equation for any one of its three variables — angle, wavelength, or spacing — given the other two plus the diffraction order.
How Bragg's law works
When X-rays strike a crystal, they scatter off successive parallel planes of atoms. Most scattered waves cancel out through destructive interference, but at specific angles the path-length difference between waves reflecting off adjacent planes equals a whole number of wavelengths — those waves stay in phase and reinforce each other, producing a measurable diffraction peak. William Lawrence Bragg and his father William Henry Bragg formalized this condition in 1913 as nλ = 2d·sinθ, where the path difference 2d·sinθ (twice the spacing times the sine of the incidence angle) must equal an integer multiple n of the wavelength λ.
Inputs and what they mean
Wavelength (λ) is the X-ray source's characteristic emission line — Cu Kα radiation at ≈0.154 nm (1.54 Å) is the most common lab source, though Mo Kα (≈0.071 nm) and synchrotron sources are also used. Interplanar spacing (d) depends on the crystal's unit cell dimensions and the specific set of lattice planes (Miller indices) being probed; it is usually on the same order of magnitude as the wavelength, which is what makes X-ray diffraction possible at all. Diffraction order (n) is almost always 1 in practice, since higher-order reflections from the same planes are typically much weaker and often indistinguishable from a different plane's first-order reflection. Diffraction angle (θ) is the angle between the incident beam and the lattice plane — note that most instruments report 2θ (the angle between the incident and diffracted beams), so halve a reported 2θ value before entering it here.
Limits and edge cases
Bragg's law has no solution when nλ/2d exceeds 1, since sine cannot exceed 1 — physically, this means the chosen order's reflection is impossible for that wavelength and spacing (the X-ray wavelength is too long, or the order too high, for the given lattice spacing). The calculator flags this case explicitly rather than returning an invalid angle. Bragg's law also treats the crystal as a simple stack of reflecting planes; it does not by itself predict peak intensity (which depends on the crystal structure factor) or account for effects like thermal vibration, crystallite size broadening, or multiple scattering — those require the fuller kinematic or dynamical theory of diffraction covered in crystallography texts.