---
title: "Bragg's Law Calculator: d-Spacing, 2θ, XRD Peaks | MolDraw"
url: https://www.moldraw.com/tools/free-chem-tools/braggs-law-xrd-calculator.html
description: "Bragg's law calculator nλ = 2d sinθ: solve d, 2θ or λ, d-spacing from hkl, XRD peak list and Scherrer size. NaCl (200): d = 2.8201 Å, 2θ = 31.70°."
lang: en
publisher: Scidart Academy
generated: 2026-10-31
---
[MolDraw](https://www.moldraw.com/) › [Chemistry tools](https://www.moldraw.com/tools/) › Bragg's Law and XRD Calculator

# Bragg's Law Calculator (XRD)

**In short:** Solve nλ = 2d sin θ for d, θ, 2θ, λ or n. Get the d-spacing of any (h k l) in any crystal system, list the allowed XRD peaks for a cell, and estimate crystallite size with the Scherrer equation. Free, in your browser.

**Quick answer:** d = nλ / (2 sin θ). NaCl (a = 5.6402 Å): d(200) = a/2 = **2.8201 Å**, so with Cu Kα1 (1.5406 Å) the peak is at θ = 15.85°, **2θ = 31.70°**. Silicon (111): d = 5.431/√3 = 3.1356 Å, 2θ = 28.44°.

## 1. Bragg's law: nλ = 2d sin θ

Fill in three values and leave the one to find **blank**. Use θ or 2θ (not both).

X-ray source

Order n Wavelength λ (Å) d-spacing (Å) 2θ (degrees)

or θ (degrees)

## 2. d-spacing from Miller indices and allowed reflections

Crystal system Centring (extinction rule) List peaks up to 2θ (°)

a (Å) b (Å) c (Å) α (°) β (°) γ (°)

h k l

also show absent ones

## 3. Scherrer crystallite size: τ = Kλ / (β cos θ)

Shape factor K λ (Å) Peak 2θ (°) FWHM (° 2θ) Instrumental FWHM (° 2θ) Correction

## How to use the Bragg's law calculator

1. Pick the **X-ray source** (Cu Kα1 for most lab diffractometers) or type λ.
2. Enter three of n, λ, d and 2θ (or θ) and leave the unknown blank. The answer updates as you type.
3. For predicted peaks, pick the **crystal system** and **centring**, enter the cell, and press **List reflections**.
4. Change h, k, l to get one d-spacing and its 2θ.
5. For crystallite size, enter the peak 2θ and its FWHM (and the instrumental FWHM if you have it).

## The formulas

`Bragg: n λ = 2 d sin θ d = n λ / (2 sin θ) θ = arcsin(n λ / 2d) 2θ = peak position`

A peak is possible only when nλ ≤ 2d. Higher orders (n = 2, 3…) of the plane (h k l) appear at the same place as the first order of (nh nk nl), so most XRD software keeps n = 1 and uses d/n.

### d-spacing for each crystal system

| System | 1 / d² |
| --- | --- |
| Cubic | (h² + k² + l²) / a² |
| Tetragonal | (h² + k²) / a² + l² / c² |
| Orthorhombic | h²/a² + k²/b² + l²/c² |
| Hexagonal | 4(h² + hk + k²) / 3a² + l²/c² |
| Monoclinic (b unique) | [h²/a² + k² sin²β / b² + l²/c² − 2hl cos β / (ac)] / sin²β |
| Rhombohedral, triclinic | hᵀ G* h, with G* the inverse of the metric tensor Gij = ai·aj |

The calculator always uses the general form 1/d² = hᵀ G* h, which reduces to the lines above. Hexagonal indices are the three-index (h k l); the Miller–Bravais i = −(h + k) does not change d.

### Systematic absences from lattice centring

| Lattice | Reflection present when | First allowed (cubic) |
| --- | --- | --- |
| P primitive | always | 100, 110, 111, 200, 210… |
| I body-centred (BCC) | h + k + l even | 110, 200, 211, 220, 310… |
| F face-centred (FCC) | h, k, l all even or all odd | 111, 200, 220, 311, 222… |
| Diamond (Si, Ge) | F, and h + k + l = 4n when all even | 111, 220, 311, 400, 331… |
| C / A / B base-centred | h + k / k + l / h + l even | – |
| R (hexagonal axes) | −h + k + l = 3n | – |

Only centring is applied. Screw axes and glide planes remove more peaks (for example 00l with l odd for a 2₁ axis along c), and atoms with similar scattering power can make allowed peaks very weak (KCl looks primitive cubic). The list gives positions, not intensities.

### X-ray wavelengths

| Anode | Kα1 (Å) | Kα, weighted mean (Å) |
| --- | --- | --- |
| Cu | 1.540598 | 1.541838 |
| Mo | 0.709319 | 0.710730 |
| Co | 1.788996 | 1.790260 |
| Cr | 2.289760 | 2.291000 |
| Fe | 1.936042 | 1.937355 |
| Ag | 0.559421 | – |

Kα1: G. Hölzer et al., Phys. Rev. A 56, 4554 (1997). Weighted Kα means: International Tables for Crystallography, Vol. C, Table 4.2.2.1. Rounded values often quoted: Cu Kα1 1.5406, Cu Kα 1.5418, Mo Kα 0.7107, Co Kα1 1.7890, Cr Kα 2.2910, Fe Kα 1.9374 Å.

### Scherrer equation

`τ = K λ / (β cos θ) β = FWHM in radians = FWHM(°) × π / 180, after removing instrumental broadening b`

K ≈ 0.9 is the usual choice; published values run from about 0.89 to 0.94 depending on crystallite shape and how the width is defined. Example: Cu Kα1, 2θ = 31.70°, FWHM = 0.25°, K = 0.9 → β = 0.004363 rad, τ = 0.9 × 1.5406 / (0.004363 × cos 15.85°) = 330 Å = **33 nm**.

## Limitations

- Peak positions only: no structure factors, intensities, Lorentz-polarisation or preferred orientation. Use a full powder-pattern program for that.
- Extinctions come from lattice centring (plus the diamond rule as an option); screw-axis and glide-plane absences are not applied.
- 2θ values are for a perfectly aligned instrument; real peaks also shift with sample displacement and zero error.
- Scherrer sizes ignore microstrain (use a Williamson–Hall plot to separate it) and become unreliable above about 100–200 nm, where the size broadening is close to the instrumental width.
- Equivalent reflections are grouped by equal d; the count is the number of (h k l) with that d in the lattice, which can exceed the true multiplicity for lower Laue symmetry.

## Frequently asked questions

### How do you calculate d-spacing from 2θ?

Use Bragg's law with n = 1: d = λ / (2 sin θ), where θ is half of the 2θ peak position. For a Cu Kα1 peak at 2θ = 31.70°: d = 1.5406 / (2 × sin 15.85°) = 2.820 Å, the (200) spacing of NaCl.

### What is the d-spacing formula for a cubic crystal?

d = a / √(h² + k² + l²). For silicon, a = 5.431 Å, the (111) spacing is 5.431 / √3 = 3.1356 Å, which gives 2θ = 28.44° with Cu Kα1. Other systems use the general reciprocal metric tensor, which the calculator applies for you.

### Which reflections are absent for FCC and BCC lattices?

In a face-centred (F) lattice h, k, l must be all even or all odd, so (100) and (110) are absent and (111), (200), (220) are present. In a body-centred (I) lattice h + k + l must be even, so (100) and (111) are absent and (110), (200), (211) are present.

### Which wavelength should I use for Cu Kα?

Use Cu Kα1 = 1.5406 Å when the Kα2 line is stripped or resolved (most modern data), and the weighted mean Cu Kα = 1.5418 Å for unresolved peaks at low angle. The difference shifts 2θ by about 0.03° near 2θ = 30°.

### How accurate is the Scherrer crystallite size?

It is an estimate of the mean size of coherently diffracting domains, usually good to about ±20%. It assumes all broadening comes from size: strain and instrument broadening also widen peaks, so subtract the instrumental FWHM (measured on a standard such as LaB6) and treat sizes above about 100–200 nm as unreliable.

## Related chemistry tools

[CIF Viewer (3D unit cell)](https://www.moldraw.com/tools/free-chem-tools/cif-viewer-online.html)[CIF to XYZ and POSCAR Converter](https://www.moldraw.com/tools/free-chem-tools/cif-to-xyz-poscar-converter.html)[XPS Viewer](https://www.moldraw.com/tools/xps-viewer/)[Crystal Field Splitting Diagram](https://www.moldraw.com/tools/free-chem-tools/crystal-field-splitting-diagram.html)[Point Group Finder](https://www.moldraw.com/tools/free-chem-tools/point-group-finder.html)[Molar Mass Calculator](https://www.moldraw.com/tools/free-chem-tools/molar-mass-calculator.html)

Last updated: October 30, 2026
