LabCanvas
Free account · save your work, full figure editorSign up free

Bragg’s law calculator: d-spacing from 2θ

Bragg’s law, nλ = 2d sin θ, links the angle of an X-ray diffraction peak to the spacing d of the lattice planes that make it: d = nλ / (2 sin θ), where θ is half the 2θ peak position. A peak at 2θ = 28.44° with Cu Kα1 radiation (λ = 1.540562 Å) comes from planes d = 3.1357 Å apart. Choose the X-ray source, then convert 2θ to d, d to 2θ, or paste indexed reflections (2θ h k l) to get the lattice parameters of a cubic, tetragonal, hexagonal or orthorhombic cell by least squares.

What it does
Converts an XRD peak position 2θ to the d-spacing and back with Bragg’s law, and fits lattice parameters a, b, c from indexed reflections for cubic, tetragonal, hexagonal and orthorhombic cells.
Formula
nλ=2dsin⁡θ1d2=h2+k2+l2a2 (cubic)
Example
A peak at 2θ = 28.44° with Cu Kα1 (λ = 1.540562 Å): d = 1.540562 / (2 sin 14.22°) = 3.1357 Å. Five silicon reflections, (111) at 28.44° to (331) at 76.38°, give a = 5.4308 ± 0.0001 Å.

Last updated

FreeNo sign-upRuns in your browserLab calculators

Loading Bragg’s law calculator…

At a glance

Bragg’s law calculator at a glance
Formulanλ=2dsin⁡θ; 1/d2 from (hkl) and the cell
Solves ford from 2θ, 2θ from d, lattice parameters a, b, c from indexed peaks
Crystal systemsCubic, tetragonal, hexagonal, orthorhombic
WavelengthsCu, Mo and Co Kα1 and Kα means (Bearden 1967), or any λ in Å
FitLeast squares on 1/d², with standard errors and 2θ residuals
Runs inYour web browser; nothing is uploaded
PriceFree, no account needed

What it does

How to use the bragg’s law calculator

  1. Choose what to calculateA d-spacing from a peak position, the peak position of a known spacing, or the lattice parameters from several indexed peaks.
  2. Choose the X-ray sourceCu Kα1 if your instrument removes Kα2, the Kα mean if the doublet is not resolved, or type the wavelength in Å.
  3. Enter the peak or the reflectionsType 2θ in degrees (or d in Å), or paste one reflection per line as “2θ h k l” and pick the crystal system.
  4. Read the answerd in Å and nm, 2θ in degrees, or a, b, c with their standard errors, the cell volume and the residual of every peak.

How it works

nλ=2dsin⁡θd=nλ2sin⁡θ

Bragg’s law. X-rays scattered by parallel lattice planes a distance d apart add up in phase when the path difference between neighbouring planes, 2dsin⁡θ, is a whole number n of wavelengths. A diffractometer records the angle between the incident and the diffracted beam, 2θ, so θ is half the peak position. Higher orders (n=2,3) are written in crystallography as first-order reflections from planes n times closer: the second order of (111) is the (222) reflection. Planes closer than λ/2 cannot diffract at that wavelength, because sin⁡θ would exceed 1.

Plane spacing and the cell. For a reflection with Miller indices (hkl), the spacing depends on the cell parameters (Cullity & Stock, Appendix 3):

cubic:1d2=h2+k2+l2a2tetragonal:1d2=h2+k2a2+l2c2hexagonal:1d2=43h2+hk+k2a2+l2c2orthorhombic:1d2=h2a2+k2b2+l2c2

Each equation is linear in 1/a2, 1/b2 and 1/c2, so the calculator turns every peak into 1/d2 with Bragg’s law and fits those unknowns by ordinary least squares; a=(1/a2)−1/2 and so on. With exactly as many reflections as parameters the cell passes through them; with more, the residuals give a standard error for each parameter, propagated as σa=σx/(2x3/2) with x=1/a2. Rhombohedral, monoclinic and triclinic cells are not included.

Wavelengths. The tube lines are Bearden’s (1967) values, on his Å* scale, which Bearden gives for Cu Kα1 with an uncertainty of about 5 ppm, far below what a 2θ reading resolves. Kα is a doublet (Kα1 and Kα2, about 2:1 in intensity); when the two are not separated, the weighted mean (2λKα1+λKα2)/3 is used, 1.541838 Å for copper.

Accuracy. d depends on 1/sin⁡θ, so the same 2θ error matters less at high angle: high-angle peaks fix the cell best. A sample displaced from the focusing circle or a zero shift of the goniometer moves every peak; calibrate with an internal standard when you need the cell to better than about 0.01 Å. For crystallite size from the peak widths use the XRD Scherrer calculator, and for size and strain together the Williamson–Hall plot.

