2026-07-30 8 min

Straightness Calculator

Calculate straightness deviation, slope, and maximum deviation point for shafts, guide rails, machine ways, and linear motion surfaces per ASME Y14.5 and ISO 12780.

Calculator

Unit System
Measured Point Deviations (mm, comma-separated)
Measured Length (mm)
Straightness Tolerance (mm)

Results

Optimal

Straightness Deviation

0.0210mm

Peak-to-valley deviation from the least squares reference line

Slope

0.000mm/mm

Angular coefficient of the least squares fitted line

Deviation per Unit Length

0.0001mm/mm

Straightness deviation normalized by measured length

Max Deviation at Point

4#

Point index (1-based) with maximum positive deviation from reference line

Visualizations

Results Overview

0mmStraightness Deviation
0mmDeviation per Unit Length
4mmMax Deviation at Point

Formula

Straightness deviation is the peak-to-valley distance of measured points from the least squares reference line. The slope is determined by linear regression through the measurement points.

StraightnessDeviation = max(Δ_i) - min(Δ_i)

Alternative Form

Slope = [nΣ(xy) - ΣxΣy] / [nΣ(x²) - (Σx)²]

Variables

SymbolNameUnitDescription
Δ_iDeviation at Point immMeasured deviation at each inspection point along the surface
LMeasured LengthmmTotal length of the straightness measurement
mSlopemm/mmAngular coefficient from linear regression fit
TTolerancemmAllowable straightness deviation per standard

Explanation

Straightness is a form tolerance that controls the variation of a line element from a straight reference line. The tolerance zone is the area between two parallel lines separated by the tolerance value. For shaft straightness, the tolerance zone is a cylinder. Linear regression (least squares) provides a statistically robust reference line for deviation calculation.

Derivation

The straightness deviation is derived from the residuals of a linear regression: Δ_i = y_i - (mx_i + b). The peak-to-valley (max - min residual) gives the straightness error. The slope m represents the overall angular deviation of the measured surface from horizontal.

Step-by-Step Calculation

Follow each step to understand how the result is calculated from your inputs.

Step 1

Record deviation measurements at uniform intervals along the surface length.

Points Measured:7 pts
Measurement Length:300 mm
Spacing:50.0 mm
Result: Data: 0.01, 0.02, 0.015, 0.03, 0.01, 0.025, 0.018 mm
Step 2

Fit a least squares reference line and calculate deviations.

Δ_i = y_i - (mx_i + b)
Slope (m):0.000 mm/mm
R²:0.0901
Intermediate: Reference Line: Least squares line: y = 2.071e-5x + 0.0152 (R² = 0.0901)
Result: Max positive deviation at point #4
Step 3

Compute straightness deviation and compare to tolerance.

StraightnessDeviation = Δ_max - Δ_min
Max Deviation:0.0210 mm
Tolerance:0.0500 mm
Intermediate: Deviation = max(Δ) - min(Δ)
Result: Straightness Deviation: 0.0210 mm — Pass
Final Answer
0.0210

Worked Examples

See how the calculator works with different scenarios.

Scenario

A 300 mm linear guide rail is inspected at 7 points: [0.010, 0.020, 0.015, 0.030, 0.010, 0.025, 0.018] mm. Tolerance: 0.05 mm.

Inputs

Points:7 measurements over 300 mm
Tolerance:0.05 mm

Calculation

Linear regression: slope = 0.000023 mm/mm, R² = 0.12 Residuals range: -0.008 to 0.010 mm Straightness = 0.018 mm

Result

Straightness: 0.0184 mm, Status: Pass (36.8% of tolerance)

Interpretation

The guide rail meets the 0.05 mm straightness specification with significant margin.

Understanding Your Result

Your Result: Straightness Deviation: 0.0210 mm

Typical range: Precision ground shafts: 0.005-0.020 mm/m. Linear guide rails: 0.010-0.050 mm/m. Hydraulic cylinder rods: 0.10-0.30 mm/m. Machine tool ways: 0.010-0.025 mm/m. General machined surfaces: 0.05-0.20 mm/m.

What This Means

