# Williamson–Hall plot calculator: crystallite size and microstrain from XRD

> Williamson–Hall plot online: paste XRD 2θ and FWHM, remove instrumental broadening, get crystallite size D = Kλ/intercept and microstrain ε. Free.

URL: https://www.labcanvas.com/tools/williamson-hall-plot

A Williamson–Hall plot separates the two causes of XRD peak broadening. Plot β cos θ against 4 sin θ for every peak (β the FWHM in radians after removing the instrument’s width, θ half the peak position 2θ) and fit a straight line: in the uniform deformation model, β cos θ = Kλ/D + 4ε sin θ, so the intercept gives the crystallite size D = Kλ/intercept and the slope is the microstrain ε. Paste your peak list (2θ, FWHM, hkl) and the calculator draws the plot, fits the line and gives D and ε with 95 % confidence intervals, using the same λ, K and instrumental correction as the Scherrer calculator.

## Quick answer

- **What it does:** Fits the Williamson–Hall line (uniform deformation model) to XRD peak widths and gives the crystallite size D and the microstrain ε with 95 % confidence intervals.
- **Formula:** β cos θ = Kλ/D + 4ε sin θ;  D = Kλ / intercept;  ε = slope;  β = √(β_obs² − β_inst²)
- **Example:** Seven ZnO peaks (Cu Kα1, K = 0.9, instrument 0.08°) give intercept 4.665 × 10⁻³ rad and slope 1.476 × 10⁻³ (R² = 0.958): D = 29.7 nm (95 % CI 26.4–34.1 nm) and ε = 1.48 × 10⁻³ (0.148 %), where the Scherrer sizes of the same peaks average 19.8 nm.

Free, in the browser, no account needed. Updated 2026-11-23.

## Features

- Williamson–Hall plot of β cos θ against 4 sin θ with the least-squares line and its intercept
- Crystallite size \(D = K\lambda/\text{intercept}\) and microstrain \(\varepsilon = \text{slope}\), each with SE and 95 % confidence interval
- Instrumental broadening removed in quadrature (Gaussian, as the Scherrer calculator) or by subtraction (Lorentzian)
- Cu Kα1 (1.54056 Å) or any wavelength; K 0.9, 0.94, 0.89, 1.0 or your own, as in the Scherrer calculator
- Scherrer size of every peak beside the Williamson–Hall size, to see how much strain changes the answer
- Paste a peak list with hkl labels, or drop a whole pattern and the peaks are found for you
- Plot as PNG (300 or 600 dpi), table and methods sentence to copy, CSV; opens in the Graph app with the same fit

## How to use it

1. **Paste your peaks**: One row per reflection: 2θ and FWHM in degrees, then the hkl label if you have it, from your peak-fitting software or a spreadsheet. Use three or more well-separated peaks over a wide 2θ range.
2. **Remove the instrument**: Enter the FWHM of a well-crystallised standard (LaB₆ or Si) measured on the same instrument; it is removed in quadrature, or subtracted for Lorentzian peaks.
3. **Check λ and K**: Keep Cu Kα1 and K = 0.9, or choose another wavelength and shape factor under More options.
4. **Read D and ε**: Read the crystallite size from the intercept and the microstrain from the slope, with their confidence intervals, and look at how well the points follow the line.
5. **Export**: Copy the methods sentence or the table, download the plot (PNG) and the CSV, or open the plot in the Graph app.

## At a glance

| | |
| --- | --- |
| Model | Uniform deformation: \(\beta\cos\theta = K\lambda/D + 4\varepsilon\sin\theta\), least-squares line |
| Gives | \(D = K\lambda/\text{intercept}\) and \(\varepsilon = \text{slope}\), with SE and 95 % CI; R²; Scherrer size per peak |
| Input | 2θ and FWHM in degrees, one row per peak, optional hkl; or a whole pattern (peaks found) |
| Instrument | FWHM of a standard, removed in quadrature (Gaussian) or subtracted (Lorentzian) |
| Wavelength and K | Cu Kα1 1.54056 Å or any; K 0.9 default (0.94, 0.89, 1.0 or your own) |
| Checked | Against SciPy linregress, exact synthetic peaks and the Graph app’s analysis |
| Output | Plot (PNG 300/600 dpi), table and methods (copy), CSV; Graph app |

## How it works

$$\beta_\mathrm{hkl}\cos\theta = \frac{K\lambda}{D} + 4\varepsilon\sin\theta$$

