Coordinate Grid Calculator — Slope, Distance, Midpoint & Line Equation
Enter two points on a coordinate grid to instantly calculate the slope, distance, midpoint, y-intercept, line equation and quadrant position — with a live grid plot showing the line and both points.
Straight-line Euclidean distance
- 1
Δx (x₂ − x₁)
5 − 1 = 4 - 2
Δy (y₂ − y₁)
10 − 2 = 8 - 3
Slope (Δy ÷ Δx)
8 ÷ 4 = 2 - 4
Distance = √(Δx² + Δy²)
√(4² + 8²) = 8.9443
How does this calculator work?
Two points on a grid determine a unique line. Slope m = Δy/Δx, line y = mx+b (with b = y₁−mx₁), straight-line distance d = √(Δx²+Δy²), midpoint M = ((x₁+x₂)/2,(y₁+y₂)/2). The live plot shows the line, both points and the midpoint.
Formula
How this is calculated
A coordinate grid is the Cartesian plane with horizontal (x) and vertical (y) axes. Given two points P₁ = (x₁, y₁) and P₂ = (x₂, y₂), the most useful measures are slope, line equation, distance, and midpoint.
The slope m = (y₂ − y₁) / (x₂ − x₁) describes how steeply the line rises or falls — positive means upward, negative means downward, zero means horizontal, and undefined (division by zero) means vertical. Once the slope is known, the line can be written in slope-intercept form y = mx + b by substituting one point to solve for b = y₁ − m·x₁.
The Euclidean distance d = √(Δx² + Δy²) gives the straight-line length of the segment between the two points (from the Pythagorean theorem). The midpoint M = ((x₁+x₂)/2, (y₁+y₂)/2) lies exactly halfway. Each point also falls in one of the four quadrants (Q I: x>0 y>0; Q II: x<0 y>0; Q III: x<0 y<0; Q IV: x>0 y<0) or on an axis.
Frequently asked questions
Slope m = (y₂ − y₁) / (x₂ − x₁). It measures the vertical rise divided by the horizontal run between the two points. A positive slope goes up left-to-right; a negative slope goes down.
First find the slope m = (y₂−y₁)/(x₂−x₁), then solve for b using b = y₁ − m·x₁. The line equation is y = mx + b. For a vertical line (x₁ = x₂) the equation is simply x = x₁.
Quadrant I: x>0, y>0 (upper right). Quadrant II: x<0, y>0 (upper left). Quadrant III: x<0, y<0 (lower left). Quadrant IV: x>0, y<0 (lower right). Points on the axes are not in any quadrant.
Also known as
TG we-Calculate Editorial Team. (2026). Coordinate Grid Calculator — Slope, Distance, Midpoint & Line Equation [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/coordinate-grid-calculator
TG we-Calculate Editorial Team. "Coordinate Grid Calculator — Slope, Distance, Midpoint & Line Equation." TG we-Calculate. 2026. https://we-calculate.com/calculator/coordinate-grid-calculator.
TG we-Calculate Editorial Team, "Coordinate Grid Calculator — Slope, Distance, Midpoint & Line Equation," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/coordinate-grid-calculator
@misc{wecalculate_coordinate_grid_calculator, title = {Coordinate Grid Calculator — Slope, Distance, Midpoint & Line Equation}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/coordinate-grid-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
