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
Results
Straightness Deviation
0.0210mm
Peak-to-valley deviation from the least squares reference line
0.000mm/mm
Angular coefficient of the least squares fitted line
0.0001mm/mm
Straightness deviation normalized by measured length
4#
Point index (1-based) with maximum positive deviation from reference line
Visualizations
Results Overview
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.
Alternative Form
Variables
| Symbol | Name | Unit | Description |
|---|---|---|---|
| Δ_i | Deviation at Point i | mm | Measured deviation at each inspection point along the surface |
| L | Measured Length | mm | Total length of the straightness measurement |
| m | Slope | mm/mm | Angular coefficient from linear regression fit |
| T | Tolerance | mm | Allowable 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.
Record deviation measurements at uniform intervals along the surface length.
Fit a least squares reference line and calculate deviations.
Compute straightness deviation and compare to tolerance.
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
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
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
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
Assumptions
This calculator makes the following assumptions to provide estimates:
Limitations
Be aware of these limitations when using this calculator:
Frequently Asked Questions
Answers to common questions about this calculator.
What is straightness in GD&T?
How is straightness measured?
Does straightness require a datum?
What is the difference between surface and axis straightness?
What is a typical straightness tolerance?
What is the least squares method for straightness?
How do temperature changes affect straightness?
What causes straightness errors in machining?
How do I specify straightness on a drawing?
What is the ISO standard for straightness?
Can straightness be applied to a cylindrical feature?
How do I check shaft straightness?
What is the straightness of a typical linear guide rail?
How does straightness affect bearing life?
What is the straightness-to-length ratio?
How do I improve straightness of a machined part?
What is the reversal method for straightness?
How is straightness different from flatness?
Can straightness be specified with material condition?
What equipment is needed for precision straightness measurement?
How does part length affect straightness?
What is the effect of vibration on straightness measurement?
How do I convert surface straightness to axis straightness?
What is the role of straightness in fluid sealing?
How does material hardness affect straightness?
What is the straightness of a typical shaft?
How do I document straightness measurement results?
What is the difference between straightness and parallelism?
How does surface roughness affect straightness measurement?
What are the common straightness evaluation methods?
Can straightness be measured on a curved surface?
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
Was This Calculator Helpful?
Page Information
2026-07-30
2.0.0
- ASME Y14.5-2018 - Dimensioning and Tolerancing
- ISO 1101:2017 - Geometrical Product Specifications (GPS)
- ISO 12780-1:2011 - Straightness Measurement
- ISO 2768-1:1989 - General Tolerances
- ISO 8015:2011 - Fundamental Principles of GPS
- ISO 5459:2011 - Datums and Datum Systems
- NIST - Straightness Measurement Guidelines
- ASPE - American Society for Precision Engineering
Free to use for educational and professional purposes.