XRD Analysis Workbench

Powder X-ray diffraction calculations on one page. Use the tabs to switch between simulating a diffraction pattern, indexing measured peaks and refining the lattice parameter, estimating crystallite size and strain from peak widths, and converting peak shifts from strain or solid solution. Every mode shows the intermediate steps, tables can be copied as CSV, and the conditions are kept in the URL for sharing. The defaults are BCC iron and Cu Kα radiation.

Input

Results

Assumptions: a fine powder with random orientation, a flat sample thick enough that the absorption correction does not depend on angle (Bragg–Brentano geometry), no extinction, and one isotropic temperature factor B for all atoms. Atomic scattering factors use the Cromer–Mann-type fit of International Tables Vol. C (valid for sinθ/λ < 2 Å⁻¹), anomalous dispersion uses the Henke et al. tables, and wavelengths come from the X-ray Data Booklet. Indexing covers cubic lattices only.

How to use this workbench

The four modes follow the course of an XRD experiment. Pattern calculates which angles show peaks and how strong they are, once you choose a material (or enter a structure and lattice parameter): use it to check peak positions and overlaps before measuring, to compare with a measured pattern, or to pick a wavelength. Indexing works the other way: from measured 2θ values it identifies the cubic lattice, assigns (hkl) to each peak and refines the lattice parameter by least squares or extrapolation. Crystallite size estimates size and microstrain from peak widths with the Scherrer equation and a Williamson–Hall plot. Peak shift converts lattice strain or solid solution into a peak shift, and a measured shift back into strain or composition. In the periodic table tool, choosing an element and following “check with XRD” opens this page with that element’s structure and lattice parameter.

Bragg’s law and d-spacings

When X-rays of wavelength λ meet atomic planes spaced d apart, the waves reflected from neighboring planes reinforce when their path difference 2d sinθ is a whole number of wavelengths (Bragg’s law nλ = 2d sinθ). In XRD the n = 2 reflection from (110) is written as (220), so n is normally set to 1 and the indices are multiplied instead. For a cubic crystal 1/d² = (h² + k² + l²)/a²; for a hexagonal one 1/d² = 4(h² + hk + k²)/(3a²) + l²/c². For BCC iron (a = 0.28665 nm), (110) has d = 0.2027 nm and appears at 2θ = 44.67° with Cu Kα1 (λ = 0.15406 nm). A longer wavelength moves the same plane to a higher angle, and planes with λ > 2d do not diffract at all. With Mo Kα (0.0709 nm) many more reflections fit in the same range; with Cr Kα (0.229 nm) far fewer.

Why structure factors and systematic extinctions occur

The wave scattered toward (hkl) by atom j at (xⱼ, yⱼ, zⱼ) in the unit cell carries a phase 2π(hxⱼ + kyⱼ + lzⱼ). Their sum is the structure factor F = Σ fⱼ exp[2πi(hxⱼ + kyⱼ + lzⱼ)], and the intensity is proportional to |F|². In BCC the body-center atom at (½, ½, ½) has phase π(h + k + l), so for h + k + l odd its wave is exactly opposite to the corner atom’s and (100), (111), (210) and so on vanish. In FCC the three face-center atoms have phases π(h + k), π(h + l) and π(k + l), and the sum is zero when h, k, l are of mixed parity. Diamond cubic is FCC plus a copy shifted by (¼, ¼, ¼), which also removes reflections with h + k + l = 4n + 2 such as (200) and (222). With two kinds of atoms the cancellation is no longer complete. In rock salt the all-odd reflections go as 4(f_Cl − f_Na) and are weak; in KCl, K⁺ and Cl⁻ both have 18 electrons, so they almost vanish and the pattern looks like a simple cubic lattice with half the lattice parameter. In zinc-blende GaAs, (200) is proportional to f_Ga − f_As and is very weak. In the CsCl type and in ordered Cu₃Au (L1₂), weak superlattice lines appear where BCC or FCC would have none. Their intensity scales with the square of the long-range order parameter, which makes them a probe of order–disorder transitions (this tool calculates the fully ordered state).