Straightness controls how much a line element deviates from a straight reference line. A straightness of 0.05 mm means all points on the line lie within 0.05 mm of the ideal straight line.

Why It Matters

Straightness is critical for shafts rotating in bearings, guide rails for linear motion, machine tool ways, and any sliding or sealing surface where linear motion must be precise. Poor straightness causes binding, uneven wear, vibration, and leakage.

Professional Interpretation

Straightness can be applied to a surface line element (flat surface) or to an axis (cylindrical part). Per ASME Y14.5, straightness on a cylinder axis controls the derived median line. The least squares reference line method is widely used for data analysis.

Recommendations

  • •Use a straightedge and feeler gauges for quick shop-floor checks
  • •Employ laser interferometry for high-precision straightness measurement
  • •Maintain uniform measurement point spacing along the length
  • •Check straightness in multiple orientations (horizontal and vertical)
  • •Consider thermal effects on long parts
  • •Document the measurement direction and support conditions

Educational Content

Introduction

Straightness is a fundamental form tolerance in GD&T that controls the variation of a line element from a geometrically straight line. It can be applied to surface elements or to the axis of cylindrical features.

Concept Explanation

Straightness defines the condition where every point on a line element lies within a specified tolerance zone. For surface straightness, the zone is two parallel lines. For shaft straightness, the zone is a cylinder. Unlike other GD&T controls, straightness does not require a datum reference.

Applications

▸Rotating shafts and spindles
▸Linear guide rails and slides
▸Machine tool ways and beds
▸Hydraulic and pneumatic cylinder rods
▸Structural beams and extrusions
▸Sealing surfaces for linear motion
▸Conveyor and transport rails

Benefits

  • •Ensures smooth linear motion without binding
  • •Reduces seal wear in hydraulic/pneumatic systems
  • •Minimizes vibration in rotating machinery
  • •Improves bearing life and load distribution
  • •Enables precise positioning in automation
  • •Facilitates proper assembly and alignment

Limitations

  • •Surface straightness does not control the entire surface (use flatness for areas)
  • •Axis straightness requires derivation from surface measurements
  • •Measurement accuracy depends on reference straightedge calibration
  • •Does not control orientation relative to any datum

Best Practices

  • •Use a calibrated straightedge longer than the measured surface
  • •Apply consistent measurement force with indicator probes
  • •Support parts at the same points as in their operating condition
  • •Account for sag in long horizontal measurements
  • •Use reversal techniques to eliminate reference errors
  • •Average multiple measurement runs for improved accuracy
  • •Document temperature conditions with measurement results

Common Misconceptions

Myth: Straightness and flatness are the same.
Truth: Straightness controls a single line element; flatness controls an entire surface area. Flatness requires straightness in all directions.
Myth: A straightedge check is sufficient for straightness.
Truth: A straightedge check gives a quick comparison but does not provide quantitative deviation values. Dial indicators or CMM are needed for measurement.
Myth: Straightness applies only to flat surfaces.
Truth: Straightness can also apply to the axis of cylindrical features (shaft straightness), controlling the bow or curvature of the axis line.

Practical Tips

  • •Always zero the indicator at the start of measurement
  • •Use V-blocks for consistent shaft positioning during straightness checks
  • •Increase measurement point density near suspected high-deviation areas
  • •For precision work, allow parts to temperature-stabilize for 24 hours
  • •Use the reversal method to eliminate straightedge errors
  • •Record the direction of measurement relative to part datum features
  • •Consider both horizontal and vertical straightness for critical applications

Common Mistakes

Measuring straightness without proper part support
Support the part at the same points as in service or use three-point support to avoid sag-induced errors.
Using too few measurement points
Use minimum 5 points for short parts (<500 mm) and 10+ points for longer parts (>1000 mm).
Ignoring the straightedge calibration error
Use a certified straightedge (Grade 0 or 00) and apply reversal techniques to eliminate systematic errors.
Confusing surface straightness with axis straightness
Surface straightness measures a line on the surface. Axis straightness requires measuring multiple circumferential points and deriving the median line.

Assumptions

This calculator makes the following assumptions to provide estimates:

