Grain Size Calculator (ASTM E112) – Using ImageJ Data


Grain Size Calculator (from ImageJ Data)

Calculate ASTM grain size based on measurements from metallographic images.


Total grains you counted within the measurement area in ImageJ.
Please enter a valid number greater than 0.


The size of the area where you counted the grains.
Please enter a valid area greater than 0.


The unit of your measurement area.


The magnification used to capture the image (e.g., 100, 500). Enter as a number (e.g. 200 for 200x).
Please enter a valid magnification greater than 0.


ASTM Grain Size Number (G)

Average Grain Area

Average Grain Diameter

Grains per mm² (at 1x)

Chart: ASTM Grain Size (G) vs. Number of Grains (N) for the specified area and magnification.

Deep Dive: How to Calculate Grain Size Using ImageJ

Understanding the microstructure of materials is fundamental to materials science and engineering. Grain size, in particular, is a critical parameter that profoundly influences mechanical properties like strength, toughness, and ductility. This article provides a comprehensive guide on how to calculate grain size using ImageJ, a powerful open-source image processing program widely used by researchers.

A) What is Grain Size Calculation?

Grain size calculation is the quantitative measurement of the average size of crystallites (grains) in a polycrystalline material. In metallurgy, this is often performed by analyzing a polished and etched micrograph image. The American Society for Testing and Materials (ASTM) has established a standard procedure, ASTM E112, which provides several methods for determining the average grain size. Our calculator uses the planimetric (or Jeffries’) method, which involves counting the number of grains within a known area.

Anyone involved in materials characterization, quality control, or research—such as metallurgists, materials engineers, and geologists—will find this calculation essential. A common misunderstanding is that a single grain size value tells the whole story; in reality, it’s an average, and the distribution of sizes is also important. For more details on this, see our introduction to metallography guide.

B) The Formula for ASTM Grain Size (G)

The planimetric method’s core formula relates the number of grains per unit area to the ASTM grain size number (G). The calculator automates the necessary conversions and logarithmic calculations.

The primary formula is:

G = -10.0 + 3.321928 * log10(NA)

Where NA is the number of grains per square millimeter at 1x magnification. It is calculated as:

NA = (N / A) * M2

  • N is the number of grains you counted.
  • A is the area you measured (converted to mm²).
  • M is the magnification.
Table of Variables
Variable Meaning Unit Typical Range
G ASTM Grain Size Number Unitless 1 – 14
N Number of Grains Count 50 – 1000
A Measurement Area µm², mm², in² Varies
M Magnification x 50x – 1000x
NA Number of grains per mm² at 1x grains/mm² Varies widely

C) Practical Examples

Example 1: Carbon Steel at 100x

An engineer analyzes a sample of annealed carbon steel. Using ImageJ on a micrograph taken at 100x magnification, they count 85 grains inside a circular area with a size of 0.2 mm².

  • Inputs: N = 85, A = 0.2 mm², M = 100x
  • Calculated ASTM Grain Size (G) ≈ 8.0
  • Calculated Average Grain Diameter ≈ 25.2 µm

This result is typical for this type of steel and indicates good mechanical properties. To learn about different analysis methods, check out our intercept method grain size calculator.

Example 2: Aluminum Alloy at 500x

A researcher is studying a rapidly cooled aluminum alloy. The micrograph is taken at 500x magnification. They count 210 grains in a rectangular area of 40,000 µm².

  • Inputs: N = 210, A = 40,000 µm² (which is 0.04 mm²), M = 500x
  • Calculated ASTM Grain Size (G) ≈ 13.0
  • Calculated Average Grain Diameter ≈ 4.9 µm

The much higher G value indicates a very fine grain structure, a direct result of the rapid cooling process, which typically leads to higher strength.

D) How to Use This Grain Size Calculator

