Enter the coordinates of two points to determine the equation of the line that passes through them.
Our tool calculates the slope, y-intercept, distance, and provides the line's equation in three different forms.
Explore these common scenarios to understand how the calculator works.
A standard calculation with two distinct points having a non-zero, non-infinite slope.
P₁: (1, 2)
P₂: (3, 6)
When the y-coordinates are the same, the line is horizontal, and the slope is zero.
P₁: (2, 4)
P₂: (5, 4)
When the x-coordinates are the same, the line is vertical, and the slope is undefined.
P₁: (3, 1)
P₂: (3, 5)
The calculator handles negative numbers and decimal points with precision.
P₁: (-1, -2.5)
P₂: (4, 7.5)
m = (y₂ - y₁) / (x₂ - x₁)
d = √((x₂ - x₁)² + (y₂ - y₁)²)
M = ((x₁ + x₂) / 2, (y₁ + y₂) / 2)