Built for students, writers and researchers
Slope Calculator from two points
Type two points, fractions allowed, and get the slope, the equation y = mx + b, the distance between them and their midpoint.
Answer
Enter your numbers or pick an example — the answer and the steps appear here instantly.
Everything about the line through two points
Worked here for the points (2, 3) and (6, 11).
How to find slope by hand
Slope measures how steep a line is: the change in y divided by the change in x, m = (y₂ − y₁)/(x₂ − x₁). Label your points first, then subtract in the same order on top and bottom. For (−1, 4) and (3, −2), m = (−2 − 4)/(3 − (−1)) = −6/4 = −3/2.
To write the equation, substitute one point into y = mx + b and solve for b. Using (3, −2): −2 = (−3/2)(3) + b, so b = −2 + 9/2 = 5/2, and the line is y = −3/2 x + 5/2. Checking with the other point: (−3/2)(−1) + 5/2 = 3/2 + 5/2 = 4, as it should be.
A positive slope rises from left to right, a negative one falls, zero is flat and an undefined slope is vertical. The most common mistake is mixing the order, such as y₂ − y₁ over x₁ − x₂, which flips the sign. Parallel lines share a slope, and perpendicular slopes multiply to −1, so a line perpendicular to this one has slope 2/3.
How to use the slope calculator
Enter the two points
Fill in x₁, y₁, x₂ and y₂; whole numbers, decimals and fractions like 1/2 all work.
Press Calculate
Slope, intercept, equation, distance, midpoint and angle appear together with a numbered outline.
Explain or continue
Copy the result, request a written explanation from the AI Math Solver, or keep going with a follow-up question in AI Chat.
Frequently asked questions
It means the line is vertical: both points share an x-value, so the run is zero and dividing by it is impossible. The calculator reports the line as x = c instead of y = mx + b.
No. Swapping the points flips the sign of both the rise and the run, so their ratio stays the same.
Yes. Coordinates like 1/2 or −3/4 are accepted, and with whole-number or fraction inputs the slope stays an exact fraction; only the final decimal is rounded and marked ≈.
It is the inverse tangent of the slope, measured from the positive x-axis. A slope of 1 makes 45°, and a horizontal line makes 0°.
Yes. Every value is calculated in your browser, with no account and nothing sent to a server. An AI explanation is optional; it is included in the Pro plans* (*fair use: up to 300 runs a day across the writing, study and code tools) and uses 2 credits without a plan, while signed-out visitors see a free preview of the opening.
That is a good use: work the problem by hand first, then compare. Keep to your teacher's rules on AI help, and remember the AI explanation can make mistakes even when the calculator's numbers are exact.
More tools for lines and graphs
- Geometry CalculatorArea and perimeter of plane shapes
- Solve for x CalculatorExact solutions to equations, step by step
- Algebra CalculatorSimplify, expand, factor and solve
- Derivative CalculatorDerivatives with the rule for each step
- AI Math SolverWorked solutions to math problems
- Fraction CalculatorAdd, subtract, multiply and divide fractions
Two points, one line
Get the slope, equation, distance and midpoint from any pair of points.
Find the slope- Exact fraction slopes
- y = mx + b form
- Distance in radical form