Coordinate Geometry Calculator: Distance, Midpoint, Slope, Equation of a Line and Perpendicular Bisector
Everything about the line through two points, with the working.
Engineering student calculators
Free textbook calculators with every step shown, so you can check your own working. Pick one, type in your numbers and see the formulas worked out. Or switch to Ask a question for an explained answer. No account needed.
Calculated from standard textbook formulas, with every step shown. The formulas are fixed, so the working does not need checking: what matters is the numbers you type in. Use these calculators only if you are competent to choose the inputs (loads, material strength, dimensions, supports) and check your units and assumptions. For learning and checking your own working: design and sign-off are for a qualified engineer. Drafting Central does not store the numbers you type.
How this calculator works
Enter the x and y of the two points.
Optionally enter a third point to get its distance from the line and the area of the triangle.
The calculator gives the distance, midpoint, slope, angle, three forms of the equation, the perpendicular bisector, and the third point results.
Formulas used
- d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
- M = \left(\frac{x_1 + x_2}{2},\frac{y_1 + y_2}{2}\right)
- m = \frac{y_2 - y_1}{x_2 - x_1}
- D = \frac{|Ax_0 + By_0 - C|}{\sqrt{A^2 + B^2}}
Worked example
With the default numbers in the calculator above:
- Distance between the points: 10.00
- Midpoint: (4.00, 6.00)
- Slope (gradient): 1.33
- Equation in slope-intercept form: y = 1.3333 x + 0.66667
- Equation in point-slope form: y - 2 = 1.3333 (x - 1)
- Equation in standard form Ax + By = C: 8 x - 6 y = -4
- Angle the line makes with the x axis: 53.13 degrees
- Perpendicular bisector (through the midpoint, at right angles): y = -0.75 x + 9
- Perpendicular distance from the third point to the line: 1.80
- Area of the triangle of the three points: 9.00
Change the numbers in the calculator to see the full working, every step, for your own case.
Common questions
How do I find the distance between two points?
Use Pythagoras: the square root of the difference in x squared plus the difference in y squared.
How do I find the equation of a line through two points?
Find the slope m, then use y - y1 = m (x - x1) and tidy it to y = mx + c.
What is the slope of a vertical line?
It is undefined, because the change in x is zero. The equation is x = a constant.
What is the slope of a perpendicular line?
The negative reciprocal. If one slope is 2 the perpendicular slope is -1/2.
Related calculators
Got a question about this? Ask an engineering question and get a plain-language answer with references.
Further reading: Any school mathematics text (coordinate geometry).
Need a calculator we do not have?
Embed this calculator on your own page
Copy this code into your page. The calculator runs inside the frame and links back to Drafting Central.
Need this drawn, designed or checked?
Drafting Central is a mechanical engineering and drafting business working with customers across Australia and around the world. A calculator gives you the numbers; we can turn them into drawings and designs.
Need help with a real project?
Talk to Drafting Central →