Advertisement
Advertisement
PHYSICS

Bragg's Law Calculator — nλ = 2d sinθ

Find the diffraction angle, the interplanar spacing, the wavelength or the reflection order for a crystal, with the detector 2θ angle and the highest observable order worked out alongside.

The quantity you select becomes the output. The remaining three inputs drive it.
A whole number. First order is by far the most common, because higher orders are weaker and many are forbidden outright by the crystal's symmetry.
This is the glancing angle between the incoming beam and the lattice planes, not the angle from the plane normal used in optics, and not the 2θ value your diffractometer displays.
Bragg angle θ
 
 
0
Detector angle 2θ
0
sin θ value
0
Path difference nλ
0
Highest possible order
Tip: diffraction is only possible when the wavelength is no more than twice the plane spacing. If nλ exceeds 2d there is no angle that satisfies the equation, which is why visible light cannot be used to probe atomic planes.
Advertisement

The Bragg's law calculator above solves nλ = 2d sinθ for whichever of the three continuous quantities you need. Give it a wavelength and a plane spacing and it returns the angle at which that set of planes will diffract. Give it a measured angle and a known wavelength and it returns the spacing, which is how an unknown crystal gets identified. Give it an angle and a spacing and it returns the wavelength, which is how a crystal of known structure becomes a wavelength standard.

Arb Digital builds free tools that finish the job rather than stopping at the headline number. This page also reports the 2θ value a diffractometer actually displays, the sine that had to be taken, the path difference the interference is built on, and the highest reflection order that is geometrically possible for the wavelength and spacing you entered. When no angle can satisfy the equation, it says so in words instead of returning a blank or a nonsense number.

What This Bragg's Law Calculator Does

Imagine a beam striking a stack of evenly spaced atomic planes. Part of it reflects from the top plane and part penetrates to the plane below before reflecting. The lower ray travels an extra distance, and simple geometry shows that extra distance is 2d sinθ, where d is the spacing between planes and θ is the glancing angle measured from the plane surface. Constructive interference happens only when that extra path is a whole number of wavelengths, which gives nλ = 2d sinθ.

Everything the calculator reports follows from that single condition. Rearranged for the angle, θ = arcsin(nλ ÷ 2d). Rearranged for the spacing, d = nλ ÷ (2 sinθ). Rearranged for the wavelength, λ = 2d sinθ ÷ n. Because the arcsine is only defined for arguments up to one, the angle solution exists only when nλ is less than or equal to 2d, and that inequality is the reason X-rays rather than visible light are used for crystallography.

The highest possible order is the largest whole number n for which nλ still fits inside 2d, which is the integer part of 2d divided by λ. Knowing it tells you how many peaks a given set of planes can contribute to a pattern before running out of geometry. Whether those peaks actually appear is a separate question, governed by what sits between the planes rather than by their spacing, and the section on systematic absences below covers it.

How to Use It

  1. Select the unknown. Solving for the angle is the design case; solving for the spacing is the analysis case, where you have a measured peak and want to know what produced it.
  2. Halve your detector reading before entering an angle. Powder diffraction patterns are plotted against 2θ. The equation wants θ, so a peak at 28.44 degrees on the chart is a Bragg angle of 14.22 degrees.
  3. Keep the order at one unless you have a reason not to. Higher orders are weaker and, in most structures, several of them are extinguished completely.
  4. Match the units. The calculator converts ångströms, nanometres and picometres internally, so the wavelength and the spacing do not have to share a unit.
  5. Read the highest possible order. If it comes back as zero, the wavelength is too long for those planes and no diffraction can occur at any angle.

The Formula: How Bragg's Law Is Calculated

Section 4.6 of OpenStax University Physics Volume 3, on X-ray diffraction, states the Bragg equation as mλ = 2d sinθ with m a positive integer, and explains that the condition arises because the path difference between rays reflected from successive planes must equal a whole number of wavelengths for constructive interference. The letter used for the order varies between textbooks; n and m mean the same thing.