**Two kinds of broadening.** Small crystallites broaden a diffraction peak by \(K\lambda/(D\cos\theta)\) (the Scherrer term), and lattice microstrain \(\varepsilon\) broadens it by \(4\varepsilon\tan\theta\). The two depend on \(\theta\) differently, so peaks at several angles can separate them (Williamson & Hall 1953). Adding the two breadths and multiplying by \(\cos\theta\) gives the straight line above: plotted against \(4\sin\theta\), its intercept is \(K\lambda/D\) and its slope is \(\varepsilon\). Assuming the same strain in every direction is the *uniform deformation model*; Mote, Purushotham & Dole (2012) applied it and two anisotropic variants (uniform stress, uniform energy density) to ZnO nanoparticles and found that the three gave different strains, which they attributed to the anisotropic nature of the material.

**The fit.** The calculator converts each FWHM to radians, removes the instrumental width, computes \(x = 4\sin\theta\) and \(y = \beta\cos\theta\), and fits \(y = a + b x\) by ordinary least squares. \(D = K\lambda/a\) and \(\varepsilon = b\). The 95 % confidence interval of \(D\) is \(K\lambda\) divided by the ends of the intercept’s interval \(a \pm t_{0.975,\,n-2}\,\mathrm{SE}(a)\); the interval of \(\varepsilon\) is \(b \pm t_{0.975,\,n-2}\,\mathrm{SE}(b)\). This is the Graph app’s own crystallite-size analysis, so the numbers match there, and it is checked against SciPy’s `linregress`.

