Line Segment Length Calculator
Calculate the length of a line segment from endpoint coordinates in 2D or 3D, with midpoint, coordinate differences, direction vector, and a 2D preview.
Line segment length from endpoints
English search intent for a line segment length calculator is the straight-line distance between two endpoints. Enter point A and point B, then use the distance formula to get the length of segment AB.
AB is the 2D segment length between endpoints A(x1, y1) and B(x2, y2).
Add the z-coordinate difference when both endpoints are in 3D.
What the calculator returns
- Segment length between endpoint A and endpoint B.
- Coordinate differences and the direction vector from A to B.
- The midpoint of the segment.
- Direction cosines or unit direction when the segment length is not zero.
- A 2D preview for plane-coordinate inputs.
Examples
| Point A | Point B | Length |
|---|---|---|
| (0, 0) | (3, 4) | 5 |
| (-2, 1) | (2, 4) | 5 |
| (0, 0, 0) | (1, 2, 2) | 3 |
| (2, 1, -1) | (5, 5, 3) | about 6.403 |
Frequently Asked Questions
Sources and References
- Line Segment Length CalculatorEasyMathTools
- Line Segment Length CalculatorLength Calculator
- DistanceWolfram MathWorld
- Midpoint CalculatorCalculatorSoup
Calculations are based on the listed reference sources. Links open in a new tab.
Related Tools
Calculate the Euclidean distance between two points in 2D or 3D coordinates, with midpoint, coordinate differences, Manhattan distance, Chebyshev distance, and angle.
Find the midpoint between two coordinate endpoints in 2D or 3D. You can also solve the reverse endpoint task when one endpoint and the midpoint are known.
Calculate the slope of a line from two points, an angle, or standard-form coefficients. Shows undefined vertical slope, angle, intercept, and perpendicular slope.
Find where two 2D lines intersect from standard form, slope-intercept form, or two points on each line. The calculator also detects parallel and coincident lines.