My Calculator

Slope Calculator

Find the slope of a line between two points using the slope formula, with a plotted rise/run diagram and full step-by-step solution.

Enter the coordinates of Point 1 (x₁, y₁) and Point 2 (x₂, y₂) to find the slope of the line through them.

Rise (y₂ − y₁)6
Run (x₂ − x₁)4
Slope (m)1.5
Angle of inclination56.3099°

Positive slope — the line rises left to right

Line & Slope Diagram

The line through both points, with dashed run/rise legs showing exactly how the slope is calculated.

0P₁ (1, 2)P₂ (5, 8)run = 4rise = 6m = 1.5
Run (horizontal leg)Rise (vertical leg)Line through both points

Step-by-Step Solution

Here's exactly how this answer was calculated, one step at a time.

  1. 1

    Identify the two points

    (x₁, y₁) = (1, 2), (x₂, y₂) = (5, 8)

    Label the first point's coordinates x₁, y₁ and the second point's coordinates x₂, y₂.

  2. 2

    Find the rise (vertical change)

    rise = y₂ − y₁ = 8 − 2 = 6

    The rise is how much the line moves up or down between the two points.

  3. 3

    Find the run (horizontal change)

    run = x₂ − x₁ = 5 − 1 = 4

    The run is how much the line moves left or right between the two points.

  4. 4

    Divide rise by run to find the slope

    m = rise / run = 6 / 4 = 1.5

    The slope tells you how steep the line is, and whether it rises or falls left to right.

  5. 5

    Find the angle of inclination

    θ = arctan(m) = arctan(1.5) ≈ 56.3099°

    The angle of inclination is the angle the line makes with the positive x-axis.

Final Answer: Slope m = 1.5

Free Online Slope Calculator

This slope calculator finds the slope of a line passing through any two coordinate points. Enter the x and y coordinates of both points, and the calculator instantly returns the rise, the run, the slope, and the line's angle of inclination — along with a plotted diagram and a complete step-by-step solution showing exactly how the slope formula was applied.

Whether you're a student solving coordinate geometry or algebra problems, a teacher preparing worked examples, a roofer or contractor checking a pitch or grade, or an engineer analyzing a gradient, this slope formula calculator handles the entire calculation for you — including special cases like horizontal and vertical lines.

The Slope Formula

The slope of a line measures how steep it is — specifically, how much the line rises or falls vertically for every unit it moves horizontally. Given two points on a line, the slope formula is:

  • Slope formula: m = (y₂ − y₁) / (x₂ − x₁)
  • Rise: the vertical change, y₂ − y₁
  • Run: the horizontal change, x₂ − x₁
  • Angle of inclination: θ = arctan(m), the angle the line makes with the positive x-axis
  • A vertical line (run = 0) has an undefined slope, since division by zero is not possible

How to Use This Slope Calculator

Using the calculator takes just two steps. First, enter the coordinates of Point 1 (x₁, y₁) and Point 2 (x₂, y₂) into the four input fields. Second, read the results: the calculator instantly displays the rise, run, slope, and angle of inclination, along with a coordinate-plane diagram showing the line through both points and dashed orange and blue lines marking the run and rise legs that form the slope's right triangle.

The purple line in the diagram is drawn extending slightly past both points, so you can clearly see the line's direction and steepness — not just the segment connecting the two points you entered.

Understanding Positive, Negative, Zero, and Undefined Slopes

The sign and value of a slope tell you everything about a line's direction. A positive slope means the line rises as you move left to right. A negative slope means the line falls as you move left to right. A slope of exactly zero means the line is perfectly horizontal — it neither rises nor falls. And an undefined slope occurs only for a perfectly vertical line, since the run (horizontal change) is zero and division by zero has no defined result.

Worked Example

Suppose Point 1 is at (1, 2) and Point 2 is at (5, 8). The rise is 8 − 2 = 6, and the run is 5 − 1 = 4. Dividing gives a slope of m = 6 / 4 = 1.5, meaning the line rises 1.5 units for every 1 unit it moves to the right. Taking the arctangent of 1.5 gives an angle of inclination of approximately 56.3°.

This same process works for any two points, including cases with negative coordinates or a negative slope — the formula automatically produces the correct sign based on whether the line is rising or falling.

Where Slope Calculations Are Used

Slope is one of the most practically useful concepts in mathematics, appearing constantly outside the classroom:

  • Students and teachers use it throughout algebra and coordinate geometry, especially when graphing linear equations.
  • Construction workers, roofers, and contractors use slope (often called pitch or grade) to measure roof steepness, ramp inclines, and road gradients.
  • Engineers use slope to analyze rates of change in technical drawings, drainage design, and structural plans.
  • Economists and data analysts use slope to describe the rate of change between two data points on a graph, such as growth or decline over time.
  • Physics problems frequently use slope to represent rates like speed (distance over time) or acceleration (velocity over time) on a graph.

Frequently Asked Questions

What is the slope formula?

The slope formula finds the steepness of a line between two points: m = (y₂ − y₁) / (x₂ − x₁), where (x₁, y₁) and (x₂, y₂) are the two points on the line.

What does a negative slope mean?

A negative slope means the line falls as you move from left to right — as x increases, y decreases. The steeper the negative value, the faster the line falls.

Why is the slope of a vertical line undefined?

A vertical line has a run (horizontal change) of zero, and dividing by zero has no defined mathematical result. This is why vertical lines are said to have an 'undefined' slope rather than a numeric one.

What is the slope of a horizontal line?

A horizontal line has a slope of exactly zero, since there is no vertical change (rise = 0) no matter how far you move horizontally along it.

How do I find the angle of a line from its slope?

Take the arctangent (inverse tangent) of the slope: θ = arctan(m). This gives the angle of inclination the line makes with the positive x-axis, which this calculator computes automatically.