What sets the intensity: multiplicity, atomic scattering factor, LP factor, temperature factor

The integrated intensity of a powder line is I ∝ m |F|² LP exp(−2B s²), with s = sinθ/λ. The multiplicity m counts the reflections that share a d-spacing: for cubic crystals {100} 6, {110} 12, {111} 8, {hk0} and {hhl} 24, {hkl} 48. When different forms coincide at the same d, such as (511) and (333), both are added. The atomic scattering factor f falls with s because the electron cloud has a finite size, and equals the electron count Z at s = 0. This tool computes f0 from the coefficients of International Tables Vol. C Table 6.1.1.4 (a sum of four Gaussians and a constant, the Cromer–Mann form) and, for tube lines, adds the anomalous-dispersion corrections f′ and f″ from the Henke et al. tables; for iron measured with Cu Kα, f′ ≈ −1.1, which weakens the high-angle lines a little. The Lorentz-polarization factor (1 + cos²2θ)/(sin²θ cosθ) combines the polarization of the scattered beam with the Lorentz factor (including the fraction of each powder ring that reaches the detector), and is large at low angles and near 180°. The temperature factor exp(−2B s²) describes the loss of high-angle intensity from thermal vibration, with B = 8π²⟨u²⟩ (⟨u²⟩ is the mean-square displacement). Elements use the 293 K values of Peng et al. (1996). Among the compounds, only NaCl (1.48 Ų, the mean of 1.59 for Na and 1.38 for Cl) and MgO (0.36 Ų, the mean of 0.34 for Mg and 0.37 for O) carry measured values; the other compounds and the elements not in that table start at 0 (no temperature factor), so enter B if you know it. With B left at 0 the high-angle lines come out somewhat too strong.

Why measured intensity ratios differ from calculated ones

The calculated relative intensities are integrated intensities of an ideal powder, fine and randomly oriented. Real data differ for several reasons. (1) Preferred orientation: platy or needle-shaped particles, and rolled, plated or thin-film samples, align certain planes parallel to the surface and strengthen only those reflections. This is usually the largest effect and hard to remove completely. (2) Absorption: for a thick sample in Bragg–Brentano geometry the absorption correction is independent of angle, but for thin films or small amounts of powder the X-rays penetrate deeper at high angles and are lost, changing the ratios; surface roughness and porosity reduce low-angle intensity. (3) Temperature factor: materials with large B (alkali metals, ionic crystals) lose much of their high-angle intensity. (4) Peak height versus area: PDF card intensities are often peak heights, and at high angles Kα1 and Kα2 separate and the lines broaden, so heights fall below integrated intensities. The “curve height” column of this tool includes that effect. (5) Coarse grains: with grains larger than roughly 10 µm too few crystallites diffract, and intensities scatter from sample to sample. (6) Also extinction (strong reflections saturating in large, perfect crystals), fluorescence (iron or cobalt measured with Cu Kα gives a high background), and differences in monochromator or variable-slit corrections.

Indexing, and the pairs that cannot be told apart