Work the default values. Copper Kα radiation has a weighted wavelength close to 1.5406 ångströms, and the (111) planes of silicon are spaced about 3.135 ångströms apart. First order gives sinθ = (1 × 1.5406) ÷ (2 × 3.135) = 1.5406 ÷ 6.270 = 0.24571. The arcsine of that is 14.22 degrees, so the detector sees the peak at 2θ = 28.44 degrees, which is exactly where the silicon (111) reflection is found in practice. The highest possible order here is the integer part of 6.270 ÷ 1.5406, which is four.

Characteristic X-ray wavelengths are measured quantities rather than round numbers, and the NIST X-ray Transition Energies Database is the place to look them up by element and transition. The Online Dictionary of Crystallography, maintained by the International Union of Crystallography, is the reference for the surrounding terminology, including the distinction between a reflection order and a Miller index.

Advertisement

Why Your Diffractometer Shows 2θ and Not θ

This trips up nearly everyone who reads a published pattern for the first time. Bragg's law is written in terms of θ, the glancing angle between the incident beam and the planes. A diffractometer, however, measures the angle between the incident beam direction and the diffracted beam direction, and because the reflection geometry is symmetric, that angle is exactly twice the Bragg angle. Published powder patterns are therefore plotted against 2θ, and every peak position quoted in a paper or a database is a 2θ value.

Put a 2θ figure into the equation without halving it and the spacing you calculate will be wrong by a large and non-constant factor, because the sine function is not linear. The error is not a simple factor of two in the answer. A 2θ of 28.44 degrees entered as θ gives sin 28.44 = 0.4763 rather than 0.2457, so the calculated spacing comes out at 1.617 ångströms instead of 3.135, roughly half the true value but not exactly half.

The calculator reports both angles side by side for this reason. Enter the Bragg angle, read the detector angle, and compare it against your chart before trusting anything downstream. If you are working from a published peak list, divide by two first. The angle converter handles degree-to-radian work if your instrument software reports in radians.

Which Reflections Actually Appear

Bragg's law tells you where a peak would be if it exists. It says nothing about whether it does. A real crystal has atoms sitting between the planes you nominated, and waves scattered from those atoms can arrive exactly out of phase with the ones from the planes themselves, cancelling the reflection completely. These are called systematic absences, and they are the main reason a measured pattern has far fewer peaks than the geometry allows.

A body-centred cubic lattice, for example, extinguishes every reflection whose Miller indices sum to an odd number, so (100) and (111) vanish while (110) and (200) survive. A face-centred cubic lattice extinguishes every reflection whose indices are not all odd or all even. These rules are what let a crystallographer identify a lattice type from which peaks are missing, before ever solving the full structure.

Intensity varies for another reason as well. Even an allowed reflection gets weaker at high angles because thermal motion smears the atoms out of their ideal positions, and because the scattering power of an atom falls off as the scattering angle grows. A high-order peak predicted by this calculator may be geometrically possible, allowed by symmetry, and still too faint to see above the background. That is a measurement problem, not an arithmetic one.

Choosing a Wavelength

Laboratory X-ray sources produce a sharp characteristic line sitting on a broad continuous background. Copper Kα at about 1.5406 ångströms is the workhorse; molybdenum Kα at about 0.7107 ångströms is the alternative when a shorter wavelength is wanted. The shorter wavelength compresses the whole pattern toward small angles, because sinθ scales directly with λ, which lets more reflections fit inside the accessible angular range but crowds them together.

The Kα line is itself a close doublet, Kα₁ and Kα₂, and the 1.5406 figure is a weighted average of the two. At low angles they overlap into a single peak; at high angles they separate visibly, which is why high-angle peaks in a good pattern often look split. There is also a Kβ line at a shorter wavelength, and it is removed with a filter or a monochromator, because otherwise every set of planes produces two peaks and the pattern becomes ambiguous.

Wavelength and photon energy are two descriptions of the same thing, so a source specified in kiloelectronvolts can be converted before use. Our photon energy calculator handles that conversion, and the wavelength calculator covers the frequency relationship for the wider electromagnetic spectrum.

Bragg's Law Beyond X-rays

Nothing in the derivation is specific to electromagnetic waves. Any wave with a wavelength comparable to the plane spacing will diffract from the same planes at the same angles, which is why electron diffraction and neutron diffraction both obey Bragg's law unchanged. Electrons accelerated through a modest potential have wavelengths in the right range, and our de Broglie wavelength calculator gives the figure for a chosen accelerating voltage.

