d spacing calculator

Formula: d = nλ / (2 sinθ), where θ = (2θ)/2.

What is d-spacing?

In crystallography and X-ray diffraction (XRD), d-spacing is the distance between adjacent crystal planes. These planes are indexed using Miller indices (hkl), and each family of planes has a characteristic spacing. Because diffraction peak positions are directly tied to interplanar spacing, d-spacing is one of the most useful values when identifying phases, checking crystal quality, and estimating lattice parameters.

How this d spacing calculator works

This tool combines a Bragg law calculator and a simple interplanar spacing calculator for cubic systems. You can calculate:

  • d from measured 2θ and wavelength (most common XRD workflow)
  • 2θ from known d and wavelength (useful for planning scans)
  • d from a, h, k, l for cubic crystals

1) Bragg's Law mode

Bragg's law relates diffraction angle to lattice plane spacing:
nλ = 2d sinθ

Here, λ is the X-ray wavelength, θ is the Bragg angle, d is interplanar spacing, and n is diffraction order. Most powder XRD software reports peak position as , so this calculator automatically converts using θ = (2θ)/2.

2) Cubic crystal mode

For cubic structures, d-spacing from Miller indices is:
dhkl = a / √(h² + k² + l²)

This is especially useful for quick checks on materials like Si, NaCl, and many cubic metals where the lattice parameter is known.

Step-by-step usage

When you already measured a diffraction peak

  • Select Find d from 2θ (Bragg's Law).
  • Enter wavelength λ (for Cu Kα, often 1.5406 Å).
  • Enter your measured 2θ peak position.
  • Click Calculate to get d in Å and nm.

When you know d and want predicted 2θ

  • Select Find 2θ from d (Bragg's Law).
  • Enter λ, d, and order n.
  • Click Calculate to get the expected 2θ location.

When you have cubic lattice parameter and (hkl)

  • Select Find d from a, h, k, l (Cubic crystal).
  • Enter lattice parameter a and Miller indices.
  • Click Calculate for d-spacing and scattering vector magnitude q.

Practical tips for accurate results

  • Use a consistent wavelength value that matches your instrument setup.
  • Confirm whether your software peak list is in θ or 2θ (most are in 2θ).
  • For Bragg mode, keep the angle physically meaningful (0 < 2θ < 180).
  • Remember that higher order diffraction (n > 1) is possible but less common in routine powder analysis.
  • For cubic mode, h = k = l = 0 is invalid and has no physical plane spacing.

Worked examples

Example A: d from 2θ

Suppose λ = 1.5406 Å and a peak appears at 2θ = 30.0° with n = 1. Then θ = 15.0°, and d = 1.5406 / (2 sin15°) ≈ 2.976 Å.

Example B: 2θ from d

If λ = 1.5406 Å and d = 2.00 Å (n = 1), sinθ = λ/(2d) = 1.5406/4 = 0.38515. So θ ≈ 22.65°, and 2θ ≈ 45.30°.

Example C: cubic d from (111)

For a cubic crystal with a = 5.431 Å and (111), d = 5.431 / √3 ≈ 3.136 Å.

Why this matters in XRD analysis

A good d-spacing calculator saves time during peak indexing, phase matching, and quick quality checks. In practice, you often combine this with PDF/JCPDS database lookups, Rietveld refinement, and lattice-strain analysis. Still, accurate d values are the first step in nearly every diffraction workflow.

If you searched for an XRD calculator, Bragg law calculator, interplanar spacing calculator, or Miller indices d-spacing tool, this page is designed to cover those core needs in one place.

🔗 Related Calculators