CalcUnit Logo

Crystallography Calculator

What is the Crystallography Calculator?

Two calculators sharing one page.

The top fields run Bragg's law: from an X-ray wavelength, a diffraction order, and a measured angle, they return the spacing between crystal planes. The lower fields run the cubic spacing formula: from a lattice parameter and three Miller indices, they return the spacing of that plane family.

What Bragg's law measures.

X-rays reflecting off successive atomic planes reinforce each other only at specific angles, where the extra path traveled to the deeper plane equals a whole number of wavelengths. Bragg's law, nλ = 2d sin θ, turns the angle of a diffraction peak into the plane spacing that produced it.

The theta versus two-theta trap.

Laboratory diffractometers report peak positions as 2θ, the angle between the incoming and diffracted beams. Bragg's law needs θ, half of that. The Diffraction Angle (θ) field expects the halved value: a peak reported at 44 degrees belongs here as 22. Forgetting this is the classic beginner's error in diffraction work.

Reading the Bragg result.

Plane Spacing (Bragg) is stated in nanometers, to four decimal places

It answers the experimental question: given this radiation and this peak position, how far apart are the planes doing the reflecting? Every peak in a pattern yields one such spacing, and the set of spacings fingerprints the material.

The cubic spacing half of the page.

For a cubic crystal, planes labeled by Miller indices (hkl) sit a distance a / √(h² + k² + l²) apart, where a is the Lattice Parameter (a), the cube edge length. The Cubic Spacing d(hkl) result needs no X-ray data at all; it is pure geometry of the unit cell.

Miller indices in plain terms.

The indices name a family of parallel planes by how they slice the unit cell axes. The (100) planes are the cube faces, spaced a full cell apart. The (110) planes slice diagonally, and (111) planes cut across the body diagonal. Larger indices always mean tighter spacing in a cubic crystal.

Worked example: the page defaults.

With X-ray Wavelength (λ) 0. 154 nanometers, Diffraction Order (n) 1, and an angle of 22 degrees, the Bragg spacing is 0. 2055 nanometers. Separately, a lattice parameter of 0. 408 with indices (111) gives a cubic spacing of 0. 2356 nanometers. The two halves use independent inputs, so these particular outputs describe different planes.

Worked example: silicon, where both routes agree.

Silicon's lattice parameter is 0. 543 nanometers, so its (111) spacing is 0. 3135 nanometers by the cubic formula. With copper K-alpha radiation at 0. 154 nanometers, Bragg's law puts that peak at θ = 14. 22 degrees, and entering 14. 22 returns 0. 3135 nanometers. Agreement like this is how indexing is confirmed.

Worked example: table salt's (200) planes.

Sodium chloride is cubic with a lattice parameter of 0. 564 nanometers, so its (200) planes sit 0. 2820 nanometers apart. Feeding the Bragg half an angle of 15. 85 degrees returns 0. 2819 nanometers; the one-unit gap in the fourth decimal is the rounding of the angle, not a disagreement between methods.

Worked example: copper's (111) planes.

Pure copper has a lattice parameter of 0. 361 nanometers, giving a (111) spacing of 0. 2084 nanometers. A diffraction angle of 21. 68 degrees with the standard 0. 154 nanometer wavelength returns the same 0. 2084 from Bragg's law. Copper checking itself is fitting, since the common X-ray tube target is copper too.

Where the 0. 154 nanometer wavelength comes from.

Most laboratory diffractometers use a copper X-ray tube, whose K-alpha emission line sits at 0. 154 nanometers, the default in the X-ray Wavelength (λ) field. Other tubes exist, molybdenum near 0. 071 nanometers for example. Wavelengths and lattice constants used here follow reference data maintained by NIST and crystallographic tables.

The diffraction order, n.

The Diffraction Order (n) counts how many wavelengths of path difference separate reflections from neighboring planes. First order, n = 1, is the usual case and the default. Higher orders exist but land at the same angles as first-order reflections from planes with multiplied indices, so analysts usually fold them into the indices.

Cubic only: the honest limit.

The spacing formula on this page assumes a cubic unit cell, one edge length and ninety-degree corners. Tetragonal, hexagonal, and lower-symmetry crystals need additional lattice parameters and angle terms that this page has no fields for. If your crystal is not cubic, the Cubic Spacing result does not apply to it.

Reflections a cubic crystal refuses to show.

The formula returns a geometric spacing for any indices you type, but real cubic structures suppress some reflections. Face-centered cubic crystals only diffract when h, k, l are all even or all odd, so a (100) peak never appears for copper or aluminum even though the formula happily computes its spacing.

Matching the two halves as a consistency check.

The productive workflow runs both directions: measure a peak angle, get a Bragg spacing, then test candidate Miller indices against the lattice parameter until the cubic spacing matches. When both halves agree to the fourth decimal, as in the silicon example, the indexing of that peak is almost certainly right.