For cubic crystals sin²θ = (λ²/4a²)·N, so ratios of sin²θ are ratios of N = h² + k² + l². Simple cubic gives N = 1, 2, 3, 4, 5, 6, 8… (7, 15 and others are not sums of three squares), BCC 2, 4, 6, 8, 10, 12, 14…, FCC 3, 4, 8, 11, 12, 16…, and diamond cubic 3, 8, 11, 16, 19…. This tool assumes that one of the first three peaks matches one of the low N values of each lattice, builds a trial a, assigns the nearest allowed N to every peak, and ranks the lattices by the number of matched peaks minus half the number of missing lines, then by 2θ deviation (without counting missing lines, a large cell that also fits stray peaks such as Kβ lines would win). Three cautions apply. SC and BCC have the same ratios up to the sixth line; only the seventh line separates them. Indexing finds the Bravais lattice only: NaCl indexes as FCC and CsCl as simple cubic (the atoms and their positions come from the intensities). Missing weak reflections make a pattern look like another lattice: GaAs indexes as diamond cubic if its weak (200) and (420) are not seen, and KCl, whose all-odd reflections almost vanish, as simple cubic with half the lattice parameter. With only two or three peaks, other lattices and lattice parameters often fit equally well, and the result is not reliable. Unmatched peaks may come from another phase, from Kβ (without a Kβ filter, on the low-angle side of strong lines), from Kα2, or from W Lα lines of a contaminated tube; the table notes when a peak sits at a Kβ or Kα2 position.

Accurate lattice parameters: systematic errors and extrapolation

An angle error Δθ gives a lattice-parameter error Δa/a = −cotθ·Δθ, which shrinks as θ approaches 90°, so high-angle peaks carry the most weight. On a diffractometer the largest systematic error is usually specimen displacement (the sample surface sitting a distance s off the goniometer axis): Δ2θ ≈ −2s cosθ/R, where R is the goniometer radius, so Δd/d is proportional to cos²θ/sinθ. A zero error adds a constant to 2θ. The cos²θ/sinθ and Nelson–Riley options fit a straight line to each peak’s aᵢ against that function and read the value at θ = 90°. The Nelson–Riley function ½(cos²θ/sinθ + cos²θ/θ) was devised for absorption and eccentricity errors in Debye–Scherrer cameras and is also widely used with diffractometers. “Least squares (a and zero shift)” fits a and a constant shift z together. The most reliable approach is an internal standard such as Si (NIST SRM 640 series) mixed into the sample to correct the angles. The ± shown is the standard error of the fit; it excludes systematic errors and temperature (for iron, Δa/a ≈ 1.2 × 10⁻⁵ per kelvin).

The Scherrer equation and the choice of K

In small crystallites the cancellation away from the exact Bragg angle is incomplete, so peaks broaden. The Scherrer equation D = Kλ/(β cosθ) turns that broadening β (a width in 2θ, in radians) into a mean crystallite thickness D perpendicular to the diffracting planes. K depends on whether the width is the FWHM or the integral breadth (area/height), on crystallite shape, on the size distribution and on which average D represents (a volume-weighted thickness, for example); Langford and Wilson (1978) give a range of 0.62 to 2.08. Scherrer’s own derivation (cube-shaped crystals, Gaussian profile, FWHM) gives 2√(ln2/π) ≈ 0.94, and 0.89 is also often quoted (sources disagree on whether that value goes with the FWHM or the integral breadth). In practice, use 0.9 when the shape is unknown and state the K you used; 0.89 and 0.94 differ by about 5 %, comparable to the error in measuring the width. The instrumental width βi is the width of a large-crystal standard measured under the same conditions, subtracted as β² = βm² − βi² for Gaussian profiles or β = βm − βi for Lorentzian ones. When the measured width is less than about twice the instrumental width the error becomes large, and crystallites above roughly 100–200 nm cannot be measured. D is the size of the crystallite (a coherently diffracting domain), which often differs from the particle size seen in an electron microscope.

Separating size and strain with a Williamson–Hall plot

Peaks broaden not only from small crystallites but also from a spread of strain inside the crystal (dislocations, stacking faults, composition fluctuations). Size broadening goes as Kλ/(D cosθ) and strain broadening as 4ε tanθ, so they depend on angle differently. If the two simply add, β cosθ = Kλ/D + 4ε sinθ, and points of β cosθ against 4 sinθ fall on a straight line whose intercept gives D and slope gives ε: the Williamson–Hall plot. A flat line means size broadening only; a line through the origin means strain only. The method assumes the same size and strain in every direction. When elastically soft directions (such as (200) in many metals) lie above the line, or stacking faults in FCC broaden particular reflections, the points do not fall on a line. If both contributions are Gaussian, adding their squares is an alternative, and the results can change considerably with the formula used, so report the method and K together. More rigorous options use the whole line shape: the Warren–Averbach method, Rietveld refinement or whole-pattern modeling.