Even Point Spacing: The calculation assumes measurement points are at uniform intervals along the measured length.
Linear Deformation Model: The least squares fit assumes the underlying deviation follows a linear trend, which may not capture complex bow shapes.
Rigid Body: The part is assumed rigid; gravitational sag and measurement forces are not modeled.
Stationary Temperature: Measurements are assumed at stable temperature conditions without thermal gradients.

Limitations

Be aware of these limitations when using this calculator:

Linear Fit Only: The least squares linear fit may not capture S-curves or complex non-linear deviations. Higher-order fitting methods may be needed.
No Filtering: Surface roughness and waviness are not separated from form error. Appropriate filtering should be applied.
2D Analysis: The calculator performs 1D (line) analysis. For surfaces, multiple line traces in different directions are needed.
No Material Condition Modifiers: Material condition modifiers (MMC, LMC) cannot be applied to straightness per ASME Y14.5 standards.

Frequently Asked Questions

Answers to common questions about this calculator.

What is straightness in GD&T?
Straightness is a form tolerance that controls how much a line element deviates from a geometrically straight line. The tolerance zone consists of two parallel lines (surface) or a cylinder (axis).
How is straightness measured?
Using a straightedge and feeler gauges for quick checks, or a surface plate with dial indicator for measurements. CMM and laser interferometers provide higher accuracy.
Does straightness require a datum?
No, straightness is a form tolerance and does not require a datum reference. It controls only the line element itself.
What is the difference between surface and axis straightness?
Surface straightness applies to a line on a flat surface. Axis straightness (also called shaft straightness) applies to the derived median line of a cylindrical feature.
What is a typical straightness tolerance?
Typical values: precision ground shafts 0.005-0.020 mm/m, guide rails 0.01-0.05 mm/m, general machining 0.05-0.20 mm/m.
What is the least squares method for straightness?
The least squares method finds the straight line that minimizes the sum of squared distances from measured points. Deviations are then calculated from this reference line.
How do temperature changes affect straightness?
Thermal expansion can cause apparent straightness errors or real deformation. Precision measurements should be at 20°C standard temperature.
What causes straightness errors in machining?
Machine tool geometry errors, thermal distortion, clamping forces, tool deflection, and material stress relief.
How do I specify straightness on a drawing?
Use the straightness GD&T symbol (horizontal dash) followed by the tolerance in a feature control frame. No datum reference needed.
What is the ISO standard for straightness?
ISO 1101 defines straightness tolerancing. ISO 12780 specifies straightness measurement procedures.
Can straightness be applied to a cylindrical feature?
Yes. Shaft straightness (axis straightness) controls the straightness of the derived median line of a cylinder.
How do I check shaft straightness?
Rotate the shaft in V-blocks and measure the runout at multiple positions along the length. The straightness is derived from the runout measurements.
What is the straightness of a typical linear guide rail?
Precision linear guide rails achieve 0.010-0.025 mm/m. Standard rails achieve 0.05-0.10 mm/m.
How does straightness affect bearing life?
Poor straightness causes uneven load distribution, edge loading, and premature bearing failure. Industry rule of thumb: 0.01 mm straightness error reduces bearing life by 10-15%.
What is the straightness-to-length ratio?
Typical ratios: precision 1:100,000, general 1:10,000, coarse 1:1,000. A 1 m shaft with 0.01 mm straightness has a ratio of 1:100,000.
How do I improve straightness of a machined part?
Use stress-relieved material, optimize clamping, allow thermal stabilization, use sequential rough/finish passes, and consider straightening operations.
What is the reversal method for straightness?
The reversal method involves measuring the part, rotating the straightedge 180°, and measuring again. Averaging both measurements eliminates the straightedge error.
How is straightness different from flatness?
Straightness controls a one-dimensional line element. Flatness controls a two-dimensional surface. A surface that is flat in all directions is also straight in any direction.
Can straightness be specified with material condition?
No, straightness is a form tolerance and cannot be specified with material condition modifiers (MMC, LMC) per ASME Y14.5.
What equipment is needed for precision straightness measurement?
Laser interferometer (Renishaw XL-80), electronic levels (Wyler), autocollimator, or precision straightedge with indicator.
How does part length affect straightness?
Longer parts are more challenging to produce straight due to sag, thermal effects, and machine geometry errors. Straightness tolerance should be specified per unit length.
What is the effect of vibration on straightness measurement?
Vibration introduces noise and reduces repeatability. Precision measurements require vibration isolation.
How do I convert surface straightness to axis straightness?
Axis straightness is derived from multiple circumferential readings at each axial position. The average runout half-range approximates axis straightness.
What is the role of straightness in fluid sealing?
Hydraulic cylinder rod straightness is critical for seal life. Typical requirement: 0.10-0.30 mm/m for hydraulic applications.
How does material hardness affect straightness?
Harder materials maintain straightness better under load but are harder to machine straight initially. Stress relief is critical for both hard and soft materials.
What is the straightness of a typical shaft?
Cold-drawn shafting: 0.10-0.30 mm/m. Ground shafting: 0.02-0.05 mm/m. Precision ground: 0.005-0.015 mm/m.
How do I document straightness measurement results?
Record date, temperature, measurement equipment, point positions, deviation values, reference method, and the calculated straightness deviation.
What is the difference between straightness and parallelism?
Straightness controls form of a single line. Parallelism controls orientation of a line or surface relative to a datum. A line can be straight but not parallel.
How does surface roughness affect straightness measurement?
Roughness adds noise to deviation readings. Use appropriate probe tip size and filtering (e.g., ISO 11562 Gaussian filter).
What are the common straightness evaluation methods?
1) Minimum zone method (two parallel lines at minimum separation). 2) Least squares line. 3) End-point line. 4) Min-max deviation from a fixed reference.
Can straightness be measured on a curved surface?
No, straightness by definition applies to nominally straight line elements. For curved surfaces, use profile tolerances.