**Instrumental broadening.** Every peak is also broadened by the diffractometer. Measure a well-crystallised standard on the same instrument and remove its FWHM: in quadrature, \(\beta = \sqrt{\beta_\mathrm{obs}^2 - \beta_\mathrm{inst}^2}\), for Gaussian peaks (what the [XRD Scherrer calculator](https://www.labcanvas.com/tools/xrd-scherrer-calculator) does, because the variances of independent broadenings add; Khorsand Zak & Hashim 2025), or by subtraction, \(\beta = \beta_\mathrm{obs} - \beta_\mathrm{inst}\), for Lorentzian peaks. The choice matters: on the example below, subtracting instead of quadrature changes D from 29.7 to 41.5 nm. State which you used.

**λ and K.** The wavelength defaults to Cu Kα1, 1.54056 Å (Canchanya-Huaman et al. 2021), and K to 0.9, with 0.94, 0.89 and 1.0 as presets: about 0.89–0.91 suits spherical or cubic crystallites and about 1.0–1.2 plates and rods (Khorsand Zak & Hashim 2025); its value depends on the crystallite shape and on the measure of breadth used (Langford & Wilson 1978). K scales D directly and does not change ε.

**Limits.** The line assumes isotropic crystallites and isotropic strain. When broadening depends on direction (plate-like crystallites, elastic anisotropy, dislocations), the points scatter about the line and D and ε depend on which peaks you include; the modified Williamson–Hall method orders the peaks by dislocation contrast instead (Ungár & Borbély 1996). Overlapping peaks give widths that are too large: fit them as separate peaks (for example with the [peak fitting tool](https://www.labcanvas.com/tools/peak-fitting-online)) or leave them out. A negative intercept means no size can be read; a negative slope usually means anisotropy or noise rather than compressive strain. Sizes above about 100–200 nm are beyond what peak broadening measures reliably (Canchanya-Huaman et al. 2021).

## Worked example: size and strain of ZnO nanoparticles

The built-in example is a synthetic data set, not a measurement: seven ZnO (wurtzite) reflections with Cu Kα1, their widths made from \(D = 30\ \mathrm{nm}\) and \(\varepsilon = 1.5 \times 10^{-3}\) with K = 0.9, each scaled by 0.97–1.03 to mimic real scatter, then broadened by a 0.08° instrument and rounded to 0.001°.

| hkl | 2θ (°) | FWHM (°) | β (°) | 4 sin θ | β cos θ (rad) | Scherrer D (nm) |
| --- | --- | --- | --- | --- | --- | --- |
| (100) | 31.77 | 0.389 | 0.3807 | 1.0948 | 0.006390 | 21.70 |
| (002) | 34.42 | 0.381 | 0.3725 | 1.1835 | 0.006210 | 22.33 |
| (101) | 36.25 | 0.399 | 0.3909 | 1.2444 | 0.006484 | 21.38 |
| (102) | 47.54 | 0.461 | 0.4540 | 1.6123 | 0.007252 | 19.12 |
| (110) | 56.60 | 0.485 | 0.4784 | 1.8964 | 0.007351 | 18.86 |
| (103) | 62.86 | 0.532 | 0.5260 | 2.0858 | 0.007833 | 17.70 |
| (112) | 67.96 | 0.551 | 0.5452 | 2.2356 | 0.007890 | 17.57 |

- **One point by hand**, (101): \(\theta = 18.125^\circ\); \(\beta\) \({}= \sqrt{0.399^2 - 0.08^2}\) \({}= 0.3909^\circ\) \({}= 0.006823\ \mathrm{rad}\); \(x = 4\sin 18.125^\circ = 1.2444\); \(y\) \({}= 0.006823 \times \cos 18.125^\circ\) \({}= 0.006484\ \mathrm{rad}\).
- **Fit the line** through the seven points: intercept \(a = (4.665 \pm 0.232) \times 10^{-3}\) rad, slope \(b = (1.476 \pm 0.138) \times 10^{-3}\), \(R^2 = 0.958\).
- **Crystallite size:** \(D\) \({}= K\lambda/a\) \({}= 0.9 \times 0.154056\ \mathrm{nm} / 0.004665\) \({}= \mathbf{29.7\ nm}\), 95 % CI 26.4–34.1 nm. The data were made with 30 nm.
- **Microstrain:** \(\varepsilon = b = \mathbf{1.48 \times 10^{-3}}\) (0.148 %), 95 % CI \(1.12\text{–}1.83 \times 10^{-3}\). The data were made with \(1.5 \times 10^{-3}\).
- **Compare with Scherrer.** The Scherrer sizes of the same peaks fall from 22.3 nm to 17.6 nm as 2θ rises, mean 19.8 nm: a size that shrinks with angle is the sign of strain broadening, which the Scherrer equation counts as size.

**The choices change the answer.** Without the instrumental correction the same peaks give D = 28.5 nm and ε = 1.42 × 10⁻³; subtracting the instrument (Lorentzian) instead of quadrature gives D = 41.5 nm and ε = 1.58 × 10⁻³; with Co Kα1 (1.78897 Å), K = 0.94 and a 0.05° instrument, 35.1 nm. Report λ, K, the instrumental width and how it was removed.


## References

- Williamson GK, Hall WH. X-ray line broadening from filed aluminium and wolfram. *Acta Metall* 1953;1:22–31. [doi:10.1016/0001-6160(53)90006-6](https://doi.org/10.1016/0001-6160(53)90006-6)
- Mote VD, Purushotham Y, Dole BN. Williamson–Hall analysis in estimation of lattice strain in nanometer-sized ZnO particles. *J Theor Appl Phys* 2012;6:6. [doi:10.1186/2251-7235-6-6](https://doi.org/10.1186/2251-7235-6-6)
- Khorsand Zak A, Abd. Majid WH, Abrishami ME, Yousefi R. X-ray analysis of ZnO nanoparticles by Williamson–Hall and size–strain plot methods. *Solid State Sci* 2011;13:251–256. [doi:10.1016/j.solidstatesciences.2010.11.024](https://doi.org/10.1016/j.solidstatesciences.2010.11.024)
- Ungár T, Borbély A. The effect of dislocation contrast on x-ray line broadening: a new approach to line profile analysis. *Appl Phys Lett* 1996;69:3173–3175. [doi:10.1063/1.117951](https://doi.org/10.1063/1.117951)
- Langford JI, Wilson AJC. Scherrer after sixty years: a survey and some new results in the determination of crystallite size. *J Appl Crystallogr* 1978;11:102–113. [doi:10.1107/S0021889878012844](https://doi.org/10.1107/S0021889878012844)
- Khorsand Zak A, Hashim AM. Advanced XRD peak broadening analysis of gallium-doped ZnO nanoparticles for crystallite size evaluation. *Sci Rep* 2025;16:1717. [doi:10.1038/s41598-025-31317-2](https://doi.org/10.1038/s41598-025-31317-2)
- Canchanya-Huaman Y, Mayta-Armas AF, Pomalaya-Velasco J et al. Strain and grain size determination of CeO₂ and TiO₂ nanoparticles: comparing integral breadth methods versus Rietveld, µ-Raman, and TEM. *Nanomaterials* 2021;11:2311. [doi:10.3390/nano11092311](https://doi.org/10.3390/nano11092311)


## Related calculators

- [XRD Scherrer & Bragg calculator](https://www.labcanvas.com/tools/xrd-scherrer-calculator): Crystallite size from XRD peak widths (Scherrer) and d-spacing from Bragg’s law.
- [Adsorption isotherm fitting](https://www.labcanvas.com/tools/adsorption-isotherm-fitting): Langmuir, Freundlich, Sips and Temkin isotherms fitted to Ce and qe by nonlinear least squares, with RL.
- [Tauc plot band gap calculator](https://www.labcanvas.com/tools/tauc-plot-band-gap-calculator): Optical band gap from a UV–vis or diffuse-reflectance spectrum by a Tauc plot, with its 95% CI.
- [All 39 lab calculators](https://www.labcanvas.com/tools/lab-calculators)

## Use this calculator from code or an AI agent

This calculator also answers as JSON, computed by the same code as this page: no key, no account, CORS open. Send the parameters as a query string (numbers may carry units; lists comma-separated) or POST them as JSON to https://www.labcanvas.com/api/tools/williamson-hall-plot. An example, with the answer shortened to its first values:

```
GET https://www.labcanvas.com/api/tools/williamson-hall-plot?two_theta=31.77%2C34.42%2C36.25%2C47.54%2C56.60%2C62.86%2C67.96&fwhm=0.389%2C0.381%2C0.399%2C0.461%2C0.485%2C0.532%2C0.551&instrumental=0.08
```

```json
{
 "ok": true,
 "tool": "williamson-hall-plot",
 "inputs": {"two_theta":{"value":[31.77,34.42,36.25,47.54,56.6,62.86,67.96]},"fwhm":{"value":[0.389,0.381,0.399,0.461,0.485,0.532,0.551]},"instrumental":{"value":0.08}},
 "result": {"size":{"label":"Crystallite size D","value":29.72064762,"unit":"nm"},"size_ci_low":{"label":"D 95 % CI low","value":26.35675753,"unit":"nm"}},
 "answer": "Crystallite size D = 29.7 nm (95 % CI 26.4–34.1 nm) and microstrain ε = 0.00148 from 7 peaks (R² = 0.9581).",
 "formula": "β cos θ = Kλ/D + 4ε sin θ (least-squares line of β cos θ on 4 sin θ, β in radians, β = √(FWHM² − instrumental²)); D = Kλ/intercept, ε = slope",
 "page": "https://www.labcanvas.com/tools/williamson-hall-plot",
 "citation": "LabCanvas Williamson–Hall plot calculator, https://www.labcanvas.com/tools/williamson-hall-plot"
}
```

Parameters:

- `two_theta` (number[], required): Peak positions 2θ in degrees (three or more).
- `fwhm` (number[], required): FWHM of each peak in degrees 2θ.
- `wavelength` (number, Å, default 1.54056): X-ray wavelength (Å); Cu Kα1 1.54056.
- `k` (number, default 0.9): Shape factor K (0.9 common, 0.94 spheres).
- `instrumental` (number, default 0): Instrumental FWHM (degrees 2θ) of a standard on the same instrument.
- `correction` (string, default gaussian: gaussian | lorentzian): Removing the instrumental width: gaussian (in quadrature) or lorentzian (subtracted).

All calculators: https://www.labcanvas.com/api/tools · OpenAPI 3.1: https://www.labcanvas.com/api/tools/openapi.json · MCP tool: `calc_williamson_hall_plot` (LabCanvas MCP server).

## Questions

### How do I make a Williamson–Hall plot?

For each XRD peak, take the FWHM in radians after removing the instrumental width (β) and half the peak position (θ). Plot β cos θ on the y axis against 4 sin θ on the x axis and fit a straight line. The intercept is Kλ/D, so the crystallite size is D = Kλ/intercept; the slope is the microstrain ε.

### What is the difference between the Scherrer equation and a Williamson–Hall plot?

The Scherrer equation, D = Kλ/(β cos θ), treats all broadening as coming from small crystallites and gives one size per peak. The Williamson–Hall plot uses several peaks to split the broadening into a size part (constant in β cos θ) and a strain part (rising with sin θ), so it gives one size and one strain. With strain present, Scherrer sizes come out smaller and fall with 2θ.

### How do I calculate microstrain from XRD?

Fit β cos θ against 4 sin θ for several peaks; in the uniform deformation model the slope is the microstrain ε (dimensionless, often quoted as % or × 10⁻³). Remove the instrumental broadening first, or ε also contains the instrument.

### Why is my Williamson–Hall intercept negative?

A negative intercept gives no size. It happens when the size broadening is too small to see next to strain and the instrument (large crystallites), when widths are noisy or include overlapping peaks, or when the broadening is anisotropic. Check the instrumental correction, use well-fitted, separate peaks, and look at the plot for outliers.

### What does a negative slope mean in a Williamson–Hall plot?

In the uniform deformation model the slope is a microstrain, which cannot be negative. A negative slope usually means anisotropic broadening (crystallites of different sizes in different directions) or noise, not compressive strain. Report the size with care, or use a modified Williamson–Hall analysis.

### Should I remove instrumental broadening in quadrature or by subtraction?

Quadrature, β² = β_obs² − β_inst², is right for Gaussian peak shapes and is what the Scherrer calculator uses; subtraction, β = β_obs − β_inst, is right for Lorentzian shapes. Real peaks lie in between, and the choice can change D a lot when the peaks are narrow, so state which you used.

### How many peaks do I need for a Williamson–Hall plot?

At least three for a line with a confidence interval, and better five or more spread over a wide 2θ range, so the slope and intercept are well separated. Leave out overlapping and very weak peaks.

### What K and wavelength should I use?

K = 0.9 is the usual choice (0.89–0.91 for spheres or cubes, about 1.0–1.2 for plates and rods), and Cu Kα1, 1.54056 Å, for a copper tube. K changes D but not ε. Use the same values as in your Scherrer calculation so the two can be compared.
