Coordinate Grid Calculator

Enter two points, (x₁,y₁) and (x₂,y₂), to calculate the distance between them, their midpoint, the slope of the line through them, and that line's equation.

Quick Facts

Formulas used
Distance, midpoint & slope from two points
Distance = √((x₂−x₁)² + (y₂−y₁)²); Midpoint = ((x₁+x₂)/2, (y₁+y₂)/2); Slope = (y₂−y₁)/(x₂−x₁), undefined when x₂ = x₁.

Your Results

Calculated
Distance
-
Straight-line distance between the points
Midpoint
-
Point exactly halfway between them
Slope (m)
-
Rise over run
Line equation
-
Slope-intercept form

Ready

Enter two points and press Calculate to find the distance, midpoint, slope, and line equation.

About Coordinate Grid

Coordinate geometry bridges algebra and geometry by assigning numerical addresses (coordinates) to points in space. This makes geometric relationships calculable using algebraic tools.

Core formulas

  • Distance between two points: √((x₂−x₁)² + (y₂−y₁)²) in 2D; add (z₂−z₁)² under the radical for 3D
  • Midpoint: ((x₁+x₂)/2, (y₁+y₂)/2)
  • Slope: (y₂−y₁)/(x₂−x₁) — undefined for vertical lines
  • Line equation: y = mx + b (slope-intercept), or Ax + By + C = 0 (standard form)

Coordinate systems

Cartesian (x, y, z) coordinates are most intuitive. Polar coordinates (r, θ) are more natural for rotational problems. Cylindrical and spherical coordinates extend polar to 3D. The conversion formulas between them are used constantly in physics and engineering.

Frequently Asked Questions

How do you find the distance between two points on a coordinate grid?
Use the distance formula, which comes from the Pythagorean theorem: d = √((x₂−x₁)² + (y₂−y₁)²). Subtract the x-coordinates and the y-coordinates to get the horizontal and vertical legs of a right triangle, then find the length of the hypotenuse.
What is the midpoint formula?
The midpoint of two points (x₁,y₁) and (x₂,y₂) is the average of their coordinates: ((x₁+x₂)/2, (y₁+y₂)/2). It is the point exactly halfway along the segment connecting them.
Why is the slope undefined for a vertical line?
Slope is calculated as (y₂−y₁) / (x₂−x₁). When both points share the same x-coordinate, the denominator is zero, and division by zero is undefined. A vertical line has no defined slope, though it can still be described by the equation x = a constant.
How do I write the equation of the line through two points?
First find the slope m = (y₂−y₁)/(x₂−x₁), then solve for the y-intercept b using either point: b = y₁ − m × x₁. The line's equation in slope-intercept form is y = mx + b. If the line is vertical, write it as x = x₁ instead.