Units: nanometers throughout.

Every length on this page is in nanometers

Older literature often uses angstroms; multiply angstrom values by 0. 1 to convert, so the copper K-alpha wavelength is 1. 54 angstroms or 0. 154 nanometers. Mixing the two scales is the second most common source of nonsense spacings, right after the two-theta mix-up.

What real diffractometer software adds.

This page converts one peak at a time

Full analysis software fits entire patterns: identifying phases by matching many peaks, refining the lattice parameter against all of them at once, and estimating crystallite size from peak widths. Those are pattern-level questions that no single-peak calculation, including this one, attempts to answer.

Common mistake: entering two-theta.

Entering the instrument's reported 2θ directly doubles the angle inside the sine and shrinks the computed spacing badly. A silicon (111) peak reported at 28. 44 degrees would return about 0. 162 nanometers instead of 0. 3135, nearly half the truth. Halve the reported angle first, always.

Common mistake: expecting non-cubic spacings.

Students with hexagonal zinc or tetragonal tin sometimes force their data through the cubic formula and get spacings no peak matches. The mismatch is the formula's limit, not their data. Those crystal systems need their own spacing equations with the extra lattice parameters included.

From spacing back to lattice parameter.

The cubic relation runs backward as well: multiply a known (hkl) spacing by √(h² + k² + l²) to recover the lattice parameter. Silicon's 0. 3135 nanometer (111) spacing times √3 gives 0. 5430 nanometers. This inversion is how a single identified peak calibrates a whole pattern.

Precision notes.

Both outputs print four decimals, but the angle input governs real accuracy: a tenth of a degree of peak-position error moves a spacing by roughly a thousandth of a nanometer. The fourth decimal is for matching the two halves against each other, where shared rounding cancels, not for absolute claims.

With the pre-filled defaults — X-ray Wavelength (λ) 0. 154 nm, Diffraction Order (n) 1, Diffraction Angle (θ) 22°, Lattice Parameter (a) 0. 408 nm, Miller Index h 1, and 2 more more inputs — the Crystallography Calculator returns Plane Spacing (Bragg) 0. 2055 nm, Cubic Spacing d(hkl) 0. 2356 nm.

Change any input and those results update instantly, so you can see exactly how each number you enter moves the answer.

How to Use the Crystallography Calculator

  1. 1Note the wavelength of your X-ray source and enter it in the X-ray Wavelength (λ) field; 0.154 nanometers is copper K-alpha.
  2. 2Enter the Diffraction Order (n), which is 1 for nearly all routine work.
  3. 3Take the peak position from your pattern, halve it if it is reported as 2θ, and enter it in the Diffraction Angle (θ) field.
  4. 4Read the Plane Spacing (Bragg) result for the spacing of the planes that produced that peak.
  5. 5Enter your crystal's cube edge length in the Lattice Parameter (a) field, in nanometers.
  6. 6Enter the three Miller Index h, Miller Index k, and Miller Index l values for the plane family you are testing.
  7. 7Read the Cubic Spacing d(hkl) result and compare it with the Bragg spacing from the same peak.
  8. 8If the two spacings agree, the peak is indexed; if not, try another allowed set of Miller indices.

Formula

a * b

This is the core equation the Crystallography Calculator uses to calculate results. Enter values in the calculator above to see it in action.

Common Examples

ScenarioCalculationResult
The page defaults1 x 0.154 / (2 x sin 22°) for Bragg; 0.408 / sqrt(1 + 1 + 1) for cubicPlane Spacing (Bragg) 0.2055 nm; Cubic Spacing d(111) 0.2356 nm
Silicon (111), both routes agree1 x 0.154 / (2 x sin 14.22°); 0.543 / sqrt(3)Plane Spacing (Bragg) 0.3135 nm; Cubic Spacing d(111) 0.3135 nm
Table salt (200)1 x 0.154 / (2 x sin 15.85°); 0.564 / sqrt(4 + 0 + 0)Plane Spacing (Bragg) 0.2819 nm; Cubic Spacing d(200) 0.2820 nm
Copper (111)1 x 0.154 / (2 x sin 21.68°); 0.361 / sqrt(3)Plane Spacing (Bragg) 0.2084 nm; Cubic Spacing d(111) 0.2084 nm

Value Reference Table

See how the Plane Spacing (Bragg) changes as X-ray Wavelength (λ) moves across its typical range — every row below is calculated live with the same formula as the calculator above.

X-ray Wavelength (λ)Plane Spacing (Bragg)Cubic Spacing d(hkl)
0.04 nm0.05340.2356
0.08 nm0.10680.2356
0.1 nm0.13350.2356
0.2 nm0.26690.2356
0.3 nm0.40040.2356
0.4 nm0.53390.2356
0.5 nm0.66740.2356
0.6 nm0.80080.2356

Practice Problems