Peak shifts from solid solution and stress, and Vegard’s law

Differentiating Bragg’s law gives Δθ = −(Δd/d) tanθ: a lattice that expands moves its peaks to lower angles, and the shift grows at high angles. For Δd/d = 0.1 %, Δ2θ ≈ −0.047° at 2θ = 44.7° but −0.29° at 2θ = 137°. Dissolving atoms of a different size changes the lattice parameter, and for binary solid solutions Vegard’s law, a(x) = (1 − x)a_A + x a_B, is widely used to estimate composition: InₓGa₁₋ₓAs, SiGe and alloy concentrations are typical examples. Vegard’s law is empirical, though: Si–Ge and many metallic pairs deviate slightly, and pairs whose end members differ little (Ag–Au, about 0.2 %) give no useful composition resolution. In thin films, stress from lattice mismatch or thermal-expansion mismatch with the substrate also changes the spacing, so a θ–2θ scan of planes parallel to the surface cannot separate composition from strain by itself. Under an equal in-plane biaxial stress σ, the strain of planes parallel to the surface is ε⊥ = −2ν σ/E, and this tool uses that relation to estimate σ. Real residual stress is measured with the sin²ψ method, tilting the sample, and uses X-ray elastic constants for each reflection.

Practical measurement

Grind the powder well in a mortar (roughly a few µm to 10 µm) and fill the holder so that the sample surface is flush with the holder surface; a displaced surface shifts every peak in one direction (the specimen-displacement error above). Cu Kα is the most common radiation, but samples containing iron or cobalt fluoresce and give a high background, so use Co Kα or Fe Kα, or a diffracted-beam monochromator. Remove Kβ with a filter (Ni for Cu; Fe for Co, V for Cr, Zr for Mo), a monochromator or an energy-resolving detector. For precise lattice parameters, measure to high angles (to about 140° 2θ with Cu), with small steps and long counting times. Read peak positions from the center of a fitted profile (or the centroid) rather than the highest point, and use the Kα1 position at high angles where Kα1 and Kα2 separate. Determine the instrumental width for the Scherrer equation by measuring a standard such as LaB₆ (NIST SRM 660 series) with the same slits and settings.

Assumptions and limits of this tool

The pattern calculation assumes a fine powder with completely random orientation, an infinitely thick sample, no extinction and one isotropic temperature factor B for every atom. Atomic scattering factors are spherical free-atom (or free-ion) approximations without bonding effects. The Cromer–Mann-type coefficients are an approximation for sinθ/λ < 2 Å⁻¹ and lose accuracy beyond that (short wavelengths at high angles). The anomalous-dispersion correction is applied only at tube-line wavelengths and is inaccurate right next to an absorption edge. The line shape is a pseudo-Voigt function (half Lorentzian, half Gaussian) with the simple width law FWHM = constant + coefficient × tanθ, and Kα2 is taken as half as strong as Kα1. Indexing handles the four cubic lattices only; tetragonal, hexagonal and other systems, and patterns of mixed phases, are outside its scope. Of the structures with internal parameters only wurtzite u is handled, and the ZnO entry uses the neutron-diffraction value 0.3817 (slightly above the ideal 3/8 = 0.375). For quantitative phase analysis, Rietveld refinement or grazing-incidence thin-film work, use dedicated software.

Data sources