The three probes see different things. X-rays scatter from electrons, so heavy atoms dominate and hydrogen is nearly invisible. Neutrons scatter from nuclei, with no systematic dependence on atomic number, which makes them the tool of choice for locating light atoms in a structure containing heavy ones. Electrons interact far more strongly than either, so they penetrate only a thin layer, which suits surface and thin-film work but demands very small samples.

Optical diffraction gratings follow a closely related condition with a much larger spacing, and the diffraction grating calculator covers that case. For refraction and reflection at a plain interface rather than a periodic structure, the Snell's law calculator and the Brewster's angle calculator are the relevant pages.

Need a website that loads fast and actually works?

Arb Digital builds free tools like this one because useful pages earn attention. If you want tools, calculators or content built for your own audience, we can help.

Browse All Free Tools Talk to Arb Digital

Common Mistakes to Avoid

  • Entering the detector angle as θ — published peak positions are 2θ values and must be halved before they enter the equation.
  • Measuring the angle from the plane normal — Bragg's law uses the glancing angle from the plane surface, the opposite convention to the one Snell's law uses for refraction.
  • Expecting every allowed order to produce a peak — symmetry extinguishes many reflections entirely, and thermal motion weakens the ones that survive at high angles.
  • Using a wavelength longer than twice the spacing — no angle can satisfy the equation, which is why visible light cannot resolve atomic planes.
  • Forgetting the Kα doublet — the single quoted wavelength is a weighted average of two close lines that separate visibly at high angles.

Related Free Tools From Arb Digital

Wavelength and energy questions carry on with the photon energy calculator, the wavelength calculator and the frequency converter. For matter waves, the de Broglie wavelength calculator gives the wavelength of an accelerated particle. Other interference and optics problems are covered by the diffraction grating calculator, the Snell's law calculator, the Brewster's angle calculator and the thin lens equation calculator. Angle unit changes are handled by the angle converter. The full free online tools hub lists everything Arb Digital publishes.

Frequently Asked Questions

What is Bragg's law?

Bragg's law states that n times the wavelength equals 2d sin theta, where d is the spacing between atomic planes, theta is the glancing angle of the beam and n is a whole number. It is the condition for waves reflected from successive planes to interfere constructively.

Is theta the same as the 2 theta my instrument reports?

No. Theta is the angle between the beam and the planes; 2 theta is the angle between the incoming and outgoing beam directions, which is what a diffractometer measures. Published peak positions are 2 theta values, so halve them before putting them into the equation.

Why can't visible light be used for crystallography?

Because diffraction requires the wavelength to be no more than twice the plane spacing. Atomic planes are separated by a few tenths of a nanometre while visible light is several hundred nanometres, so no angle can satisfy Bragg's law and no diffraction occurs.

What does the order n mean?

It is the number of whole wavelengths in the path difference between rays from adjacent planes. First order is the strongest and most used. Higher orders sit at larger angles, are progressively weaker, and are often extinguished by the crystal's symmetry.

Why are some predicted peaks missing from my pattern?

Atoms sitting between the nominated planes scatter waves that can cancel the reflection completely. These systematic absences depend on the lattice type, so a body-centred lattice loses every reflection whose indices sum to an odd number. Which peaks are missing is itself diagnostic information.

Which X-ray wavelength should I use?

Copper K alpha at about 1.5406 angstroms is the standard laboratory choice. Molybdenum K alpha at about 0.7107 angstroms is used when a shorter wavelength is needed, which compresses the pattern toward smaller angles and fits more reflections into the accessible range.

Does Bragg's law apply to electrons and neutrons?

Yes. The derivation assumes only that a wave reflects from evenly spaced planes, so any probe with a suitable wavelength obeys the same equation. Electrons and neutrons diffract at the same angles as X-rays of equal wavelength, but they scatter from different parts of the atom.

This tool is provided for educational and estimating use. It gives the geometric diffraction condition only and does not predict peak intensities, systematic absences or instrumental broadening.

Advertisement
Advertisement

Take it further