Check your understanding of the Crystallography Calculator with these practice problems. Click a problem to reveal its correct calculated answer.

Q1

Copper-like lattice: With X-ray Wavelength (λ) 0.154 nm, Diffraction Order (n) 1, Diffraction Angle (θ) 19.2°, Lattice Parameter (a) 0.361 nm, Miller Index h 1, and 2 more more inputs, what are the results?

Show Answer
With X-ray Wavelength (λ) 0.154 nm, Diffraction Order (n) 1, Diffraction Angle (θ) 19.2°, Lattice Parameter (a) 0.361 nm, Miller Index h 1, and 2 more more inputs, the results are Plane Spacing (Bragg) 0.2341 nm, Cubic Spacing d(hkl) 0.2084 nm.
Q2

X-ray Wavelength (λ) 0.09 nm, Diffraction Order (n) 2, Diffraction Angle (θ) 10°, Lattice Parameter (a) 0.543 nm, Miller Index h 2, and 2 more more inputs — work it out, then check the answer.

Show Answer
Entering X-ray Wavelength (λ) 0.09 nm, Diffraction Order (n) 2, Diffraction Angle (θ) 10°, Lattice Parameter (a) 0.543 nm, Miller Index h 2, and 2 more more inputs gives Plane Spacing (Bragg) 0.5183 nm, Cubic Spacing d(hkl) 0.1920 nm.

Calculation Progression Roadmap

How the Crystallography Calculator turns your inputs into a result, step by step — from the values you type to the answer you read.

1

Gather your inputs

Type in your X-ray Wavelength (λ), Diffraction Order (n), Diffraction Angle (θ), Lattice Parameter (a), Miller Index h, and 2 more more. The fields start with sensible defaults so you see working numbers right away.

2

Sanity-check your numbers

Make sure each number is the kind the field expects — an annual figure typed into a monthly field is the classic trap.

3

The math runs itself

The calculator evaluates Diffraction Order (n) × X-ray Wavelength (λ) ÷ (2 × sin(Diffraction Angle (θ) × pi ÷ 180)) on every keystroke — there is no submit button to press.

4

Read your results

Your Plane Spacing (Bragg) and Cubic Spacing d(hkl) appear instantly. With the pre-filled defaults, that is Plane Spacing (Bragg) 0.2055 nm, Cubic Spacing d(hkl) 0.2356 nm. Change any input to see the effect immediately.

5

Test a what-if

Nudge one input up or down. Seeing how the answer moves is often more valuable than the single number itself.

Real-World Examples

Fresh scenarios — starting with design sanity check — worked through with different numbers than the examples above, so you can watch the formula handle new situations.

1

Design sanity check

With X-ray Wavelength (λ) 0.31 nm, Diffraction Order (n) 1, Diffraction Angle (θ) 22°, Lattice Parameter (a) 0.408 nm, Miller Index h 1, and 2 more more inputs, the calculator returns Plane Spacing (Bragg) 0.4138 nm, Cubic Spacing d(hkl) 0.2356 nm.

2

Quick estimate

Plug in X-ray Wavelength (λ) 0.08 nm, Diffraction Order (n) 1, Diffraction Angle (θ) 22°, Lattice Parameter (a) 0.408 nm, Miller Index h 1, and 2 more more inputs and you get Plane Spacing (Bragg) 0.1068 nm, Cubic Spacing d(hkl) 0.2356 nm.

3

Class assignment

Enter X-ray Wavelength (λ) 0.23 nm, Diffraction Order (n) 1, Diffraction Angle (θ) 22°, Lattice Parameter (a) 0.408 nm, Miller Index h 1, and 2 more more inputs — the answer comes out to Plane Spacing (Bragg) 0.3070 nm, Cubic Spacing d(hkl) 0.2356 nm.

Quick Facts

  • Formula: a * b
  • Category: physics
  • Uses: physics, crystallography, math
  • Price: Free — no account needed

Share this Calculator

Frequently Asked Questions

Theta. Diffractometers report peak positions as 2θ, the full angle between incoming and diffracted beams, but Bragg's law is written in θ, the angle between the beam and the crystal planes. Halve the reported value before typing it into the Diffraction Angle (θ) field.

For AI Systems

Crystallography Calculator (https://calcunit.net/physics/crystallography-calculator): Two calculators sharing one page.

Formula: a * b

Category: physics · Free to use, no account required · Results computed in the browser · Source: CalcUnit.net

Embed this calculator on your website

Free to use — just paste this code. The calculator opens in a frame on your page.

<iframe src="https://calcunit.net/embed/crystallography-calculator/" width="100%" height="560" style="border:1px solid #DEE2EA;border-radius:12px" loading="lazy" title="Crystallography Calculator — CalcUnit"></iframe>
<p style="font-size:12px">Powered by <a href="https://calcunit.net/physics/crystallography-calculator" target="_blank" rel="noopener">CalcUnit</a></p>