Element lattice parameters are the ASM and related values used by the periodic table tool (25 °C). Compound lattice parameters come from the Handbook of Mineralogy (NaCl, KCl, LiF, MgO, CaF₂, ZnS, ZnO), Vurgaftman et al. (2001, III–V semiconductors) and Kisi and Elcombe (1989, wurtzite ZnS and the u of ZnO, COD 1100044). Atomic scattering factor coefficients are from International Tables for Crystallography Vol. C (1992) Table 6.1.1.4, anomalous-dispersion corrections from the tables of Henke, Gullikson and Davis (1993), X-ray wavelengths from λ = hc/E using the photon energies of X-ray Data Booklet Table 1-2 (based on Bearden 1967), and temperature factors from the 293 K values of Peng, Ren, Dudarev and Whelan (1996); for NaCl they are derived from the 1 bar, room-temperature mean-square displacements tabulated by Finger and King (1978), and for MgO taken from Hazen (1976). The example and check data are NBS Circular 539 values (Cu, α-Fe), the Handbook of Mineralogy (NaCl) and PDF cards 4-787 (Al) and 27-1402 (Si) as reproduced in university course material. The calculations have been checked against an independently written Python program, and for Cu, α-Fe, Al and Si the positions and the order of intensities agree with the standard patterns. With its temperature factor included, NaCl also matches the order of the standard intensities (with B set to 0 its high-angle (420) and (422) lines come out too strong).

Practice characterization questions

In XRD with Cu Kα radiation (wavelength 0.15406 nm), which value is closest to the diffraction angle 2θ of the first-order peak from the Si (111) planes, with an interplanar spacing of 0.3135 nm?

  1. AAbout 14.2°
  2. BAbout 28.4°
  3. CAbout 58.9°
Show answer and explanation

Answer: B. About 28.4°

From Bragg's law 2d sinθ = nλ (n = 1), sinθ = 0.15406/(2 × 0.3135) ≈ 0.2457, so θ ≈ 14.2° and the diffraction angle is 2θ ≈ 28.4°. XRD instruments and data normally plot 2θ, the angle between the incident and diffracted X-rays, on the horizontal axis. About 14.2° is the mistake of answering θ itself, and about 58.9° drops the 2 in Bragg's equation and uses sinθ = λ/d. The peak of silicon powder near 28.4° is strong and sharp, so it is also widely used as a standard for calibrating diffraction angles.

In powder XRD of a metal with the FCC structure, what are the indices of the diffraction peak that appears at the lowest angle?

  1. A(100)
  2. B(110)
  3. C(111)
Show answer and explanation

Answer: C. (111)

In FCC, diffraction appears only when h, k and l are all even or all odd; when even and odd are mixed, the scattering from the four atoms in the unit cell cancels and the intensity is zero (the extinction rules). Peaks therefore appear in the order (111), (200), (220), (311)…, and (111), with the smallest h² + k² + l², has the largest interplanar spacing and the lowest angle. (100) and (110) both mix even and odd indices and so do not appear in FCC. In BCC only planes with h + k + l even appear, so the first peak is (110), and the sequence of peaks distinguishes FCC from BCC.

In powder XRD of copper (FCC) with Cu Kα radiation (wavelength 0.15406 nm), the lowest-angle peak appeared at 2θ = 43.30°. Which value is closest to the lattice parameter of copper?

  1. AAbout 0.209 nm
  2. BAbout 0.295 nm
  3. CAbout 0.362 nm
Show answer and explanation

Answer: C. About 0.362 nm

θ = 21.65° and sinθ ≈ 0.3689, so Bragg's law gives d = λ/(2 sinθ) ≈ 0.2088 nm. In FCC the lowest-angle peak is (111), so a = d × √(1² + 1² + 1²) = 0.2088 × √3 ≈ 0.362 nm, matching the lattice parameter of copper (about 0.3615 nm). About 0.209 nm is the interplanar spacing d itself, without converting to the lattice parameter. About 0.295 nm treats the first peak as (110) and multiplies by √2, the mistake of applying the BCC extinction rules. Correct indexing of the peaks is a prerequisite for determining the lattice parameter.

