Skip to main content
MathStatCalc

Slope From Two Points Calculator

Use this free slope from two points calculator to find the slope of the line through any two coordinate points. Enter (x₁, y₁) and (x₂, y₂) to get the slope as an exact fraction, a decimal, the rise and run, the angle of inclination, and the full equation of the line in slope-intercept form — plus an interactive graph. Vertical lines (undefined slope) and horizontal lines (slope = 0) are handled automatically.

How to Use the Slope From Two Points Calculator

  1. Enter the coordinates of the first point (x₁, y₁).
  2. Enter the coordinates of the second point (x₂, y₂).
  3. Click Calculate Slope. The result shows the slope as a reduced fraction, a decimal, the rise, the run, the angle of inclination, and the line equation.
  4. If x₁ = x₂ the line is vertical and the slope is reported as undefined.

Formula & Calculation Method

The slope of the line through two points (x₁, y₁) and (x₂, y₂) is defined as the change in y divided by the change in x:

m = (y₂ − y₁) / (x₂ − x₁) = rise / run

Where:

The angle of inclination θ (in degrees) satisfies tan θ = m, so θ = arctan(m), reported in the range (0°, 180°) as the standard convention for a directed line.

The line itself can be written in slope-intercept form: y = m·x + b, where b = y₁ − m·x₁.

Worked Example

Find the slope through (1, 2) and (5, 5).

StepCalculationResult
Risey₂ − y₁ = 5 − 23
Runx₂ − x₁ = 5 − 14
Slopem = 3 / 40.75
Anglearctan(0.75)≈ 36.87°
Equationy = 0.75x + 1.25

Interpreting the Result

Assumptions and Limits

Frequently Asked Questions

What is the slope formula for two points?

The slope through (x₁, y₁) and (x₂, y₂) is m = (y₂ − y₁) / (x₂ − x₁). It represents the change in y divided by the change in x — commonly called “rise over run.”

What does the slope of a line tell you?

The slope measures a line's steepness and direction: positive slopes rise left-to-right, negative slopes fall, zero slope is horizontal, and undefined slope is vertical. Its magnitude tells you how steep the line is.

What if the run is zero?

If x₂ = x₁, the run is zero, so division by zero makes the slope undefined. The line is vertical and its equation is x = x₁.

Can a slope be negative?

Yes. A negative slope means the line goes down as you move to the right. For example, the slope through (0, 5) and (5, 0) is m = (0 − 5)/(5 − 0) = −1.

How do I find the slope of a vertical line?

Vertical lines have an undefined slope because the run (horizontal change) is zero. You cannot express a vertical line as y = mx + b; instead, write it as x = c.

How is the angle of inclination related to the slope?

The angle of inclination θ satisfies tan θ = m. For a positive slope, θ is between 0° and 90°; for a negative slope, θ is between 90° and 180°. A horizontal line has θ = 0° and a vertical line has θ = 90°.

What is the difference between slope and the angle between two vectors?

Slope is the tangent of the angle a line makes with the positive x-axis. The angle between two vectors uses a different formula involving the dot product. For a single line, angle of inclination is simpler: θ = arctan(m).

Can the calculator return an exact fraction?

Yes. When both the rise and run are rational (integers or terminating decimals), the slope is shown as a fraction reduced to lowest terms, alongside its decimal approximation.

Related Tools