# How to measure d-spacing from HRTEM lattice fringes in ImageJ (profile and FFT)

> Measure d-spacing in ImageJ: a wide line across 10 fringes and Plot Profile (d = L ÷ N), or FFT spots read with Measure. Worked on Au (111), 0.235 nm.

Published 2026-11-06 by LabCanvas team. https://www.labcanvas.com/blog/d-spacing-hrtem-lattice-fringes

![ImageJ Plot Profile across the lattice fringes of a synthetic HRTEM gold nanocrystal: a 21-pixel-wide line across the {111} fringes and the profile with the dark minima numbered 0 to 10, giving d = 2.36 nm ÷ 10 = 0.236 nm](https://www.labcanvas.com/blog/imagej/d-spacing-hrtem-lattice-fringes-profile.webp)

To measure d-spacing from HRTEM lattice fringes in ImageJ, set the scale in nm, draw a line across the fringes at right angles to them, widen it to 10–20 pixels and run **Analyze › Plot Profile**: count N fringe spacings between two minima and divide their distance L by N. The other route is **Process › FFT › FFT** on a square region of the crystal: a point on each bright spot plus **Analyze › Measure** gives the spacing directly in the **R** column.

$$d = \frac{L}{N}$$

For example, \(2.36\ \mathrm{nm} \div 10 = 0.236\ \mathrm{nm}\) for gold (111).

Both methods are worked below on the same image, with the numbers ImageJ 1.54f gave, followed by the reference spacings worth knowing, and the calibration caveat that limits every HRTEM measurement.

## The sample: a gold nanocrystal with known fringes

The image is a **synthetic** HRTEM micrograph made for these guides: a faceted gold nanocrystal about 7 nm across on amorphous carbon, 1024 × 1024 pixels at **0.02 nm per pixel**. The crystal shows {111} fringes drawn at exactly **d = 0.235 nm**, plus a weaker second {111} set at 70.5°, as a gold crystal near a [110] zone axis would, with noise, a little strain and the carbon film's speckle. Because the true spacing is known, you can see how close each method gets.

A d-spacing (interplanar spacing) is the distance between neighbouring planes of atoms in a crystal. In an HRTEM image each set of planes seen edge-on shows as a set of parallel fringes, one fringe per plane, so the fringe period is d.

## Method 1: line profile across the fringes in ImageJ

1. **Check the scale.** Open the image and look at **Image › Properties…**: Pixel width should be your nm per pixel (0.02 nm here). TIFFs written by the microscope software or saved from Fiji usually carry it; if not, set it with **Analyze › Set Scale…** (see [setting the scale in ImageJ](https://www.labcanvas.com/blog/imagej-scale-bar-set-scale)).
2. **Zoom in** on a clean, thin area of the crystal where the fringes are sharp, away from the edges.
3. **Widen the line**: **Edit › Options › Line Width…**, 15 to 25 pixels (21 here). A wide line averages along the fringes and smooths out the noise; the width must stay inside the fringe area.
4. **Draw the line** with the Straight Line tool at right angles to the fringes, across ten or more of them. Hold the line along the fringe normal, not along the image axes: ImageJ shows the angle in the status bar while you drag.
5. **Analyze › Plot Profile** (Ctrl K). The plot shows one dip per dark fringe.
6. **Read the positions** of the first and the last minimum you count: click **List** in the plot window for the values, or hover over the plot. Count the spacings between them, not the fringes.
7. \(d = L/N\), with \(L\) the distance between the two minima and \(N\) the number of spacings.

![ImageJ Plot Profile across HRTEM lattice fringes with the dark minima numbered 0 to 10](https://www.labcanvas.com/blog/imagej/d-spacing-hrtem-lattice-fringes-profile.webp "ImageJ 1.54f on the synthetic Au nanocrystal: a 3 nm line, 21 pixels wide, across the {111} fringes. Plot Profile shows the dark fringes as minima; minimum 0 sits at 0.08 nm and minimum 10 at 2.44 nm, so d = 2.36 nm ÷ 10 = 0.236 nm true value 0.235 nm.")

On the sample, the line is 3.00 nm long (150 pixels) and crosses thirteen dark fringes. ImageJ placed the first eleven minima at 0.08, 0.32, 0.56, 0.78, 1.02, 1.26, 1.50, 1.72, 1.96, 2.20 and 2.44 nm: ten spacings over 2.36 nm, so **d = 0.236 nm**. Using all thirteen minima (0.08 to 2.90 nm, twelve spacings) gives \(2.82 \div 12 = \mathbf{0.235\ nm}\).

The positions come in steps of one pixel (0.02 nm), so each end is uncertain by about ±0.01 nm. Over ten spacings that is ±0.002 nm on d, under 1%. Over one spacing it would be ±0.02 nm, nearly 10%: this is why you never measure a single fringe.

### Why the line must cross the fringes at right angles

A line tilted by an angle θ from the fringe normal crosses the fringes at a longer interval, \(d / \cos\theta\), and a wide tilted line averages across fringes that are offset from each other, so the contrast drops. Both effects are easy to miss on a noisy image.

![Three ImageJ line profiles across the same lattice fringes: perpendicular, 30 degrees off with a thin line, and 30 degrees off with a wide line](https://www.labcanvas.com/blog/imagej/d-spacing-hrtem-lattice-fringes-angle.webp "ImageJ 1.54f on the same crystal. Left: across the fringes, 21 px wide, d = 0.235 nm. Middle: 30° off, 1 px wide: the fringes are still clear but d comes out at 0.270 nm, which is 0.235 ÷ cos 30°. Right: 30° off and 21 px wide: the fringes average away and there is nothing to count.")

To find the right direction, rotate the line until the profile has the deepest, most regular dips, or read the angle off the FFT (Method 2): the spot direction is the fringe normal.

## Method 2: the FFT power spectrum in ImageJ

A Fourier transform turns each set of fringes into a pair of bright spots, placed symmetrically about the centre. The distance from the centre gives the spacing and the direction gives the orientation of the planes, and every fringe in the selected area contributes, which makes the FFT more precise than a profile on a large, clean crystal and the only practical route when several sets of fringes cross.

1. **Select a square** on the crystal with the Rectangle tool. ImageJ's FFT works on a power-of-2 size (256, 512, 1024); other sizes are padded. Here: 512 × 512 pixels (10.24 nm) centred on the particle.
2. **Process › FFT › FFT**. A new window shows the power spectrum: a bright centre, a diffuse halo from the carbon film, and the lattice spots.
3. **Hover over a spot.** The status bar shows the polar coordinates of the cursor: **r** in pixels per cycle if the image has no scale, or in your unit per cycle (nm/c) if it has one, and the angle θ in degrees. That r is the spacing d, already converted: you do not need to take 1/r.
4. **Measure it**: put the Point tool on the centre of each spot (Shift-click to add points) and choose **Analyze › Measure** (Ctrl M). On an FFT window, ImageJ 1.54f adds an **R** column (the spacing, in the image's unit) and a **Theta** column (degrees) to the Results table.
5. **Average each pair.** The two spots of a pair should give the same R. In practice they differ by a pixel's worth, so report their mean.

![ImageJ FFT power spectrum of an HRTEM crystal with four spots marked and the Results table showing R and Theta](https://www.labcanvas.com/blog/imagej/d-spacing-hrtem-lattice-fringes-fft.webp "ImageJ 1.54f: Process › FFT › FFT on a 512 × 512 selection of the gold crystal, then a point on each of the four spots and Analyze › Measure. R is the spacing in nm: pair A 0.2377 and 0.2356 nm mean 0.2367 nm, pair B 0.2379 and 0.2325 nm mean 0.2352 nm. Theta differs by 70.9° between the pairs.")

On the sample, the strong pair (A) gives R = 0.2377 and 0.2356 nm, mean **0.2367 nm**; the weaker pair (B) gives 0.2379 and 0.2325 nm, mean **0.2352 nm**. The angle between the pairs is 158.2° − 87.3° = **70.9°**, close to the 70.5° between two {111} planes of a cubic crystal seen along [110]: two spacings and the angle between them are what you need to index a pattern and name the zone axis.

### How precise is the FFT?

The spectrum is sampled in pixels, and the spot position is read to the nearest pixel. With an FFT of size \(N\) (pixels) and a pixel size \(p\), a spot \(r\) pixels from the centre means

$$d = \frac{N \times p}{r}$$

Here \(N \times p = 512 \times 0.02 = 10.24\ \mathrm{nm}\) and the gold spots sit about 43.5 pixels out, so one pixel of \(r\) changes \(d\) by about 0.005 nm, about 2%. That is why the four spots read 0.2325 to 0.2379 nm. Ways to do better:

- **Average the pair**, and every equivalent pair you can see.
- **Use a larger FFT** (1024 instead of 512) when the crystal fills it: the spots move twice as far out and each pixel is worth half as much.
- **Measure spot to spot**: a straight line from one spot to its partner is \(2r\) long, so \(d = 2 \times N \times p / D\). Across pair A, \(D = 86.5\) pixels and \(d = 2 \times 10.24 \div 86.5 = 0.2367\ \mathrm{nm}\). It also cancels any one-pixel offset in where the centre is taken.
- **Cross-check with the profile.** If the two methods disagree by more than a few percent, look for a tilted line, a wrong scale or a spot from another crystal.

The same menu has the tools to clean the picture rather than measure it: **Process › FFT › Bandpass Filter…**, and **Inverse FFT**, which rebuilds the image from a power spectrum you have edited (fill everything except one pair of spots with black and only that set of fringes remains). Both are in plain ImageJ 1.x.

## Profile or FFT: which method to use

| | Line profile | FFT power spectrum |
|---|---|---|
| Best for | One clear set of fringes, small or curved crystals | Large clean crystals, crossing fringe sets, zone-axis images |
| What you read | Positions of minima on a plot | R and Theta of each spot |
| Precision on the sample | 0.235–0.236 nm over 10–12 spacings | 0.2352–0.2367 nm per pair |
| Gives the angle between planes | No (one direction at a time) | Yes |
| Main error | Line not at right angles; too few fringes counted | Pixel sampling of the spectrum; spots from neighbouring crystals |
| Works on | Any scaled image | A square region, padded to 256, 512 or 1024 pixels |

## Reference d-spacings for common materials

Compare your value with a database entry for the phase you expect, not with a number from another paper. For cubic crystals, \(d = a / \sqrt{h^2 + k^2 + l^2}\), where \(a\) is the lattice parameter.

| Material, planes | d (nm) | Basis |
|---|---|---|
| Au (111) | 0.2355 | PDF 04-0784: d(111) = 2.3556 Å, a = 4.080 Å |
| Au (200) | 0.204 | \(a/2\) from the same card |
| Ag (111) | 0.236 | a = 4.086 Å, \(a/\sqrt{3}\) |
| Pt (111) | 0.227 | a = 3.924 Å, \(a/\sqrt{3}\) |
| Si (111) | 0.3135 | a = 5.431 Å, \(a/\sqrt{3}\) |
| ZnO (002), wurtzite | 0.260 | the value HRTEM papers index as (002) |
| TiO2 anatase (101) | 0.35 | the value HRTEM papers index as anatase (101) |
| Graphite (002) | 0.335 | the interlayer spacing of graphite |

Two lessons from the table. Gold (111) and silver (111) differ by less than 1%, less than a careful HRTEM measurement can resolve, so a fringe spacing alone does not identify a metal: use EDX or the diffraction pattern as well. And always check your phase against its ICDD (PDF) card or a crystallographic database entry, because lattice parameters shift with temperature, composition and strain.

## The calibration caveat

Every d-spacing is only as good as the pixel size. The magnification of a TEM drifts with the objective lens current, the specimen height and the focus, and the nominal pixel size written by the software can be off by a few percent. A 2% error in nm per pixel is a 2% error in d, larger than the difference between many candidate phases.

- **Calibrate at the same magnification and settings** with a crystal of known spacing (a gold or silicon standard, or a crystal in your own sample whose phase is certain). If the standard reads 0.240 nm instead of 0.2355 nm, multiply your pixel size by \(0.2355 \div 0.240\).
- **Keep the specimen at the eucentric height** and image near focus; changing the objective lens to focus changes the magnification.
- **Never measure on a screenshot or a resized figure.** Work on the original file with its pixel size (see [why a JPEG loses the scale](https://www.labcanvas.com/blog/imagej-scale-bar-set-scale)).
- **Report three significant figures at most** (0.236 nm) unless you calibrated against a standard in the same session.

## Pitfalls

- **The line is not at right angles to the fringes.** \(d\) comes out as \(d/\cos\theta\): 16% too large at 30°. Rotate the line until the dips are deepest, or take the direction from the FFT.
- **Counting fringes instead of spacings.** Eleven minima are ten spacings. Number them on the plot, as in the screenshot.
- **Too few fringes.** One spacing is a 10% measurement; ten are 1%.
- **The wrong scale.** Check **Image › Properties…** before anything else, and calibrate against a standard at the same magnification.
- **Delocalisation and thickness fringes.** Near edges and in thick areas, fringes can be displaced or come from interference, not the lattice. Measure in the thin interior of the crystal.
- **Spots from another crystal in the FFT.** Keep the selection on one crystal; a spot that does not have its partner opposite the centre is not a lattice reflection.
- **Overlapping spacings.** Different phases can share a spacing within error. Use two spacings and their angle, or a diffraction pattern, before naming a phase.

## Reporting it

A methods sentence to copy, with the parts in brackets filled in:

> Lattice spacings were measured in [Fiji (ImageJ 1.54f)] on HRTEM images calibrated at [0.020] nm per pixel [against an Au standard]. For each crystal, a [21]-pixel-wide line profile was taken perpendicular to the fringes across [10] spacings (d = L/N), and the result was checked against the power spectrum (Process › FFT › FFT; spot positions read with Analyze › Measure, mean of each Friedel pair). Values are mean ± SD of [n] crystals.

Give d with the planes you assign it to, the number of crystals measured and the calibration used; show the HRTEM image with the fringes and a scale bar, ideally with its FFT as an inset. Cite ImageJ (Schneider et al. 2012).

For more on calibrated electron micrographs, see [grain size from SEM](https://www.labcanvas.com/blog/grain-size-analysis-sem) and [nanoparticle size distributions from TEM](https://www.labcanvas.com/blog/nanoparticle-size-distribution-tem).

## An easier way: the profile method in LabCanvas

LabCanvas Image Analysis runs the profile method in the browser, with nothing to install and no plugins. It opens the TIFF with its nm scale.

1. In the **Measure** tab, open **Profile** and draw a **Line** across the fringes, at right angles to them.
2. Set **Line width** (9 pixels here) to average along the fringes.
3. Read the length of the line, count the spacings on the plot and divide; **Add to results** lists every point if you want the minima exactly.

![Lattice spacing from HRTEM in LabCanvas Image Analysis](https://www.labcanvas.com/analysis-examples/em-hrtem.webp "Lattice spacing from HRTEM: Profile across the lattice fringes of a gold nanocrystal: 10 spacings over 2.353 nm, so d = 0.235 nm, the Au 111 spacing.")

On the same synthetic gold crystal, a line from the middle of one dark fringe to the middle of the tenth beyond it measures 2.353 nm: 10 spacings, so **d = 0.235 nm**. ImageJ gave 0.236 nm over ten spacings and 0.235 nm over twelve.

Why it is a good choice for a quick d-spacing:

- Nothing to install: it runs in the browser on any computer or tablet, and a TIFF with its pixel size opens calibrated.
- ImageJ's own idea and names: a wide line, Plot Profile becomes **Measure › Profile**, and the same \(d = L/N\).
- An image check flags clipped pixels and JPEG compression before you measure.
- The profile goes straight to **Graphs** or into a figure with the scale bar, free with a LabCanvas account (CSV download is part of Pro); every measurement is checked in [more than 4,000 automated tests](https://www.labcanvas.com/image-analysis-validation).

It has no FFT power spectrum (the FFT bandpass filter in **Process › Enhance** cleans the image, it does not measure), and it does not read .dm3, .dm4, .emd or .ser files: open those in Fiji or the microscope software and save a TIFF. [Open Image Analysis](https://www.labcanvas.com/analysis.html).

ImageJ and Fiji are independent open-source projects; LabCanvas is not affiliated with them.

## References

- Schneider CA, Rasband WS, Eliceiri KW (2012). NIH Image to ImageJ: 25 years of image analysis. *Nature Methods* 9, 671–675. [doi:10.1038/nmeth.2089](https://doi.org/10.1038/nmeth.2089)

## Frequently asked questions

### How do I measure d-spacing in ImageJ?

Set the scale (nm per pixel), draw a straight line across the fringes, perpendicular to them, widen it to 10–20 pixels with Edit › Options › Line Width, and choose Analyze › Plot Profile. Count \(N\) fringe spacings between two minima and divide their distance \(L\) by \(N\): \(d = L/N\). On our gold sample, 10 spacings span 2.36 nm, so d = 0.236 nm.

### How do I get d-spacing from the FFT in ImageJ?

Select a square of 256, 512 or 1024 pixels on the crystal and run Process › FFT › FFT. Put the cursor on a bright spot: the status bar shows r in nm per cycle, which is the spacing d itself. With a point selection on the spot, Analyze › Measure adds R (the spacing) and Theta columns. Measure both spots of a pair and average them.

### Is the r value in the ImageJ FFT window d or 1/d?

It is d. ImageJ converts the spot position to a period, in pixels per cycle when the image has no scale and in your unit per cycle (for example nm/c) when it does. You do not need to invert it. If you measure a distance by hand in pixels instead, \(d = N \times \text{pixel size} / r\), where \(N\) is the FFT size and \(r\) the distance from the centre in pixels.

### Why should I measure several fringes instead of one?

Because the error of a line end is fixed, about one pixel, whatever the length. Over one fringe of 12 pixels that is 8% of d; over ten fringes it is 0.8%. Always measure across as many fringes as the crystal shows and divide.

### What is the d-spacing of gold (111)?

About 0.2355 nm (2.355 Å). The powder diffraction card for gold, PDF 04-0784, gives d(111) = 2.3556 Å from a lattice parameter of 4.080 Å, and \(d = a/\sqrt{3}\) for (111). Silver (111) is 0.236 nm, so fringe spacing alone cannot tell gold from silver.

### Can I measure lattice spacing without ImageJ?

For the profile method, yes: [LabCanvas Image Analysis](/analysis.html) runs in the browser, and a wide line in Measure › Profile gives the same plot to count. It has no FFT power spectrum, so for the FFT method ImageJ, Fiji or the microscope software is still the tool.

## Related links

- [How to set the scale in ImageJ](https://www.labcanvas.com/blog/imagej-scale-bar-set-scale): Calibrate first: nm per pixel from the file or a standard
- [Nanoparticle size distribution from TEM](https://www.labcanvas.com/blog/nanoparticle-size-distribution-tem): Count and size the particles on the same grids
- [Grain size analysis in ImageJ (SEM, ASTM E112)](https://www.labcanvas.com/blog/grain-size-analysis-sem): Another materials measurement, step by step
- [XRD Scherrer calculator](https://www.labcanvas.com/tools/xrd-scherrer-calculator): Crystallite size from the diffraction peak width
- [Microscope pixel size calculator](https://www.labcanvas.com/tools/microscope-pixel-size-calculator): Pixel size from the field width or the camera
- [Image Analysis: the complete guide](https://www.labcanvas.com/blog/image-analysis-complete-guide): Every tool and setting in the app