In XRD, a peak at 2θ = 38.2° had a full width at half maximum (after removing instrumental broadening) of 0.40°. Using the Scherrer equation D = Kλ/(β cosθ) with K = 0.9 and λ = 0.15406 nm, which value is closest to the crystallite size?

  1. AAbout 0.37 nm
  2. BAbout 25 nm
  3. CAbout 21 nm
Show answer and explanation

Answer: C. About 21 nm

Convert the width to radians, β = 0.40 × π/180 ≈ 6.98×10⁻³ rad, and use half of 2θ, 19.1° (cosθ ≈ 0.945), for θ. D = 0.9 × 0.15406/(6.98×10⁻³ × 0.945) ≈ 21 nm. About 0.37 nm substitutes β as 0.40 in degrees, and about 25 nm uses the cosine of 2θ, cos38.2°, instead of θ. What the Scherrer equation gives is not the grain size itself but the size of the crystallites that diffract coherently. Nonuniform strain also broadens peaks, so strictly the two are separated by methods such as the Williamson–Hall method. When crystallites become large, the broadening is too small to determine the size accurately.

FAQ

My calculated intensities do not match the PDF card. Which is right?

Usually both, because they describe different quantities. This tool’s “integrated” intensity is the peak area, whereas card intensities are normally peak heights. At high angles Kα1 and Kα2 separate and the lines broaden, so heights are lower than areas. Compare with the “curve height” column, which includes width and Kα2. If a reflection still differs a lot, suspect preferred orientation first.

What is n in Bragg’s law?

The order of diffraction. Second-order diffraction from (110) appears at the same angle as first-order diffraction from (220), whose spacing is half as large. XRD therefore sets n = 1 and writes the plane with multiplied indices, such as (220).

Why is there no (100) peak for BCC?

The body-center atoms form a plane of equal density exactly halfway between the (100) planes of corner atoms, and the waves scattered from it are half a wavelength out of step, so they cancel. In terms of the structure factor, F = f[1 + e^{iπ(h+k+l)}], which is zero for h + k + l odd.

What is the wavelength of Cu Kα radiation?

Kα1 is 0.15406 nm and Kα2 0.15444 nm, with an intensity ratio of about 2 : 1. When they are not separated, the weighted mean (2λ1 + λ2)/3 ≈ 0.15419 nm is used (0.15418 nm in some sources). The values in this tool are λ = hc/E from the photon energies of the X-ray Data Booklet. Co Kα1 is 0.17890 nm, Cr Kα1 0.22898 nm, Fe Kα1 0.19361 nm and Mo Kα1 0.07093 nm.

Is β in the Scherrer equation a width in 2θ or in θ?

It is the width in 2θ, converted to radians. Entering it in degrees is off by a factor of 57.3, and using the width in θ is off by a factor of 2; both are common mistakes. Forgetting to subtract the instrumental width makes the size come out too small.

Is crystallite size the same as particle size?

Not necessarily. XRD measures the size of coherently diffracting domains (crystallites). A particle made of many crystallites is much larger than the crystallite size. Conversely, mistaking strain broadening for size broadening makes the crystallites look smaller than they are.

How far can I trust the ± on the lattice parameter?

The ± is the standard error from the fit residuals and reflects the scatter of the peak positions. It does not include systematic errors such as specimen displacement, zero error or temperature differences. Reduce those with extrapolation or a zero-shift fit, and ideally correct the angles with an internal standard such as Si.

Can I index hexagonal or tetragonal samples?

The indexing here is for cubic lattices only. For hexagonal crystals (HCP, wurtzite), enter a and c in the Pattern mode and compare the calculated positions with your peaks. For general crystal systems, use dedicated indexing programs such as ITO, TREOR or DICVOL.

Related terms

XRD (X-ray diffraction) Bragg's law Miller indices Extinction rules Scherrer equation Body-centered cubic Face-centered cubic Hexagonal close-packed

Related calculators

Materials Science Calculators →