Bragg Equation Calculator with Miller Indices

Calculate the lattice plane spacing d_hkl from crystal system, lattice constants, and Miller indices (h,k,l), then solve the Bragg equation n·λ = 2·d·sin(θ) for diffraction order n, wavelength λ, or diffraction angle θ.

Enter values

The four orthogonal crystal systems supported are cubic, tetragonal, orthorhombic, and hexagonal. Monoclinic and triclinic systems (with oblique cells) are not currently implemented, as their d-spacing formula contains additional cross terms involving the cell angles.

Å
Å

Explanation: the Bragg equation and lattice plane spacings

What does the Bragg equation describe?

When X-rays hit a crystal, they are diffracted by the regularly arranged lattice planes of the crystal structure. Constructive interference (a measurable diffraction signal) only occurs at very specific angles, which depend on the wavelength of the radiation and the spacing of the lattice planes.

The Bragg equation links these three quantities: the lattice plane spacing d, the diffraction angle θ, and the wavelength λ (for a given diffraction order n). The lattice plane spacing d in turn depends on the Miller indices (h,k,l) of the lattice plane under consideration and the crystal's lattice constants.

Bragg equation

n·λ = 2·d·sin(θ)

The quantities at a glance

Lattice plane spacing (d)

The perpendicular distance between two neighbouring, parallel lattice planes with the same Miller indices. Calculated from the lattice constants and (h,k,l), depending on the crystal system.

Miller indices (h, k, l)

Three integers that uniquely identify a family of parallel lattice planes in the crystal lattice. They result from the reciprocal intercepts of the plane with the crystal axes.

Diffraction angle (θ)

The angle between the incident X-ray beam and the diffracting lattice plane (not to be confused with 2θ, the angle between the incident and diffracted beam usually plotted in diffractograms).

Worked example

Sodium chloride (NaCl) crystallizes in a cubic structure with a = 5.6402 Å. At what angle 2θ does the (200) reflection appear when using Cu-Kα radiation (λ = 1.5418 Å)?

Given

Cubic, a = 5.6402 Å, (h,k,l) = (2,0,0), λ = 1.5418 Å, n = 1

Solution

d = a/√(h²+k²+l²) = 2.8201 Å. From n·λ = 2·d·sin(θ), θ ≈ 15.86°, so 2θ ≈ 31.73° – exactly the well-known reference value from NaCl powder diffractograms.

Tips and common mistakes

The most common mistake is confusing θ with the 2θ plotted in diffractograms – the Bragg equation itself works with θ, not 2θ. A second common mistake: entering the lattice constant with the wrong unit (Å vs. nm vs. pm differ by a factor of 10 or 100).

The best approach

First determine the lattice plane spacing d from the crystal system, lattice constants, and Miller indices, then choose your X-ray source (or enter a custom wavelength) and let θ or n be calculated. When n is calculated, check whether the value is close to a whole number – only then is there a genuine Bragg reflection.

Where is the Bragg equation applied?
  • X-ray powder diffractometry (XRD) for phase identification and crystal structure determination
  • Determining lattice constants and crystallite sizes in materials science
  • X-ray spectrometers and monochromators that selectively pick a wavelength via the Bragg angle

Where do the X-ray wavelengths come from?

The built-in characteristic Kα wavelengths (weighted average of Kα1/Kα2) are taken from the International Tables for Crystallography, Vol. C, Table 4.2.2.1 – the standard crystallography reference for these values.

Frequently asked questions about the Bragg equation

θ is the angle between the incident X-ray beam and the diffracting lattice plane – this is the quantity the Bragg equation itself uses. Diffractograms usually plot 2θ, the angle between the incident and diffracted beam (i.e. twice the Bragg angle), because that corresponds to the angle actually measured at the detector.

The Bragg equation only gives a solution if n·λ/(2d) is less than or equal to 1, since sin(θ) can never exceed 1. If your wavelength is too large or the lattice plane spacing too small for the chosen diffraction order, no Bragg reflection physically exists – the calculator reports this explicitly instead of returning an incorrect value.

Cubic, tetragonal, orthorhombic, and hexagonal all have orthogonal (or, for hexagonal, 120°) unit cells, which keeps the lattice plane spacing formula relatively simple. Monoclinic and triclinic systems have oblique cells, which adds extra cross terms involving the cell angles to the formula – this is considerably more complex and not currently implemented.

The diffraction order n must physically be a whole number (1, 2, 3, ...). If you calculate n from a given angle and wavelength and get, say, 1.97, this means no true Bragg reflection occurs at exactly this angle – the measured angle is probably just close to the theoretical second-order (n=2) reflection, e.g. due to measurement uncertainty.