Surface Finish & Roughness Trace Calculator

Paste measured surface height samples into a worksheet and compare two profiles using the same baseline method. See how a mean line and a fitted tilt change the remaining deviations. Inspect each sample and estimate the uniform amplitude change that would reach an entered arithmetic-average limit.

Surface metrology

Compare measured surface roughness

Calculate Ra, Rq and peak-to-valley from measured heights, then inspect the fitted baseline and the effect of an entered limit.

Trace A Ra is lower by 0.52381 µm.

Edit measured traces and leveling
Baseline method

Paste 5–120 signed heights in sample order. Separate values with commas or whitespace. Leave Trace B blank for a single trace.

Trace A
Trace B
Trace A Ra
0.47619 µm
8 samples · 4 mm declared
Rq
0.48795 µm
Peak-to-valley
1.238095 µm

Below entered Ra limit

Amplitude factor at limit · 1.05×

Trace B Ra
1 µm
8 samples · 4 mm declared
Rq
1 µm
Peak-to-valley
2 µm

Above entered Ra limit

Amplitude factor at limit · 0.5×

Profile and baseline explorer

Trace to inspect
Plot view
Height in µm by sample position. Evaluation length comes from the entered record.
Plot range-0.619048 µm to 0.619048 µm
Sample 1Sample 8
Adjusted residual
Raw height
1 µm
Baseline
1.333333 µm
Residual
-0.333333 µm

Surface profile ledger and export

Trace A baseline change per sample · 1.047619 µm. CSV includes both entered traces.

Show sample ledger
Trace A raw height, baseline and residual
SampleRaw heightBaselineResidual
11 µm1.333333 µm-0.333333 µm
23 µm2.380952 µm0.619048 µm
33 µm3.428571 µm-0.428571 µm
45 µm4.47619 µm0.52381 µm
55 µm5.52381 µm-0.52381 µm
67 µm6.571429 µm0.428571 µm
77 µm7.619048 µm-0.619048 µm
89 µm8.666667 µm0.333333 µm
Download surface trace CSV
Show selectable CSV

How to use this calculator

  1. Edit measured traces and leveling. Paste heights in sequence and enter declared evaluation lengths if known.
  2. Choose mean center or least-squares tilt. Confirm comparable capture settings before treating A and B as a matched comparison.
  3. Enter an optional Ra limit in the selected height unit. Compare the reported Ra and the uniform amplitude factor at that limit.
  4. Choose a trace and inspect a sample on the raw or adjusted plot. Check the corresponding values in the profile ledger.
  5. Download the CSV for the exact baseline, residuals and statistics.

The Formula

The mathematical logic powering this calculation is:

Paste 5 to 120 signed, evenly sampled heights per trace in original order. The plotted coordinate is sequence position. Enter the instrument's declared evaluation length separately if available. The worksheet does not infer evaluation length, lateral spacing or instrument cutoff from a point count. Leave Trace B blank for a single-trace analysis. Full comparison needs equal point counts, equal positive declared evaluation lengths, and your confirmation that the settings and capture conditions are comparable.

Let i = 0 through N − 1 denote sample index and let hᵢ be the entered height. Mean center uses the arithmetic mean as the reference line. Least-squares tilt mode fits a line bᵢ = mean(h) + slope × (i − mean(i)). The slope equals the sum of (i − mean(i))(hᵢ − mean(h)) divided by the sum of (i − mean(i))². Each residual is zᵢ = hᵢ − bᵢ. The slope is height per sample. Matching point counts are not evidence of physical spacing.

Ra is sum of |zᵢ| divided by N. Rq is the square root of sum of zᵢ² divided by N. Peak-to-valley is max(zᵢ) − min(zᵢ) across the entered trace. Peak-to-valley describes this trace's extremes. A standards-defined Rz uses its own procedure, and the worksheet performs no conversion to Rz. The worksheet is a discrete analysis of entered heights; acquisition, filtering bandwidth, evaluation length, instrument calibration and formal acceptance require the applicable measurement method.

For a nonnegative entered Ra limit L and nonzero Ra, a uniform amplitude multiplier s = L/Ra puts the residuals at the modeled limit. Applying s to every residual also multiplies Rq and peak-to-valley by s. If s is below one, the relative amplitude reduction is 1 − s. If s is above one, it is headroom in a uniform scaling model. This is a rescaled trace preview, with no claim that machining settings or process changes scale every deviation. A flat adjusted trace has zero Ra at every finite multiplier, so the inverse is not unique. At an entered limit of zero, a nonflat trace has a multiplier of zero.

Supported heights are within ±100,000 µm equivalent. The Ra limit is 0–100,000 µm equivalent, and a declared evaluation length is positive through 1,000 mm. Plain decimals support up to six places, signed fractions keep exact values, and commas or whitespace separate heights. Empty comma positions, exponent notation and malformed values are invalid. One microinch is exactly 0.0254 micrometres. Unit changes preserve dimensions and may expose reduced fractions. Ra, squared Rq and peak-to-valley use exact arithmetic. Rq and chart positions use approximate rendering. CSV retains exact numbers and the full adjusted trace.

Worked Example

If you input:

  • Trace A: 1, 3, 3, 5, 5, 7, 7, 9 µm
  • Trace B: 5, 7, 5, 7, 7, 5, 7, 5 µm
  • Leveling and span: Least-squares tilt. Both declared evaluation lengths are 4 mm.
  • Entered Ra limit: 0.5 µm

Result:

Trace A has Ra 0.47619 µm when tilt is removed, and Trace B has Ra 1 µm. Trace B would reach the entered limit at a uniform amplitude multiplier of 0.5. With mean-centering alone, Trace A has Ra 2 µm because that mode leaves slope in the profile.

Frequently Asked Questions

Why can the smoother trace change when I choose a different baseline?

A mean-centered trace still includes any linear tilt. The fitted-line baseline removes that tilt before measuring deviations, so a sloped trace can have lower residual roughness.

Can peak-to-valley be used as an Rz estimate?

The worksheet's peak-to-valley result is the difference between its residual extremes. Calculate Rz under the applicable instrument procedure and evaluation convention.

How do I know whether two traces are comparable?

Use captures with comparable measurement settings, grid and declared evaluation length. Compare under the same baseline method, and record relevant cutoff and instrument details with the original observations.

What does the amplitude factor change?

It scales each residual in the preview by the same multiplier. The exact arithmetic describes this model's output under a uniform amplitude change.

Can I paste profile heights when the gauge length is missing?

Yes. The individual profiles and statistics still calculate from the submitted points. Add the declared evaluation lengths before comparing the traces.

Similar Calculators