Slope Calculator

Updated July 2026

Enter two points and instantly find the slope of the line through them — as a fraction and a decimal — plus the angle of incline, the y-intercept, the full slope-intercept equation y = mx + b, the distance between the points and their midpoint. Everything runs privately in your browser.

Slope is rise over run: m = (y2 − y1) / (x2 − x1). It tells you how much y changes for each step in x. For example, the points (1, 2) and (3, 8) give a slope of (8 − 2) / (3 − 1) = 3.
Enter the coordinates of two points on the line.
Slope (m)
Slope as fraction
Slope as decimal
Angle of incline
y-intercept (b)
Distance
Midpoint
Slope-intercept equation
Rise / run

How this slope calculator works

The slope of a line measures its steepness and direction. Given any two points on the line, you find the slope by dividing the rise — the change in y — by the run — the change in x. In symbols, m = (y2 − y1) / (x2 − x1). A positive slope rises from left to right, a negative slope falls, a slope of zero is a flat horizontal line, and a vertical line has an undefined slope because its run is zero.

Once you have the slope, you can write the line in slope-intercept form, y = mx + b. The y-intercept b is found by rearranging: b = y − m·x for either known point. This calculator also reports the angle of incline (the arctangent of the slope, in degrees), the straight-line distance between the two points, and their midpoint.

Worked example: for the points (1, 2) and (3, 8), the rise is 8 − 2 = 6 and the run is 3 − 1 = 2, so the slope is 6 / 2 = 3. Solving for the intercept, b = 2 − 3·1 = −1, which gives the equation y = 3x − 1.

Reference note: the angle of incline is computed as atan(m) and reported in degrees. When both x-values are equal the line is vertical, the slope is undefined and there is no slope-intercept equation; when both y-values are equal the slope is exactly zero.

Frequently asked questions

What is slope?
Slope measures how steep a line is. It is the ratio of the vertical change to the horizontal change between two points, often described as rise over run. A larger absolute value means a steeper line.
How do I find slope from two points?
Use the formula m = (y2 − y1) / (x2 − x1). Subtract the first y from the second y to get the rise, subtract the first x from the second x to get the run, then divide. The points (1, 2) and (3, 8) give m = 6 / 2 = 3.
What is slope-intercept form?
Slope-intercept form is y = mx + b, where m is the slope and b is the y-intercept — the y-value where the line crosses the y-axis. Knowing the slope and one point lets you solve for b and write the line's equation.
What does a negative slope mean?
A negative slope means the line goes downward from left to right: as x increases, y decreases. A positive slope rises, a slope of zero is horizontal, and an undefined slope is a vertical line.
What is the slope of a vertical line?
A vertical line has an undefined slope. Both points share the same x-value (x1 = x2), so the run is zero and division by zero is not allowed. There is no slope-intercept equation for it.
How do I find the y-intercept?
After finding the slope m, plug one point (x, y) into y = mx + b and solve b = y − m·x. For (1, 2) and (3, 8) the slope is 3, so b = 2 − 3·1 = −1 and the equation is y = 3x − 1.
⚡ Slope Calculator — by larely ↗

Related tools

Speed, Distance & Time Calculator

Solve for speed, distance or time from the other two, in any units.

Density Calculator

Solve density = mass / volume for any of the three, with unit conversion.

Square Root Calculator

Find and simplify square roots, with perfect-square and radical form.

Exponent Calculator

Raise any base to any power, including negative and fractional exponents.

Prime Number Checker

Check if a number is prime and get its prime factorization.

Circle Calculator

Find a circle's radius, diameter, circumference and area from any one value.

Permutation & Combination Calculator

Calculate combinations and permutations for n and r.

Logarithm Calculator

Compute log of any base, plus log10, ln and log2, with change of base.

Factorial Calculator

Calculate n! exactly for any non-negative integer, including huge values.

Fibonacci Calculator

Generate the Fibonacci sequence and find the Nth Fibonacci number.

Molarity Calculator

Solve molarity = moles / liters, including from mass and molar mass.

Modulo Calculator

Calculate a mod n with quotient, remainder and negative-number handling.

Browse all 251 free tools →