Distance & Midpoint Calculator

Distance & Midpoint Calculator

Calculate the 2D Euclidean distance, midpoint coordinates, and line slope between two points $(x_1, y_1)$ and $(x_2, y_2)$.

Point 1 $(x_1, y_1)$
Point 2 $(x_2, y_2)$
Distance & Midpoint Results
Distance (d)
5
Midpoint Coordinates
(2.5, 4)
Line Slope (m)
1.333

At a Glance

Category
Geometry
Best For
Students and anyone measuring on a grid or map
Privacy
100% in your browser: nothing you enter is uploaded
Time Required
Under a minute
Cost
Free
Updated
November 2026

Quick Overview

What This Tool Does

Applies the distance formula, averages the coordinates for the midpoint and divides rise by run for the slope.

Who Should Use It

Geometry students, game developers, surveyors and designers.

When to Use It

Measuring between points on a grid or finding a segment's center.

Why It Is Useful

It combines three common geometry results in one entry.

Key Features & Capabilities

Distance

Straight-line distance by the Pythagorean theorem.

Midpoint

The point halfway between the two points.

Slope

Rise over run, or undefined for vertical lines.

How to Use This Tool

1

Enter the first point

Type the coordinates x₁ and y₁ of the first point. Tip: Use any real numbers.

2

Enter the second point

Type the coordinates x₂ and y₂ of the second point. Tip: The same units apply to both axes.

3

Read distance and midpoint

The distance is rounded to three decimals. Tip: The midpoint is an ordered pair.

4

Read the slope

Vertical lines show an undefined slope. Tip: A zero slope is horizontal.

Worked Real-World Example

Points (1, 2) and (4, 6)

Find the distance, midpoint and slope between (1, 2) and (4, 6).

Sample Inputs
x₁1
y₁2
x₂4
y₂6
Distance5 (midpoint (2.5, 4); slope 1.333)
Calculation Breakdown
Differences: 4 − 1 and 6 − 2 = dx = 3, dy = 4
Distance: √(3² + 4²) = 5
Midpoint: ((1 + 4) ÷ 2, (2 + 6) ÷ 2) = (2.5, 4)
Slope: 4 ÷ 3 = 1.333
The 3-4-5 right triangle gives an exact distance of 5.

How It Works (Math & Calculation Logic)

Distance d = √((x₂ − x₁)² + (y₂ − y₁)²). Midpoint = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2). Slope = (y₂ − y₁) ÷ (x₂ − x₁), undefined when x₁ = x₂.

Formula / Algorithmd = √((x₂ − x₁)² + (y₂ − y₁)²)
Variable & Logic Definitions
(x₁, y₁)First point - Coordinates
(x₂, y₂)Second point - Coordinates

How to Interpret Your Results

Typical Benchmarks

Distance is never negative.

Evaluating Your Output

The midpoint lies on the segment halfway between the points.

Recommended Next Action

Use the slope-intercept calculator to write the line equation.

Frequently Asked Questions

What is the distance formula?
d = √((x₂ − x₁)² + (y₂ − y₁)²).
What is the midpoint formula?
The average of the x-coordinates and of the y-coordinates.
What is the slope formula?
Change in y divided by change in x.
Why is the slope undefined?
A vertical line has zero change in x.
Does order of points matter?
Not for distance or midpoint; slope is the same either way.

Complementary QuickForma Utilities