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.
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
Paste 5–120 signed heights in sample order. Separate values with commas or whitespace. Leave Trace B blank for a single trace.
- Rq
- 0.48795 µm
- Peak-to-valley
- 1.238095 µm
Below entered Ra limit
Amplitude factor at limit · 1.05×
- Rq
- 1 µm
- Peak-to-valley
- 2 µm
Above entered Ra limit
Amplitude factor at limit · 0.5×
Profile and baseline explorer
- 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
| Sample | Raw height | Baseline | Residual |
|---|---|---|---|
| 1 | 1 µm | 1.333333 µm | -0.333333 µm |
| 2 | 3 µm | 2.380952 µm | 0.619048 µm |
| 3 | 3 µm | 3.428571 µm | -0.428571 µm |
| 4 | 5 µm | 4.47619 µm | 0.52381 µm |
| 5 | 5 µm | 5.52381 µm | -0.52381 µm |
| 6 | 7 µm | 6.571429 µm | 0.428571 µm |
| 7 | 7 µm | 7.619048 µm | -0.619048 µm |
| 8 | 9 µm | 8.666667 µm | 0.333333 µm |
Show selectable CSV
How to use this calculator
- Edit measured traces and leveling. Paste heights in sequence and enter declared evaluation lengths if known.
- Choose mean center or least-squares tilt. Confirm comparable capture settings before treating A and B as a matched comparison.
- Enter an optional Ra limit in the selected height unit. Compare the reported Ra and the uniform amplitude factor at that limit.
- Choose a trace and inspect a sample on the raw or adjusted plot. Check the corresponding values in the profile ledger.
- 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
Milling Speeds and Feeds Calculator
Calculate milling RPM, cutting speed and table feed from your cutting data. Inspect radial chip thinning and compare explicit machine ceilings.
Uncertainty Propagation Calculator
Propagate independent measurement uncertainties through sums, products and ratios. Compare contributions, expanded uncertainty and input improvement scenarios.
Linear Regression Calculator
Fit a least-squares line, inspect scatter and residual plots, and calculate Student-t confidence and prediction intervals. Paste paired data and export the full ledger.
