How to Calculate Surface Roughness: Ra, Rz, and More

Surface roughness is calculated by measuring the tiny peaks and valleys on a surface, then applying a formula that averages those height variations into a single number. The most common parameter, Ra, is the arithmetic average of how far each point on the surface deviates from the mean line. A turned steel part might have an Ra of 1.6 micrometers, while a polished surface could be 0.1 micrometers or less. Understanding the different parameters and how they’re measured helps you choose the right calculation for your application.

Ra: The Most Common Roughness Calculation

Ra, or arithmetic average roughness, is the standard starting point. Imagine dragging a fine-tipped stylus across a surface and recording the height at thousands of equally spaced points. Some points sit above the average surface level (peaks), and some sit below it (valleys). Ra is the average of all those absolute deviations from the mean line.

In its continuous form, the formula integrates the absolute value of the surface height minus the mean height over the entire measurement length, then divides by that length. In practice, digital instruments collect discrete data points, so the calculation becomes simpler: add up the absolute value of each height reading minus the mean, then divide by the total number of points. If you measured 1,000 points and each deviation was, say, 0.5 micrometers on average, your Ra would be 0.5 µm.

Ra is popular because it’s easy to measure, widely understood, and included in nearly every surface finish specification. Its limitation is that it flattens out the details. Two surfaces with very different peak and valley patterns can share the same Ra value, which is why other parameters exist.

Rq, Rz, and Rt: What They Add

Rq (root mean square roughness) is calculated like Ra but squares each deviation before averaging, then takes the square root of the result. Squaring amplifies the effect of occasional tall peaks or deep valleys, making Rq more sensitive to extreme features than Ra. For a typical surface, Rq runs about 11% higher than Ra.

Rz captures the most dramatic features of a surface. In the ISO definition, Rz is calculated by dividing the evaluation length into sampling lengths, finding the height difference between the tallest peak and deepest valley in each one, and then averaging those values. This makes Rz useful when you need to know how severe the worst-case texture is, not just the average.

Rt is the simplest extreme-value parameter: it’s the total height from the absolute deepest valley to the absolute tallest peak across the entire measurement. No averaging is involved, so a single scratch or defect will dominate the Rt value. This makes it useful for detecting isolated surface damage that Ra and Rq would barely register.

Setting Up the Measurement Correctly

Getting an accurate roughness number depends heavily on how you set up the measurement, particularly the cutoff length and evaluation length. The cutoff length (called λc) acts as a filter that separates roughness from the broader waviness or form of the surface. Short-wavelength features pass through as roughness, while longer-wavelength undulations get filtered out.

Standard cutoff values are 0.08, 0.25, 0.8, 2.5, and 8 mm. The right choice depends on the spacing of the surface features created by the machining process. A good rule of thumb is to set the cutoff at roughly five times the average spacing between peaks. Finely ground surfaces with closely spaced features use shorter cutoffs, while rough-milled surfaces with widely spaced tool marks need longer ones. ISO 4288 provides lookup tables that match expected Ra ranges to recommended cutoff lengths.

The evaluation length is the total distance over which the roughness is actually calculated. Traditionally, it equals five sampling lengths (each sampling length equals one cutoff). So if your cutoff is 0.8 mm, the evaluation length is 4 mm, and the instrument needs a traversing length slightly longer than that to allow the filter to stabilize at the start and end of the trace.

Profile Measurements vs. Areal Measurements

Traditional roughness calculations are based on a single line traced across the surface. A stylus profilometer drags a diamond-tipped needle along that line, recording a 2D height profile. This is the most standardized and accessible method, with handheld devices available at relatively low cost. The drawback is that a single line may not represent the whole surface, especially on irregular or additively manufactured parts.

Areal (3D) measurements scan an entire patch of the surface instead of a single line. Optical instruments like laser scanning confocal microscopes and fringe projection systems build a full 3D map by stacking images at different focal depths or analyzing projected light patterns. Confocal microscopy achieves the highest resolution among common methods, though measurements take longer.

Areal parameters mirror their 2D counterparts but use “S” instead of “R.” Sa is the arithmetic mean height of the surface area (the 3D version of Ra), and Sq is the root mean square height (the 3D version of Rq). The formulas work the same way, just extended over two dimensions: instead of averaging deviations along a line, you average them across the entire measured area. This gives a statistically more representative picture of the surface, which matters for applications like sealing surfaces or biomedical implants where texture varies across directions.

How Filters Shape the Result

Raw measurement data contains everything from the nanometer-scale texture of the material to the overall curvature of the part. Filters separate these into layers. The short-wavelength filter (λs) removes noise and features finer than the instrument can reliably detect. The long-wavelength filter (λc) strips out waviness and form. What’s left between those two boundaries is the roughness profile, and that’s what gets fed into the Ra, Rq, or Rz calculation.

The order of these filtering operations matters. Under the older ISO 4287 standard, instruments first removed the nominal form (the intended shape of the part), then applied the λs filter. The newer ISO 21920 standard, published in December 2021, reverses that sequence: the λs filter is applied first, then form is removed. This change can produce slightly different results on the same surface, so it’s worth knowing which standard your instrument or specification references.

Changes Under ISO 21920

ISO 21920 replaced several long-standing standards, including ISO 4287, ISO 4288, ISO 13565, and ISO 1302, which had been in use for 25 years. Beyond the filter order change, there are a few practical differences worth knowing.

Under the old standard, roughness parameters were calculated separately within each of the five sampling lengths, then averaged. ISO 21920 calculates most parameters over the entire evaluation length in a single pass. The exception is peak-related parameters, which are still averaged over individual section lengths. This means your Ra value from a new instrument running ISO 21920 could differ slightly from one running ISO 4287, even on the same surface.

The default decision rule also changed. ISO 4287 used a “16% rule,” meaning a surface passed its specification if no more than 16% of measured values exceeded the limit. ISO 21920 defaults to the “max rule,” where the single calculated value must meet the specification. The 16% rule is still available but must be explicitly stated on drawings. To distinguish between the two standards on engineering drawings, ISO 21920 uses a modified surface finish symbol with a small added segment above the left side of the traditional checkmark shape.

Calculating Roughness From Raw Data

If you have a set of height measurements and want to calculate Ra yourself, the steps are straightforward. First, find the mean height of all your data points. Then subtract that mean from each individual height value and take the absolute value of each result. Finally, add up all those absolute deviations and divide by the number of data points.

For Rq, the process is similar but instead of taking the absolute value, you square each deviation, average the squared values, and take the square root. This is the same as a standard deviation calculation when the mean is already removed.

For Rz, divide your data into equal segments (typically five). In each segment, find the highest peak and deepest valley, measure the vertical distance between them, and average those five distances. Rt is even simpler: just find the single highest peak and single lowest valley across the entire dataset and subtract.

These calculations assume your data has already been filtered to remove form and waviness. If you’re working with raw profile data from a profilometer export, you’ll need to apply the appropriate Gaussian filter at your chosen cutoff wavelength before calculating parameters. Most instrument software and even spreadsheet plugins handle this automatically, but it’s the step most often missed when people try to compute roughness from raw coordinate data.