The guide
Bragg's law gives the angle, but the atoms decide which angles ever show up
Why a crystal reflects waves only at certain angles, why theta and two-theta are different numbers, and how the layout of the atoms switches whole peaks off.
- 28.442 degrees two-theta of the silicon (111) peak with copper K-alpha 1 light
- 4.07 2 d over lambda for that spacing, so the largest order is 4
- 7 peaks allowed for diamond cubic below 100 degrees two-theta
- 58.856 degrees second order of (111), where diamond cubic shows no peak
- 5.43102 angstrom silicon lattice parameter, 2022 CODATA value
Read the full guide Fold the guide
Shine a beam of X-rays on a crystal and most of it goes straight through or scatters weakly in every direction. At a few special angles, though, a strong beam comes out. Those angles are not random, and they carry the crystal’s dimensions in them.
Why only some angles reflect
William Henry Bragg and his son William Lawrence Bragg explained the effect in 1913. They pictured the crystal as a stack of parallel planes of atoms, each plane spaced a fixed distance d from the next, and each plane sending back a faint mirror-like copy of the beam. Whether those copies add up or cancel depends on a path difference. A ray that reflects off the second plane travels farther than one that reflects off the first, by 2 d sin theta. When that extra length is a whole number of wavelengths, every plane’s copy arrives in step and the result is a strong peak.
That is Bragg’s law: n times lambda equals 2 d sin theta. Here n is the order, a whole number, lambda is the wavelength, d is the plane spacing and theta is the glancing angle, measured from the planes. The Wikipedia page on the law notes that this differs from the optics habit of measuring from the surface normal.
The law was first worked out for X-rays, but it holds for any wave with a wavelength near the atomic spacing, including neutrons and electrons. Wavelengths near 150 picometres are the sweet spot, which is why X-ray tubes became the standard probe. Notice what the law does not say. It lists the angles where waves from different planes can agree. It says nothing about how bright each peak is, and nothing about whether a given set of planes scatters at all. That second question belongs to the atoms.
Theta, two-theta and the orders
A powder diffractometer reports two-theta, the angle between the beam coming in and the beam going out. Because the beam turns through theta to meet the planes and through theta again on leaving, two-theta is exactly twice the glancing angle.
Mixing the two up is the most common slip in a hand calculation. Take the strongest silicon peak, listed at a two-theta of 28.442 degrees. Feed that into Bragg’s law as if it were theta, and the spacing comes out as 1.617 angstrom instead of 3.136. Every later step inherits the error. The opposite slip drops the factor 2 in 2 d sin theta. Then sin theta comes out as 0.4913 instead of 0.2457, theta as 29.43 degrees and two-theta as 58.86 degrees, twice the true 28.44.
Both slips produce a believable number, which is why they survive. The calculator on this page keeps the two angles in separate boxes, labels each one, and lets you say which one you typed.
Bragg’s law has a built-in ceiling. Since sin theta cannot exceed 1, the order n can be at most 2 d divided by lambda. For silicon, with a lattice parameter of 5.431 angstrom, the spacing of the (111) planes is 5.431 divided by the square root of 3, which is 3.13559 angstrom. Use copper K-alpha 1 light at 1.5406 angstrom and the ratio 2 d over lambda is 4.07. So four orders exist. Their two-theta values are 28.442, 58.856, 94.951 and 158.626 degrees. Take a spacing of 1 angstrom with the same light and only order 1 fits.
Here is the useful part. The second order of (111) at 58.856 degrees lands on exactly the same angle as the first order of the (222) planes, which sit at half the spacing. A reflection from d at order n is the same as a first-order reflection from planes at d over n. So the table of orders and the table of planes are two views of one list. The (hkl) notation, the Miller indices, already folds higher orders into the plane label, which is why a pattern lists (222) and not “second order of (111)”.
What the atoms switch off
For a cubic crystal the spacing of the (hkl) planes is the lattice parameter a divided by the square root of the sum of h squared, k squared and l squared. Call that sum S. Many different planes share a value of S, and they land on the same peak.
Bragg’s law then predicts a peak at every value of S. The real pattern has gaps. Face-centred copper shows no peak at (100) or (110), and silicon shows none at (200). The reason lies in the unit cell.
Each atom in the cell scatters a wave, and the wave’s phase depends on where the atom sits. The structure factor adds those waves as a sum of exp(2 pi i (h x + k y + l z)) over the atom positions. If the waves cancel, the peak vanishes, and crystallographers call the missing family a systematic absence. Work through a body-centred cell, with atoms at the corner and at the centre. The two waves are in step when h plus k plus l is even and opposite when it is odd, so odd sums are absent. A face-centred cell, with four atoms per cell, keeps only reflections whose indices are all odd or all even.
The diamond structure, which silicon and germanium share, is a face-centred lattice with a second copy shifted by a quarter of the cell along each axis. That adds a rule on top: when all three indices are even, their sum must be a multiple of 4. The Wikipedia structure factor page gives the same results, and the page checks them for itself.
The check is blunt. For every index triple from minus 12 to 12 and for each of the four lattices, the tool compares the written rule with a direct sum over the atoms of the cell. The two agree on all 62,500 triples, and any disagreement would be listed by name.
Reading a powder pattern
Return to silicon, with a at 5.431 angstrom and the copper line at 1.5406 angstrom. In a diamond cubic pattern the allowed sums below 100 degrees are 3, 8, 11, 16, 19, 24 and 27. That is seven peaks, at two-theta values of 28.44, 47.30, 56.12, 69.13, 76.38, 88.03 and 94.95 degrees. Now look at what is missing. The sum 4 would give a peak near 32.96 degrees for a simple cubic crystal, and the sum 12, the (222) planes, would sit at 58.856 degrees. In diamond cubic neither shows up. The second order of (111) has the right angle but no peak, because the (222) structure factor is zero.
Switch the lattice to face-centred cubic at the same a and the list changes to 3, 4, 8, 11, 12, 16, 19, 20, 24 and 27, ten peaks. Switch to simple cubic and 25 sums appear below 100 degrees. The angles come from Bragg’s law, while the pattern of which ones survive comes from the structure.
That is the real use of a powder pattern. The peak positions give you the lattice parameter, and the ratios of the S values hint at the lattice type. Real measurements add a wrinkle: the K-alpha line is a close doublet, so a measured peak can show up as two close ones, one for each wavelength. The Wikipedia pages on characteristic X-rays and on powder diffraction list both lines.
Where the numbers come from, and what they leave out
The worked inputs are round numbers. The 2022 CODATA value for the silicon lattice parameter is 5.43102 angstrom, and the NIST X-ray transition table lists the copper K-alpha 1 line at 1.5405929 angstrom. With those figures the (111) peak sits at 28.4419 degrees, a few ten-thousandths of a degree from the rounded result. The page ships no table of materials. The presets are round example inputs, and anything real should be typed in with its source. All values were recomputed with a separate Python script at 50 digits, using the standard itertools module and the mpmath library, and the page’s own results match them.
Several things are left out on purpose. The tool handles cubic cells with one kind of atom on the sites. It does not give peak heights, line broadening, refraction corrections or non-cubic lattices, and it cannot name a material from a pattern. A compound such as potassium chloride, whose two ions have nearly the same number of electrons, looks like a simple cubic crystal of half the cell size, which shows how much the atoms matter.
The heavy parts run in a web worker so the page stays responsive, and numbers are formatted with the browser’s Intl.NumberFormat. Typed values stay in your browser. Nothing is uploaded, and the settings link carries only the numbers on the page.
Sources
Every source consulted for this guide. Links checked November 11, 2026.
- Bragg's law Wikipedia
- Structure factor Wikipedia
- Powder diffraction Wikipedia
- X-ray crystallography Wikipedia
- Diamond cubic Wikipedia
- Miller index Wikipedia
- Characteristic X-ray Wikipedia
- Laue equations Wikipedia
- CODATA Value: lattice parameter of silicon National Institute of Standards and Technology
- X-ray Transition Energies - Search Result National Institute of Standards and Technology
- itertools - Functions creating iterators for efficient looping Python Software Foundation
- Basic usage mpmath documentation
- Web Workers API MDN Web Docs (Mozilla)
- Intl.NumberFormat MDN Web Docs (Mozilla)