This calculator simplifies the process of determining grain size from your ImageJ analysis. Here’s a step-by-step guide:

  1. Count Your Grains: Use the multi-point tool or particle analysis features in ImageJ to count the total number of whole grains inside a defined boundary (circle, square, etc.). Enter this into the “Number of Grains Counted (N)” field.
  2. Measure the Area: Use ImageJ’s measurement tools to find the area of the boundary you used for counting. Make sure your image scale is properly set in ImageJ before measuring.
  3. Enter Area and Unit: Input the measured area into the “Measurement Area (A)” field and select the correct unit (µm², mm², or in²) from the dropdown. The calculator will handle the conversion.
  4. Enter Magnification: Input the optical magnification used to acquire the image (e.g., 200 for 200x).
  5. Interpret the Results: The calculator instantly provides the ASTM Grain Size (G), the average area per grain, and an estimated average grain diameter (assuming a circular shape). The chart visualizes how the grain count affects the G value. A better understanding of advanced ImageJ macros can automate this entire process.

E) Key Factors That Affect Grain Size

Grain size is not an arbitrary number; it is controlled by the material’s composition and processing history. Knowing how to calculate grain size using ImageJ is only half the battle; understanding why it is what it is is crucial.

  • Solidification Rate: Faster cooling from a liquid state generally results in finer grains because more nuclei form simultaneously.
  • Annealing (Heat Treatment): Heating a material allows for recrystallization and grain growth. Higher temperatures or longer times lead to larger grains.
  • Deformation (Cold Work): Deforming a material at low temperatures increases dislocation density, providing more sites for new grains to nucleate during subsequent annealing, leading to a finer grain structure.
  • Alloying Elements: Certain elements can pin grain boundaries, inhibiting growth and resulting in a finer, more stable grain size at high temperatures.
  • Initial Casting Structure: The grain structure of the initial ingot or casting can influence the final grain size after subsequent processing steps.
  • Processing Method: Techniques like equal-channel angular pressing (ECAP) or friction stir processing are specifically designed to produce ultra-fine grain materials. Exploring phase analysis can provide further context on microstructural evolution.

F) Frequently Asked Questions (FAQ)

1. What is a “good” ASTM grain size number?
It depends entirely on the application. For applications requiring high strength and toughness at room temperature, a higher G number (finer grains, G > 7) is often desirable. For high-temperature creep resistance, a lower G number (coarser grains, G < 5) is often better.
2. Why is magnification so important?
The formula normalizes the grain count to a standard area (per mm² at 1x). Magnification is the scaling factor between what you see on the screen and the actual physical size of the sample. An incorrect magnification value will lead to a completely wrong G number. This is a critical aspect of learning how to calculate grain size using ImageJ correctly.
3. Can I use this calculator for non-metallic materials?
Yes. While developed for metals, the ASTM G scale can be applied to any material with a visible grain structure, such as ceramics or certain polymers, provided you can clearly distinguish the grains.
4. What if my grains are not round?
The ASTM G number and average area calculation are valid regardless of grain shape. The “Average Grain Diameter” is an estimation assuming a circular cross-section and should be used as a general guide, not an exact measurement for elongated grains.
5. How do I actually count grains in ImageJ?
Set the scale (Analyze > Set Scale). Draw a region of interest (ROI), e.g., a circle. Then, you can use the Multi-point tool to manually click and count each grain. For automated counting, you may need to use image thresholding (Image > Adjust > Threshold) and then particle analysis (Analyze > Analyze Particles). The latter is a key skill in any image analysis for materials science workflow.
6. Does the area have to be a circle?
No, the shape of the measurement area does not matter, as long as its size (area) is known accurately. A circle is often used because it has no corners, but a square or rectangle is also perfectly acceptable.
7. My result for G is negative. Is that an error?
A negative G value is possible and correct. It simply indicates very large grains. G=0 corresponds to about 32 grains per square inch at 100x magnification. Fewer grains than that (i.e., larger grains) will result in G values of -1, -2, etc.
8. What is the difference between the planimetric and intercept methods?
The planimetric method (used here) counts grains in an area. The intercept method involves drawing lines across the micrograph and counting how many grain boundaries are crossed. Both are valid ASTM E112 methods and should yield similar results. See our tool for the intercept method for a direct comparison.

Expand your knowledge of materials science and image analysis with our other specialized calculators and guides.

© 2026 Your Website. All rights reserved. For educational and informational purposes only.


Leave a Reply

Your email address will not be published. Required fields are marked *