By Debmedia Technologies LLP · Kolkata, India · Updated
What Is It and When Do You Need It?
Two points are enough to describe a straight line and the segment between them. School geometry, graphics, maps and game programming all need the distance, the midpoint and the slope of such a segment.
Enter the coordinates of both points and read every result at once, including the angle and line equation.
How to Use This Tool
- Enter x1 and y1 for the first point.
- Enter x2 and y2 for the second point.
- Press Calculate.
- Read distance, midpoint, slope, angle and equation.
How the Calculation Works
Distance = √(Δx² + Δy²), where Δx = x2 − x1 and Δy = y2 − y1. Midpoint = average of the coordinates. Slope m = Δy ÷ Δx. The line equation is y = m x + c, with c = y1 − m x1. The angle with the x axis is the arctangent of the slope.
Worked Example
For (1, 2) and (7, 10): Δx = 6 and Δy = 8, so the distance is √(36 + 64) = 10. The midpoint is (4, 6). The slope is 8 ÷ 6 = 1.3333 and the line is y = 1.3333x + 0.6667. The angle is 53.13°.
Common Uses
- Coordinate geometry homework.
- Distances between positions in a drawing or game.
- Finding the centre of a line segment.
- Checking the gradient of a ramp or road.
Tips and Common Mistakes
- The order of the points does not change distance or slope.
- Equal x values mean a vertical line with undefined slope.
- Equal y values mean a horizontal line with slope 0.
Related Tools
Next, you may need the quadratic equation solver, Pythagorean theorem calculator, area calculator, triangle calculator.
Everything runs in your browser. Nothing you type is uploaded, stored or sent to any outside service.
Frequently Asked Questions
Disclaimer: results are calculated in your browser from the numbers you enter. Check important results before you rely on them for money, health, safety or legal decisions.