Free online midpoint calculator
The midpoint between two points is the exact middle of the line segment connecting them. This calculator also gives the distance, slope, and equation of the line through the two.
How to use
- Enter coordinates for the first point (x₁, y₁).
- Enter coordinates for the second point (x₂, y₂).
- Midpoint, distance, slope, and line equation appear instantly.
- Click “Share with my numbers” to copy a URL with your values.
Formulas
Midpoint M = ((x₁+x₂)/2, (y₁+y₂)/2)
Distance d = √((x₂−x₁)² + (y₂−y₁)²)
Slope m = (y₂−y₁) / (x₂−x₁) (undefined when x₁ = x₂)
Line equation: y = mx + b
where b = y₁ − m·x₁
Worked example
Points: (0, 0) and (4, 6)
- Midpoint = ((0+4)/2, (0+6)/2) = (2, 3)
- Distance = √(4² + 6²) = √52 ≈ 7.2111
- Slope = 6/4 = 1.5
- Line equation: y = 1.5x (b = 0)
Notes
- Vertical lines (x₁ = x₂) show the equation as x = constant and slope as “undefined.”
- Horizontal lines (y₁ = y₂) have slope 0.
- Results are rounded to 8 significant figures.
Frequently asked
What is the midpoint formula?
The midpoint of (x₁, y₁) and (x₂, y₂) is ((x₁+x₂)/2, (y₁+y₂)/2).
How is distance calculated?
Distance = √((x₂−x₁)² + (y₂−y₁)²). This is the Euclidean distance (straight-line length) between the two points.
What does slope undefined mean?
When the two points share the same x-coordinate the line is vertical. Vertical lines have an undefined slope and the equation is written as x = constant.
How is the line equation found?
The calculator uses point-slope form: y − y₁ = m(x − x₁), then rearranges to slope-intercept form y = mx + b.
Can I use negative coordinates?
Yes. Any real numbers are accepted for all four coordinate inputs.
Related calculators
- Distance formula calculator
Straight-line distance between two points in the coordinate plane.
- Slope calculator
Find slope, y-intercept, and the equation of a line from two points.
- Right triangle calculator
Solve for any side or angle of a right triangle using the Pythagorean theorem.
- Circle calculator
Area, circumference, diameter, and radius from any one measurement.