Type two points and get the slope, the line equation, the angle, the distance and the midpoint. Through (1, 2) and (4, 8) the slope is m = 6 ÷ 3 = 2 and the line is y = 2x.
Fractions stay exact (m = −2/3, not −0.6667), and vertical lines are detected.
Whole numbers, decimals, negatives and fractions (3/4) work. Results update as you type.
Point 1 (x₁, y₁)
Point 2 (x₂, y₂)
m = 2
Find m and the line.
m = −2/3, line y = −(2/3)x + 5/3.
Both points have x = 2.
The slope is undefined; the line is x = 2.
Use the distance formula.
Distance 5, slope 4/3, midpoint (1.5, 2).
Press Explain the steps with AI under any answer and the MathAI GPT math solver opens with your numbers already filled in, then explains the method line by line and answers follow-up questions. You can also type or photograph the whole question. On your phone, use MathAI GPT for iPhone or MathAI GPT for Android.
Use m = (y₂ − y₁) ÷ (x₂ − x₁). For (1, 2) and (4, 8): m = (8 − 2) ÷ (4 − 1) = 6 ÷ 3 = 2. It does not matter which point you call first, as long as you use the same order on top and bottom.
Find the slope m, then the y-intercept b = y₁ − m·x₁, and write y = mx + b. For (−2, 3) and (4, −1): m = −4/6 = −2/3 and b = 3 − (−2/3)(−2) = 5/3, so y = −(2/3)x + 5/3.
A slope of 0 is a horizontal line (y never changes). An undefined slope happens when x₂ = x₁: the line is vertical, its equation is x = constant, and you would be dividing by zero.
The line falls from left to right: y decreases as x increases. A slope of −2 means y drops 2 units for every 1 unit to the right.
The slope is the tangent of the angle the line makes with the x-axis: angle = arctan(m). A slope of 1 is 45°, and a slope of 2 is about 63.43°.
Distance = √((x₂ − x₁)² + (y₂ − y₁)²) and midpoint = ((x₁ + x₂)/2, (y₁ + y₂)/2). For (0, 0) and (3, 4) the distance is √25 = 5 and the midpoint is (1.5, 2).