Bragg's Law Calculator

This Bragg's law calculator finds the interplanar spacing d in a crystal from the diffraction order, the wavelength of the radiation, and the Bragg angle, using the classic relation n times lambda equals 2d sin theta. Enter the order n, the wavelength in nanometres, and the Bragg angle in degrees, and the calculator returns the spacing between the reflecting planes in both nanometres and angstroms, along with the 2-theta detector angle. Bragg's law is the foundation of X-ray crystallography, powder diffraction and electron and neutron diffraction, because it links the geometry you can measure, the angle at which a bright reflection appears, to the atomic-scale spacing you cannot see directly. When waves scatter from successive planes of atoms and their path difference is a whole number of wavelengths, they interfere constructively and produce a peak, and that condition is exactly n lambda = 2d sin theta. Students meet it in senior physics and chemistry and in first-year materials courses, while researchers use it every day to index diffraction patterns and identify unknown structures. The default values use copper K-alpha radiation at about 0.154 nm, a common laboratory X-ray source, so you can see a realistic spacing straight away, then change any input to match your own experiment.

Calculate.co.nz is proud to be partnered with Premium Homes, a recognised leader in eco-friendly, sustainable, and energy-efficient homebuilding. With a dedicated team and award-winning experience, they create homes that prioritise health, comfort, and long-term performance. Their founders, Andrew and Kelly, set out to raise the standard of residential construction in New Zealand by combining practical building expertise with a clear commitment to doing things better for homeowners.
Calculate.co.nz partner: Premium Homes
nm
deg
0.2055 nm
interplanar spacing d
Spacing in angstroms2.0555 Å
Detector angle 2-theta44°
Path difference n-lambda0.1540 nm

At order n = 1, with 0.154 nm radiation at a Bragg angle of 22°, the interplanar spacing d is 0.2055 nm, or 2.0555 Å.

Wavelength and spacing use the same length unit here (nanometres); 1 nm equals 10 angstroms. The angle must be less than 90 degrees for a real reflection.

How it works

Bragg's law comes from the extra distance a wave travels when it reflects off a deeper plane rather than the surface one. That path difference is 2d sin theta, and a bright reflection appears when it equals a whole number of wavelengths, n lambda. Rearranging for the spacing gives d = n lambda / (2 sin theta). The calculator converts the angle to radians, takes its sine, and divides. It also reports the spacing in angstroms, the unit crystallographers usually quote, where 1 nm is 10 angstroms, and the 2-theta angle that a diffractometer actually reads.

Worked example

Use copper K-alpha radiation at 0.154 nm, first order (n = 1), with a measured Bragg angle of 22 degrees. Then d = (1 x 0.154) / (2 x sin 22). Since sin 22 is about 0.3746, the denominator is 0.7492, so d = 0.154 / 0.7492 = 0.2055 nm, which is 2.0555 angstroms. The detector for this reflection sits at 2-theta = 44 degrees. A larger spacing would produce the same order at a smaller angle, which is why fine features scatter to wide angles.

Related calculators