Slope Calculator

Enter two points to find the slope, angle and equation of their line. Follow the calculation step by step, then view the graph.

Coordinates of two points

Point A
Point B

Use the same length unit on both axes for a meaningful angle and percentage. Decimals and negative coordinates are accepted (−1 billion to +1 billion).

YOUR RESULT

Slope

0.5

Rises from left to right · y = 0.5x + 2

Step-by-step calculation

A = (2, 3), B = (6, 5).

  1. Find the horizontal change (run)

    Δx = x₂ − x₁ = 6 − 2 = 4

  2. Find the vertical change (rise)

    Δy = y₂ − y₁ = 5 − 3 = 2

  3. Calculate the slope

    m = Δy / Δx = 2 / 4 = 0.5

  4. Convert slope to a percentage

    Slope percentage = m × 100% = 0.5 × 100% = 50%

  5. Calculate the angle

    θ = arctan(m) × 180 / π = arctan(0.5) × 180 / π = 26.5650511771°

  6. Find the y-intercept

    b = y₁ − m × x₁ = 3 − (0.5 × 2) = 2

  7. Write the equation of the line

    y = mx + b → y = 0.5x + 2

  8. Check both points

    A: 0.5 × 2 + 2 ≈ 3. B: 0.5 × 6 + 2 ≈ 5. Displayed coefficients are rounded.

Graph of the line

y = 0.5x + 2; A (2, 3) and B (6, 5). Run = 4, rise = 2.

Line through A and By = 0.5x + 2; A (2, 3) and B (6, 5). Run = 4, rise = 2.0.77.32.355.65445.652.357.30.7ABxy

A and B are the entered points. The dashed triangle shows rise and run; the solid line extends in both directions. Both axes use the same scale.

What does slope mean?

Slope measures how much y changes for each unit increase in x. A positive value means the line rises from left to right; a negative value means it falls. A slope of 0.5 means y increases by 0.5 when x increases by 1. This calculator helps students check coordinate geometry, teachers demonstrate straight-line relationships, and anyone evaluate a constant rate of change from two measurements.

Formulas used

Run: Δx = x₂ − x₁   Rise: Δy = y₂ − y₁

Slope: m = Δy / Δx

Signed slope percentage: 100m%   Angle: θ = arctan(m) × 180 / π

Y-intercept: b = y₁ − mx₁   Line equation: y = mx + b

The angle here is measured from the positive horizontal direction in the range −90° to +90° for a nonvertical line. A falling line has a negative angle. For physical gradients, run is the horizontal distance, not the length along the slope.

Special cases

If the y-coordinates are equal, the line is horizontal: m = 0 and y = y₁. If only the x-coordinates are equal, the line is vertical: x = x₁. Its slope and percentage are undefined because division by zero is not allowed; its angle to the horizontal is 90°. Two identical points do not define a unique line.

Displayed numbers are rounded to 12 significant digits; intermediate calculations use unrounded values. Results use numerical arithmetic, not symbolic algebra.