Skip to content

ZeroTell Pro is an auto-renewing subscription, billed weekly, monthly or yearly. Cancel anytime in Dashboard → Subscription. See plans and prices.

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.

Try:

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).

  • Slope as a fraction

    Rise over run, reduced: m = (11 − 3)/(6 − 2) = 8/4 = 2, with a decimal beside it whenever the fraction is not whole.

  • Line equation

    The y-intercept b and the slope-intercept form y = mx + b, here y = 2x − 1.

  • Distance

    √((x₂ − x₁)² + (y₂ − y₁)²) in simplest radical form plus a decimal: √80 = 4√5 ≈ 8.94.

  • Midpoint

    The average of the coordinates, ((x₁ + x₂)/2, (y₁ + y₂)/2), which is (4, 7) for these points.

  • Angle with the x-axis

    The inclination angle from the inverse tangent of the slope; a slope of 2 makes about 63.43°.

  • Vertical and horizontal lines

    Equal x-values give an undefined slope and the line x = c. Equal y-values give slope 0 and a flat line.

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

  1. Enter the two points

    Fill in x₁, y₁, x₂ and y₂; whole numbers, decimals and fractions like 1/2 all work.

  2. Press Calculate

    Slope, intercept, equation, distance, midpoint and angle appear together with a numbered outline.

  3. 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.

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