ToolBark
Math

Slope Calculator

Slope, angle, and line equation from any two points — instantly.

Enter Two Points

Point 1 (x₁, y₁)

Point 2 (x₂, y₂)

Results

Slope (m)2rise 6 ÷ run 3
Slope (m)2
Angle63.4349°
y-intercept0
x-intercept0
Rise6
Run3
Distance6.708204
Midpoint(2.5, 5)

Line Equations

Slope-intercepty = 2x + 0
Standard form6x − 3y = 0
Point-slope formy − 2 = 2(x − 1)
P1(1, 2)P2(4, 8)m = 263.43°

Formulas

Slope
m = (y₂ − y₁) / (x₂ − x₁)
Rise over run — change in y divided by change in x.
Angle
θ = arctan(m)
Angle the line makes with the positive x-axis, in degrees.
Slope-intercept
y = mx + b
m is slope, b is the y-intercept.
Point-slope
y − y₁ = m(x − x₁)
Uses one known point and the slope.
Distance
d = √((x₂−x₁)² + (y₂−y₁)²)
Straight-line distance between the two points.
Midpoint
M = ((x₁+x₂)/2, (y₁+y₂)/2)
The point exactly halfway between P1 and P2.
About

The slope calculator finds the slope (rise over run), inclination angle, y-intercept, x-intercept, distance, and midpoint for any two coordinate points. It instantly generates the line equation in slope-intercept form (y = mx + b), standard form (Ax + By = C), and point-slope form — essential for algebra, geometry, physics, and engineering problems.

FAQ
How do you calculate slope from two points?+

Slope (m) equals rise divided by run: m = (y₂ − y₁) / (x₂ − x₁). Subtract the y-coordinates to get the rise, subtract the x-coordinates to get the run, then divide. A positive slope goes up left-to-right; a negative slope goes down.

What is an undefined slope?+

When both points share the same x-coordinate (a vertical line), the run is zero and division by zero is undefined. Vertical lines have no slope value — they are expressed simply as x = c, where c is the shared x-coordinate.

What is the difference between slope-intercept and standard form?+

Slope-intercept form (y = mx + b) explicitly shows the slope m and y-intercept b. Standard form (Ax + By = C) uses integers and is preferred when working with systems of equations. Both describe the same line — the calculator provides all three common forms.

How is the angle of a line related to its slope?+

The angle θ a line makes with the positive x-axis satisfies tan(θ) = m, so θ = arctan(m). A slope of 1 gives a 45° angle; steeper lines approach 90°. Horizontal lines have 0° and vertical lines have 90° (undefined slope).

Related tools