Math / Algebra / Functions

Slope Calculator

Find the slope, y-intercept, angle, distance, and line equation from any two coordinate points on a graph.

Calculator

Enter your values and view the result instantly.

Change any field below to update the answer straight away.

Point 1

Point 2

0.5000

Slope (m)

0.0000

Y-intercept (b)

26.57°

Angle

4.4721

Distance

y = 0.5000x

Line equation

Math Basics

Slope calculator: find slope and line equation from two points

The slope of a line describes its steepness and direction. Given any two points on a coordinate plane, a slope calculator finds the slope, y-intercept, angle of inclination, straight-line distance between the points, and the full equation of the line in slope-intercept form.

Slope, y-intercept, and line equation

Slope is defined as the rise divided by the run: the change in y divided by the change in x between two points. A positive slope means the line rises from left to right; a negative slope means it falls. A slope of zero means the line is horizontal. A vertical line has an undefined slope because the change in x is zero and division by zero is undefined.

The y-intercept is the value of y when x equals zero, found by rearranging the slope formula: b = y1 - m*x1. The slope-intercept form of the line equation is y = mx + b. This form is the most common way to write a linear equation because the slope and y-intercept can be read directly from the equation.

m = (y2 - y1) / (x2 - x1)

Slope equals the vertical change (rise) divided by the horizontal change (run) between two points.

b = y1 - (m × x1)

The y-intercept is found by substituting one known point and the slope into the rearranged line equation.

d = sqrt((x2 - x1)^2 + (y2 - y1)^2)

The straight-line distance between two points is calculated using the Pythagorean theorem.

angle = arctan(m) x (180 / pi)

The angle the line makes with the positive x-axis in degrees, derived from the inverse tangent of the slope.

Applications of slope in science and engineering

In physics, slope represents rate of change. The slope of a position-time graph is velocity, and the slope of a velocity-time graph is acceleration. In economics, the slope of a supply or demand curve shows how quantity changes when price changes. In statistics, the slope of a regression line shows the average change in one variable for each unit increase in another.

In construction and civil engineering, slope is often written as a ratio, gradient, or percentage grade. A 5% road grade means a rise of 5 metres for every 100 metres of horizontal distance, which is equivalent to a slope of 0.05. This makes a slope calculator useful not just as a maths calculator online, but also as a practical calculator for design, drainage, surveying, and access planning.

Further reading

Related

More from nearby categories

These related calculators come from the same leaf category, nearby sibling categories, or the same top-level topic.

Exponent Calculator

Calculate any power or exponent — raise a base to any power, find roots, and switch between power and root modes.

Quadratic Formula Calculator

Solve quadratic equations, find the discriminant, and calculate real or complex roots from coefficients a, b, and c.

Log Calculator

Calculate log base 10, natural log (ln), log base 2, or any custom base logarithm from a single value.

Average Calculator

Find the mean, median, mode, and range of any list of numbers. Enter values separated by commas or spaces.

Privacy choices

Help us improve the site.

If you allow analytics, we may use Google Analytics and Microsoft Clarity to better understand how the site is used. Analytics remain off unless you accept.