Bragg's Law Calculator – X-ray Diffraction, Angle & Crystal Spacing
Calculate any Bragg's Law parameter — wavelength, crystal plane spacing, diffraction angle, or order — from the other three values.
Select the unknown parameter, enter the three known values, and instantly solve Bragg's equation: nλ = 2d sin θ.
Bragg's Law Calculator – X-ray Diffraction, Angle & Crystal Spacing
Calculate any Bragg's Law parameter — wavelength, crystal plane spacing, diffraction angle, or order — from the other three values.
About Bragg's Law and X-ray diffraction
Bragg's Law, formulated by William Henry Bragg and his son William Lawrence Bragg in 1913, describes the conditions under which a beam of X-rays (or neutrons, or electrons) will be coherently reflected by the regularly spaced planes of atoms in a crystal. The law is expressed as nλ = 2d sin θ, where n is a positive integer (the diffraction order), λ is the wavelength of the incident radiation, d is the spacing between successive parallel crystal planes (the interplanar spacing or d-spacing), and θ is the glancing angle between the incident beam and the reflecting planes — called the Bragg angle.
The physical reasoning is elegant. When a beam of X-rays strikes a crystal, each family of parallel atomic planes acts as a partial mirror, reflecting a fraction of the beam. The beam reflected from the second plane travels a longer path than the one reflected from the first plane. This extra path length is 2d sin θ. For constructive interference — a bright diffraction peak — this extra path must be an integer multiple of the wavelength: 2d sin θ = nλ. When the condition is not met, the reflections cancel by destructive interference and no peak is observed.
The practical power of Bragg's Law is that it connects a directly measurable quantity (the diffraction angle θ) to the microscopic geometry of the crystal (the d-spacing). By shining X-rays of known wavelength onto a crystal and measuring the angles at which diffraction peaks occur, one can calculate the interplanar spacings. Combined with the symmetry information encoded in the relative intensities of the peaks, this allows the complete three-dimensional structure of the crystal — the positions of every atom — to be determined. This technique, called X-ray crystallography, has been the single most important tool in structural science, responsible for determining the structures of thousands of minerals, metals, small molecules, and biological macromolecules including DNA and proteins.
Common X-ray sources used in diffraction experiments include copper Kα radiation (λ = 0.15406 nm), molybdenum Kα (λ = 0.07107 nm), and chromium Kα (λ = 0.22897 nm). Synchrotron sources provide tunable, highly intense beams that allow measurements at a single crystal orientation. Neutron diffraction complements X-ray work by being sensitive to light atoms (especially hydrogen) and to magnetic ordering.
This calculator solves Bragg's equation for any one of the four parameters — λ, d, θ, or n — given the other three. Wavelength and d-spacing are entered in nanometres; the angle is in degrees; the diffraction order is a dimensionless positive integer.
Bragg's Law examples
Common X-ray diffraction scenarios showing how to apply nλ = 2d sin θ.
| tool.braggs-law-calculator.examples.colInput | Unknown | Context |
|---|---|---|
| d = 0.203 nm, θ = 22.5°, n = 1 | λ ≈ 0.155 nm | Finding the Cu Kα wavelength from a known crystal. Close to the accepted 0.1541 nm, confirming the setup. |
| λ = 0.154 nm, θ = 30°, n = 1 | d = 0.154 nm | Calculating the d-spacing of a crystal plane from a diffraction peak at 30°. |
| λ = 0.154 nm, d = 0.203 nm, n = 1 | θ ≈ 22.2° | Finding the Bragg angle for the first-order reflection of Cu Kα from a standard silicon crystal plane. |
| λ = 0.154 nm, d = 0.203 nm, θ = 22.5° | n ≈ 1 | Confirming that the observed peak is first-order. Non-integer results would indicate measurement error. |
How to use the Bragg's Law calculator
- Select the parameter you want to solve for: Wavelength, Crystal Plane Spacing, Bragg Angle, or Diffraction Order.
- Enter the three known values. Wavelength and d-spacing are in nanometres (nm); angle is in degrees; n is a positive integer.
- Click Calculate. The result appears along with a verification showing 2d sin θ.
- Check that the verification value matches nλ to confirm your inputs are consistent.
- Click Reset to start a new calculation or switch the unknown parameter.
Bragg's Law FAQ
What is Bragg's Law?
Bragg's Law is the condition for constructive interference of X-rays (or other waves) reflected from parallel planes of atoms in a crystal: nλ = 2d sin θ. When this condition is met, reflected waves add in phase and a diffraction peak is observed. It was derived by W.H. and W.L. Bragg in 1913 and immediately used to determine the first crystal structures.
What is the Bragg angle?
The Bragg angle θ is the glancing angle between the incident X-ray beam and the crystal plane — not the angle from the surface normal. It ranges from 0° to 90°. Because sin θ must lie between 0 and 1, only wavelengths satisfying λ ≤ 2d can produce a first-order Bragg peak. Short-wavelength X-rays (small λ) can access higher diffraction orders from any given plane.
What are d-spacings and how do they relate to crystal structure?
The d-spacing (or interplanar spacing) is the perpendicular distance between successive parallel planes of atoms defined by the Miller indices (hkl). Different crystallographic planes in the same crystal have different d-spacings, giving rise to different Bragg peaks at different angles. Measuring a set of d-spacings uniquely identifies the crystal system and lattice parameters, and with intensities the full atomic structure.
Can Bragg's Law be used for neutrons or electrons?
Yes. Bragg's Law applies to any wave with a wavelength comparable to atomic spacings (roughly 0.01–1 nm). Neutron diffraction uses thermal neutrons with de Broglie wavelengths in the X-ray range and is particularly powerful for locating hydrogen atoms and studying magnetic structures. Electron diffraction is used for thin films and surface analysis. The same nλ = 2d sin θ formula applies.
What does the diffraction order n mean?
The diffraction order n is a positive integer (1, 2, 3, …) that counts how many full wavelengths fit in the extra path length 2d sin θ. In practice, first-order peaks (n = 1) are the strongest and most commonly measured. Second and higher orders are weaker and correspond to larger angles or equivalently to apparent d-spacings of d/n. Many texts absorb n into the d-spacing definition, writing λ = 2d* sin θ with d* = d/n.
Why do X-rays produce Bragg diffraction but visible light does not?
Constructive interference requires the wavelength to be comparable to the spacing between scattering centres. Interplanar spacings in crystals are typically 0.1–0.5 nm. Visible light has wavelengths of 400–700 nm — thousands of times larger — so it cannot resolve individual atom planes. X-rays, with wavelengths in the 0.01–1 nm range, are perfectly matched to crystal lattice spacings, making them the ideal probe for crystal structure determination.