Math & Science

Slope Calculator

Calculate slope (m), angle of inclination, distance, midpoint, and line equation (y = mx + b) with dynamic Cartesian plot and derivation.

Reviewed for Mathematical Accuracy Last updated: 2026
Standard Positive (1, 2) → (5, 8) Negative Slope (-3, 6) → (5, -2) Horizontal Zero Slope (y = 4) Vertical Line (x = 3)

📍 Point 1 (x₁, y₁)

📍 Point 2 (x₂, y₂)

SLOPE (m = Rise / Run)
1.50
Line Equation: y = 1.50x + 0.50
56.31°
Inclination Angle
7.21
Distance (Length)
(3.0, 5.0)
Midpoint
-0.67
Perpendicular m

The Concept of Slope in Coordinate Geometry

In mathematics, the slope (denoted by the letter $m$) quantifies both the steepness and direction of a straight line connecting two coordinates $(x_1, y_1)$ and $(x_2, y_2)$ on a 2-dimensional Cartesian grid. It is universally defined as the ratio of vertical change (rise) to horizontal change (run):

m = Δy / Δx = (y₂ - y₁) / (x₂ - x₁)

Types of Slope

Slope Type Value of m Visual Orientation Angle Range
Positive Slope $m > 0$ Rises upward from left to right $0^\circ < \theta < 90^\circ$
Negative Slope $m < 0$ Falls downward from left to right $-90^\circ < \theta < 0^\circ$
Zero Slope $m = 0$ Perfect horizontal flat line ($y = C$) $\theta = 0^\circ$
Undefined Slope $\Delta x = 0$ (div by zero) Perfect vertical line ($x = C$) $\theta = 90^\circ$ or $-90^\circ$

Distance, Midpoint, and Equation of the Line

Step-by-Step Worked Coordinate Geometry Example

Suppose you need to find the slope, linear equation, angle of inclination, Euclidean distance, and midpoint between two Cartesian points: $P_1 = (2, 3)$ and $P_2 = (8, 11)$:

  1. Horizontal & Vertical Changes ($\Delta x, \Delta y$): $\Delta x = x_2 - x_1 = 8 - 2 = \mathbf{6}$, and $\Delta y = y_2 - y_1 = 11 - 3 = \mathbf{8}$.
  2. Slope ($m$): $m = rac{\Delta y}{\Delta x} = rac{8}{6} = rac{4}{3} pprox \mathbf{1.3333}$. Because $m > 0$, the line rises from left to right.
  3. Y-Intercept ($b$) & Slope-Intercept Equation: Substitute $P_1(2,3)$ into $b = y_1 - m x_1$: $b = 3 - (1.3333 imes 2) = 3 - 2.6667 = \mathbf{0.3333}$. Thus, the line equation is $y = 1.33x + 0.33$.
  4. Euclidean Distance ($d$) & Midpoint ($M$): $d = \sqrt{6^2 + 8^2} = \sqrt{36 + 64} = \sqrt{100} = \mathbf{10.00 ext{ units}}$. The midpoint is $M = \left( rac{2+8}{2}, rac{3+11}{2} ight) = \mathbf{(5.0, 7.0)}$, and the angle of inclination is $ heta = rctan(4/3) = \mathbf{53.13^\circ}$.

Frequently Asked Questions

What is the slope formula?

The slope formula is m = (y2 - y1) / (x2 - x1), representing the vertical change (rise) divided by the horizontal change (run).

What does an undefined slope mean?

An undefined slope occurs when x1 = x2 (a vertical line). Dividing by zero (Δx = 0) is mathematically undefined in Euclidean geometry.

What is the slope of perpendicular lines?

Perpendicular lines have negative reciprocal slopes: m1 × m2 = -1, or m2 = -1 / m1.

Geometric Application: Slope arithmetic is identical to derivative rates of change in calculus ($\frac{dy}{dx}$), velocity in physics ($\frac{\Delta s}{\Delta t}$), and civil engineering gradient slopes for roadway drainage.