Shine X-rays at a crystal and they bounce off its atomic planes in a pattern that reveals the crystal’s inner architecture — spacings measured in tenths of nanometres, read from angles on a detector. The translator between those worlds is Bragg’s law, one short equation: nλ = 2d sin θ. This Bragg’s law calculator solves it in any direction — diffraction angle from wavelength and plane spacing, wavelength from an observed angle, or the spacing d itself — with the crystallographer’s 2θ convention handled for you.









Bragg’s Law and Where It Comes From

Picture X-rays reflecting off two successive atomic planes separated by spacing d. The ray bouncing off the deeper plane travels an extra 2d sin θ compared with the surface ray. When that extra path equals a whole number of wavelengths, the two reflections arrive in step and reinforce — a bright diffraction peak. That condition is the law: nλ = 2d sin θ, with n the diffraction order, λ the wavelength, and θ the angle between the incoming ray and the crystal planes (not the surface normal). W. L. Bragg’s 1913 derivation turned X-ray diffraction from a curiosity into the measuring instrument of crystallography within a year.

Worked Example: Copper X-Rays on Rock Salt

The workhorse X-ray tube emits copper K-alpha radiation at λ = 0.154 nm. For the (200) planes of sodium chloride the spacing is d = 0.282 nm. First order (n = 1): sin θ = 0.154 ÷ (2 × 0.282) = 0.273, so θ = 15.85° — and the diffractometer, which reports the angle between incoming and outgoing beams, records the peak at 2θ = 31.7°. Measure that peak position, invert the law, and you have read an atomic spacing of 2.82 angstroms off a chart — the everyday miracle of the technique.

Theta Versus 2-Theta: The Convention Trap

Bragg’s law is written with θ measured from the planes. Diffractometers measure the deflection between the incoming and diffracted beams, which is 2θ. Published peak lists, powder patterns, and instrument software are nearly all in 2θ, so halving the instrument reading before applying the law is the field’s most repeated keystroke — and forgetting it is the most repeated error, shifting every computed spacing by a large factor. This calculator reports both angles side by side so the conversion is never silently wrong.

Orders of Diffraction

The integer n counts how many wavelengths fit in the path difference. Second order from the same planes appears where sin θ doubles: for the NaCl example, sin θ = 0.546 gives θ ≈ 33.1°. Higher orders weaken quickly and many are systematically absent for structural reasons — which planes exist in a given crystal is governed by its symmetry (Miller indices and systematic absences), a richness beyond the law itself. When sin θ would exceed 1, that order simply cannot diffract: the calculator says so rather than inventing an angle.

What Bragg’s Law Built

From these spacings, crystallographers reconstruct electron density and locate every atom in a structure: the double helix was read out of Rosalind Franklin’s diffraction data, and the modern database holds over two hundred thousand protein structures solved this way. Materials science runs on it too — phase identification of ores and alloys, stress measurement in turbine blades, and the quality control of every semiconductor wafer trace back to peaks positioned by nλ = 2d sin θ.

Common Mistakes

Feeding 2θ where θ belongs tops the list. Second is units: wavelength and spacing must share a unit (nanometres with nanometres, angstroms with angstroms — 1 nm = 10 Å). Third is expecting a peak at every order; geometry forbids orders where nλ > 2d, and symmetry forbids some planes entirely. Finally, θ in Bragg’s law is measured from the crystal planes themselves (the glancing angle), not from the normal — using the complement angle gives plausible-looking, wrong spacings.

Related Tools

The optics and radiation set continues in the Physics Calculators hub — pair this with the Terminal Velocity Calculator for a change of regime and the SUVAT Calculator for the mechanics core.

Frequently Asked Questions

What is Bragg’s law?

nλ = 2d sin θ: X-rays of wavelength λ diffract from crystal planes of spacing d at glancing angle θ when the path difference between successive planes equals a whole number n of wavelengths, producing a bright peak.

How do I calculate the diffraction angle?

theta = arcsin(n lambda / 2d). For copper radiation (0.154 nm) on NaCl planes of 0.282 nm at first order, theta = 15.85 degrees — appearing at 2theta = 31.7 degrees on a diffractogram.

Why do diffractometers use 2theta?

They measure the angle between the incoming beam and the outgoing diffracted beam, which is twice the Bragg angle theta measured from the planes. Halve the instrument reading before applying the law.

What does the order n mean?

The number of wavelengths in the extra path travelled by the ray reflecting off the deeper plane. Higher orders appear at larger angles and are usually weaker; if n lambda exceeds 2d, that order cannot occur.

How do I find crystal plane spacing from a diffraction peak?

Rearrange to d = n lambda / (2 sin theta). Use half the instrument’s 2theta reading as theta, keep wavelength and spacing in the same units, and the result is the spacing between those atomic planes.

What wavelength are X-rays in crystallography?

Copper K-alpha at 0.154 nm is the laboratory standard; molybdenum sources give 0.071 nm and synchrotrons are tunable. The wavelength must be comparable to atomic spacings (about 0.1 to 0.3 nm) for diffraction to resolve them.

Can Bragg’s law be used with electrons or neutrons?

Yes — anything with a wavelength diffracts, and electron and neutron diffraction use the same law with their de Broglie wavelengths. Neutron diffraction is prized for locating hydrogen atoms, which X-rays see poorly.