Bragg's Law Calculator – X-ray Diffraction Angles, d-Spacings and Wavelengths
In 1913 William Henry Bragg and his son Lawrence showed that X-rays scattered by a crystal behave as if they were reflected by its planes of atoms. Waves reflected from neighbouring planes travel different distances, and they only reinforce each other when that extra distance is a whole number of wavelengths. The result, Bragg's law nλ = 2d sin θ, is the foundation of X-ray, electron and neutron diffraction. This Bragg's law calculator solves it for any one unknown, lists every reflection a crystal can give, and indexes a measured cubic powder pattern.
Deriving the path difference
Take two parallel planes a distance d apart and a beam arriving at the glancing angle θ. The ray reflected from the lower plane travels an extra d sin θ on the way in and another d sin θ on the way out, a total path difference of 2d sin θ. Constructive interference needs that to equal nλ. The interactive Bragg construction above highlights both segments and draws exactly n wavelengths along them.
θ versus 2θ
Bragg's θ is measured between the beam and the planes, but a diffractometer measures the angle between the incident and the diffracted beams, which is 2θ. Always halve a peak position from an XRD pattern before using it in the formula. Confusing the two is the most common homework mistake, which is why the tool checks whether an angle typed as θ reads better as 2θ.
Tube lines, Kβ filters and the Kα doublet
Laboratory X-ray tubes emit characteristic lines of their anode metal. Copper gives Kα₁ = 1.540562 Å and Kα₂ = 1.54439 Å; their 2 : 1 weighted average 1.541838 Å is quoted as Cu Kα. The weaker Kβ line is removed by a thin filter of the element one below the anode, nickel for copper. At high angles the Kα₁/Kα₂ pair separates visibly: by about 0.11° at Cu (111) but almost 0.9° at Cu (420).
Miller indices and d-spacing
Lattice planes are labelled by Miller indices (hkl). For a cubic crystal d = a / √(h² + k² + l²), so copper (a = 3.6149 Å) has d₁₁₁ = 2.0871 Å and a (111) peak at 2θ = 43.32° with Cu Kα₁. The cell geometry for every crystal system comes from the Unit Cell Calculator. Higher orders are folded into the indices: the second order of (111) is written as the (222) reflection.
Why reflections go missing
Bragg's law says where a peak can appear; the structure factor says whether it does. In a body-centred lattice the centre atoms cancel every reflection with h + k + l odd. In a face-centred lattice h, k and l must be all even or all odd. Diamond and silicon also lose all-even reflections with h + k + l = 4n + 2, such as (200) and (222).
Indexing a cubic pattern
Squaring Bragg's law for a cubic crystal gives sin²θ = (λ² / 4a²) · N with N = h² + k² + l². Divide every sin²θ by the first one and look for whole-number ratios:
SC 1 : 2 : 3 : 4 : 5 : 6 : 8 … (no 7)
BCC 2 : 4 : 6 : 8 : 10 : 12 : 14 … → 1 : 2 : 3 : 4 : 5 : 6 : 7
FCC 3 : 4 : 8 : 11 : 12 : 16 : 19 …
Diamond 3 : 8 : 11 : 16 : 19 : 24 : 27 …SC and BCC agree for the first six lines; a seventh line decides it. The indexing tab assigns N to each peak, refines the lattice parameter by least squares and lists any allowed lines you did not observe.
Electron and neutron diffraction
Moving particles diffract too, with the de Broglie wavelength λ = h/p from the de Broglie wavelength calculator. 100 kV electrons have λ = 3.70 pm (relativistic), so their Bragg angles are only a few milliradians. Thermal neutrons at 25.3 meV have λ ≈ 1.80 Å, close to Cu Kα, and see light atoms and magnetism that X-rays miss.
Limits
Bragg's law fixes peak positions exactly, but not their intensities. The estimated heights here come from a deliberately simple model with Thomas–Fermi scattering factors and one thermal factor; real patterns also depend on absorption, texture and peak shape. Space-group absences from screw axes and glide planes are not modelled.