How to use the distance and midpoint calculator
Find the distance and midpoint between two points. Enter x₁, y₁, x₂, y₂ in the fields above; the distance, midpoint x, midpoint y, slope are computed instantly and plotted on the chart so you can see how the answer changes.
Formula
Variables
- x1 — x₁
- y1 — y₁
- x2 — x₂
- y2 — y₂
Worked example
With x₁ = 1, y₁ = 2, x₂ = 7, y₂ = 10, the calculator gives distance ≈ 10; midpoint x ≈ 4; midpoint y ≈ 6; slope ≈ 1.333333.
Frequently asked questions
What is the formula for the distance and midpoint calculation?
Distance = hypot(x2-x1,y2-y1). Midpoint x = (x1+x2) / 2. Midpoint y = (y1+y2) / 2. Slope = (y2-y1) / (x2-x1). Here x1 is x₁, y1 is y₁, x2 is x₂, y2 is y₂.
What inputs do I need for the distance and midpoint calculator (2d) calculator?
You need x₁, y₁, x₂, y₂. Each field is pre-filled with a typical example so you can see how the result responds as you edit the numbers.
How do I use this calculator?
Type values into the input fields. Results and the chart update instantly. Use Reset to restore the example values, Copy results to paste them elsewhere, or Share to copy a link that preserves your inputs.
Is the result exact?
Calculations use standard formulas and double-precision arithmetic, then display about seven significant figures. Real-world measurements carry uncertainty, so treat results as estimates unless your inputs are exact.