Bragg's Law Calculator
Use Bragg's Law to solve for any unknown in the diffraction equation nλ = 2d·sin(θ). Enter any three of the four variables - wavelength, interplanar spacing, diffraction order, and Bragg angle - and the missing value is computed instantly. Switch length units between picometres, nanometres, and angstroms, and choose degrees or radians for the angle. The step panel shows the algebra live with your numbers.
Formula
Worked example
Cu Kα X-rays (λ = 154.18 pm) diffract from a silicon (111) plane (d = 314.0 pm). First-order (n = 1): sin(θ) = (1 × 154.18) / (2 × 314.0) = 0.24551, so θ = 14.22° and 2θ = 28.44°. Maximum diffraction order: floor(2 × 314.0 / 154.18) = floor(4.07) = 4.
What is Bragg's Law?
Bragg's Law describes the condition under which X-rays diffracted by the parallel planes of atoms in a crystal interfere constructively. It was derived in 1913 by William Lawrence Bragg and his father William Henry Bragg, and underpins nearly all modern X-ray crystallography and powder diffraction analysis. The law states that constructive interference occurs when the path difference between rays reflected from successive atomic planes equals an integer number of wavelengths. This is expressed as nλ = 2d·sin(θ), where n is the diffraction order (a positive integer), λ is the X-ray wavelength, d is the perpendicular distance between adjacent lattice planes (d-spacing), and θ is the glancing angle between the incident beam and the plane surface. A common source of confusion is that θ is measured from the plane surface, not from the normal to it, so it differs by 90 degrees from the usual convention in optics.
How to use this calculator
Select which variable you want to solve for from the 'Solve for' dropdown. The three remaining fields become your inputs. Enter the known values, then read the result at the top of the output panel. The unit selectors let you choose picometres (pm), nanometres (nm), or angstroms for length values, and degrees or radians for the angle. The 'Show your work' panel displays every algebraic step with your actual numbers substituted in. The gauge shows where your Bragg angle sits in the standard XRD angular range, and the chart plots how the Bragg angle increases with diffraction order for the same d-spacing and wavelength. Typical laboratory X-ray sources: Cu Kα is 154.18 pm (1.5418 Å), Mo Kα is 71.07 pm (0.7107 Å), and Co Kα is 179.03 pm (1.7903 Å).
d-spacing and crystal structure
The interplanar spacing d is a fundamental property of a crystalline material. It depends on the crystal lattice parameters (unit cell dimensions) and the Miller indices (h, k, l) of the reflecting plane. For a cubic crystal with lattice parameter a, the relationship is d(hkl) = a / sqrt(h^2 + k^2 + l^2). Measuring d for several sets of planes from the peak positions in a powder diffraction pattern lets you identify the material (phase identification) and refine the unit cell parameters. This calculator works with any d-spacing: enter the value in pm, nm, or angstroms. The reference table below lists common materials with their well-established d-spacings and the resulting 2θ positions under Cu Kα radiation.
Diffraction order, 2theta, and the XRD detector angle
The diffraction order n counts how many complete wavelengths of path difference exist between reflections from adjacent planes. n = 1 is the first-order (strongest) reflection; higher orders appear at larger angles. The maximum possible order for a given wavelength and d-spacing is the floor of 2d / λ, because sin(θ) cannot exceed 1. The detector in a powder diffractometer is positioned at twice the Bragg angle, 2θ, measured from the transmitted beam direction. XRD patterns are always plotted on a 2θ axis. This calculator outputs both θ and 2θ so you can read them directly from or compare them against a diffractogram.
Common crystal d-spacings and Cu Kα Bragg angles
| Material | Plane (hkl) | d-spacing (pm) | 2θ (°) | Application |
|---|---|---|---|---|
| Silicon | (111) | 314.0 | 28.44 | Semiconductor standard |
| Silicon | (220) | 192.0 | 47.30 | Wafer characterisation |
| NaCl | (200) | 282.0 | 31.70 | Calibration standard |
| Quartz (SiO2) | (101) | 334.0 | 26.65 | Mineralogy, geology |
| Calcite (CaCO3) | (104) | 303.4 | 29.41 | Geological samples |
| Aluminium | (111) | 233.4 | 38.47 | Metals, thin films |
| Copper | (111) | 208.7 | 43.30 | Metallurgy |
| Iron (BCC) | (110) | 202.6 | 44.67 | Steel analysis |
| Graphite | (002) | 335.4 | 26.54 | Carbon materials |
| Gold | (111) | 235.8 | 38.18 | Nanoparticles |
Representative interplanar spacings for common materials under Cu Kα radiation (λ = 154.18 pm). 2θ values are for first-order reflection (n = 1).
Frequently asked questions
What does n mean in Bragg's Law?
n is the diffraction order, a positive integer (1, 2, 3, ...). It counts how many whole wavelengths of path difference exist between X-rays scattered from successive atomic planes. n = 1 gives the first-order reflection at the smallest angle; n = 2 produces a second reflection at a larger angle. Higher orders are generally weaker in intensity. The maximum order is the largest integer less than or equal to 2d/λ.
What is the difference between theta and 2theta?
θ (Bragg angle) is the glancing angle between the incident X-ray beam and the crystal plane surface. 2θ is the total scattering angle measured from the transmitted beam direction and is what an XRD diffractometer detector actually measures. XRD patterns are plotted as intensity versus 2θ, so always double your Bragg angle when comparing to a diffractogram.
What is d-spacing (interplanar spacing)?
d-spacing is the perpendicular distance between successive parallel planes of atoms in a crystal lattice (defined by Miller indices hkl). It is a constant for a given material and set of planes, typically ranging from about 50 pm to 1000 pm for X-ray diffraction. Different crystal structures have characteristic sets of d-spacings that serve as a fingerprint for phase identification.
Why does the calculator sometimes show 'No solution'?
A real Bragg angle only exists when sin(θ) = nλ / (2d) is between 0 and 1 inclusive. If nλ > 2d, the ratio exceeds 1 and no real angle can satisfy the equation, meaning that diffraction order is physically forbidden for that combination of wavelength and spacing. Reduce n or increase d (or use a shorter-wavelength source) to get a valid solution.
Which X-ray wavelengths should I use?
Laboratory X-ray diffractometers most commonly use copper Kα radiation at 154.18 pm (1.5418 Å). Other common sources: Mo Kα at 71.07 pm (0.7107 Å, used for single-crystal work and high-pressure studies), Co Kα at 179.03 pm (1.7903 Å, used for iron-containing samples to reduce fluorescence), and Cr Kα at 229.35 pm (2.2935 Å). Synchrotron sources are tunable and can be set to any wavelength.
How is Bragg's Law used in practice?
In powder X-ray diffraction (PXRD), a finely ground crystalline sample is scanned through a range of 2θ angles. Each peak in the resulting pattern corresponds to a set of lattice planes satisfying Bragg's condition. The 2θ positions are converted to d-spacings using this equation, and the set of d-spacings is matched against a reference database to identify the crystalline phases present. In single-crystal diffraction, a crystal is rotated systematically to bring each family of planes into the Bragg condition, building a complete dataset of reflection intensities used to solve the three-dimensional structure.