Related Calculators

Explore more calculators related to this topic.

Related Guides

Deepen your understanding with these educational resources.

Glossary

Technical terms used in mortgage calculations explained in plain language.

ASME Y14.5
American Society of Mechanical Engineers standard for dimensioning and tolerancing.
Autocollimator
An optical instrument for measuring small angular deviations, used in straightness measurement of long surfaces.
Axis Straightness
Straightness applied to the derived median line of a cylindrical feature, controlling its bow or curvature.
CMM
Coordinate Measuring Machine - a device for precision measurement of physical geometries.
Derived Median Line
The line formed by the centers of cross-sectional elements of a feature. Used for axis straightness.
Electronic Level
A precision inclination sensor used for straightness measurement of large surfaces (e.g., Wyler level).
Feeler Gauge
Thin strips of precise thickness used to measure gaps between a straightedge and the measured surface.
Form Tolerance
A GD&T tolerance controlling shape (flatness, straightness, roundness, cylindricity).
Interferometer
An optical device using laser interference for ultra-precise distance and straightness measurement.
ISO 1101
International standard for geometrical tolerancing of form, orientation, location, and run-out.
ISO 12780
International standard for straightness measurement and evaluation.
Least Squares Line
The line minimizing the sum of squared deviations from measured points to the line.
Minimum Zone
The ISO-recommended method using two parallel lines at minimum separation to contain all measured points.
Reversal Method
A measurement technique that eliminates reference errors by averaging measurements taken at 0° and 180° orientations.
Straightedge
A precision straight reference bar used for comparative straightness measurement.
Surface Straightness
Straightness applied to a line element on a flat surface.
Tolerance Zone
The region within which all points must lie. For straightness, two parallel lines or a cylinder.
V-Block
A support fixture with a V-shaped groove for holding cylindrical parts during measurement.
MZC
Minimum Zone Circle - a reference method for roundness; analogous to minimum zone for straightness.
LSC
Least Squares Circle (or Line) - a reference method minimizing squared deviations.

Authoritative References

Trusted sources and standards referenced by this calculator.

Applicable Standards

ASME Y14.5-2018ISO 1101:2017ISO 12780-1:2011ISO 2768-1:1989ISO 8015:2011ISO 5459:2011

Was This Calculator Helpful?

Page Information

Last Updated:

2026-07-30

Version:

2.0.0

License:

Free to use for educational and professional purposes.