Worked examples: d-spacing, peak position and lattice parameters

  1. 2θ to d-spacing. A peak at 2θ=28.44∘ measured with Cu Kα1 (λ=1.540562 Å): θ=14.22∘, so d =1.540562/(2×sin⁡14.22∘) =3.1357 Å (0.31357 nm). With the unresolved Cu Kα mean (1.541838 Å) the same peak gives 3.1383 Å: choose the wavelength your instrument used.
  2. d to 2θ with another tube. The same planes (d=3.1357 Å) appear at 2θ =2arcsin⁡(0.7093/(2×3.1357)) =12.988∘ with Mo Kα1 and at 33.149∘ with Co Kα1.
  3. A cubic cell from one peak. A face-centred cubic metal shows its (111) peak at 2θ=38.47∘ (Cu Kα1): d=2.3381 Å and a=d12+12+12=4.0498 Å.
  4. A cubic cell from five peaks. Silicon (diamond cubic) reflections read to 0.01° with Cu Kα1: (111) 28.44°, (220) 47.30°, (311) 56.12°, (400) 69.13° and (331) 76.38°. The least-squares fit gives a=5.4308±0.0001 Å and a cell volume of 160.17 ų; every peak lies within 0.003° of where that cell puts it.
  5. A hexagonal cell. Five reflections of a wurtzite-type (ZnO-like) powder with Cu Kα1: (100) 31.77°, (002) 34.42°, (101) 36.25°, (102) 47.54°, (110) 56.60°. The fit gives a=3.2496±0.0001 Å, c=5.2069±0.0003 Å, c/a=1.6023 and V=32a2c=47.617 Å3. For a and c you need at least one peak with l≠0 and one with h or k≠0.

X-ray wavelengths of common tube anodes

Characteristic X-ray wavelengths (Å) used by the calculator (Bearden 1967)
Lineλ (Å)Notes
Cu Kα11.540562Copper anode, Kα2 removed (monochromator or stripping).
Cu Kα (Kα1/Kα2 mean)1.541838Copper anode, unresolved doublet: (2 × 1.540562 + 1.544390) / 3.
Mo Kα10.7093Molybdenum anode.
Mo Kα (Kα1/Kα2 mean)0.71073Molybdenum anode, unresolved doublet (the value usually quoted for Mo radiation).
Co Kα11.788965Cobalt anode (iron-rich samples fluoresce less than with Cu).
Co Kα (Kα1/Kα2 mean)1.79026Cobalt anode, unresolved doublet (Kα2 1.79285 Å).

Cu Kα2 is 1.544390 Å. 1 Å = 0.1 nm. Bearden’s values are on his Å* scale, defined through the W Kα1 line; for diffraction work they are the ångström.

References

  1. Bearden JA. X-ray wavelengths. Rev Mod Phys 1967;39:78–124. doi:10.1103/RevModPhys.39.78 (also issued as NSRDS-NBS 14).
  2. Cullity BD, Stock SR. Elements of X-Ray Diffraction, 3rd ed. Prentice Hall, 2001. Appendix 3: lattice geometry (plane spacings of each crystal system).

Frequently asked questions

How do I calculate d-spacing from 2θ?

Halve the peak position to get θ, then d = λ / (2 sin θ) for first order. With Cu Kα1 (1.540562 Å), a peak at 2θ = 28.44° gives d = 1.540562 / (2 × sin 14.22°) = 3.1357 Å.

What is Bragg’s law?

nλ = 2d sin θ: X-rays reflected from parallel lattice planes a distance d apart interfere constructively when the extra path, 2d sin θ, is a whole number n of wavelengths. θ is half the 2θ angle a diffractometer reports.

What wavelength should I use for Cu Kα?

1.540562 Å (Cu Kα1) if your diffractometer removes Kα2 with a monochromator or in software, and the weighted mean 1.541838 Å (often rounded to 1.5418 Å) if the Kα1/Kα2 doublet is not resolved. Many papers quote 1.5406 Å, Cu Kα1 rounded.

How do I calculate the lattice parameter from XRD?

Index the peaks (assign hkl), convert each 2θ to d, then use the plane-spacing equation of the crystal system. For a cubic crystal a = d√(h² + k² + l²); for tetragonal and hexagonal crystals you need at least one reflection with l ≠ 0 and one with h or k ≠ 0. With several peaks, fit them by least squares, as this calculator does.

How do I convert d-spacing to 2θ?

2θ = 2 arcsin(nλ / 2d). For d = 3.1357 Å with Cu Kα1, 2θ = 28.44°; with Mo Kα1 (0.7093 Å), 12.99°. If nλ/2d is above 1 there is no reflection at that wavelength.

Is θ in Bragg’s law the same as 2θ on my XRD pattern?

No. The pattern’s x-axis is 2θ, the angle between the incident and diffracted beams; Bragg’s law uses θ, half of it. Using 2θ directly gives a d about half the true value.

Why do my high-angle peaks give a better lattice parameter?

d = λ / (2 sin θ), so an error in 2θ changes d less where sin θ changes slowly relative to its value, at high angles. A 0.01° error at 2θ = 30° shifts d about three times more, relatively, than the same error at 2θ = 80°.

Does this work for Mo or Co radiation?

Yes: choose Mo Kα1 (0.7093 Å), Mo Kα (0.71073 Å), Co Kα1 (1.788965 Å) or Co Kα (1.79026 Å), or type any wavelength, such as a synchrotron energy converted with the photon energy converter.

Make the whole figure in LabCanvas

Vector figure editor, slides, 3D models, protein structures and Prism-style graphs, in your browser.

Get started