Skip to content
SoftwareSolutions.net
Calculators & Converters

Slope calculator

Find the slope and intercept of a straight line through two points.

Try it

Ready

Inputs

Result

The result appears here as you type.

About Slope calculator

A slope calculator finds the steepness of a straight line between two points. Enter the coordinates of two points, and the calculator returns the slope, which is the change in y divided by the change in x. The slope describes how fast a line rises or falls, and it is used in maths, engineering, mapping, road design and any problem involving a rate of change.

The calculator also reports the y-intercept, the point where the line crosses the vertical axis, and the equation of the line in slope-intercept form. A vertical line has no defined slope, and the calculator tells you when the two x-values are equal.

How to use Slope calculator

  1. Enter the x and y coordinates of the first point.
  2. Enter the x and y coordinates of the second point.
  3. Read the slope, which is rise over run.
  4. Read the y-intercept and the line equation.
  5. Check the sign: a positive slope rises left to right and a negative slope falls.

Rise over run

The slope is the difference in y divided by the difference in x. For points (1, 2) and (4, 8), the slope is (8 − 2) ÷ (4 − 1) = 2. The line rises two units for every one unit across. The order of the points does not matter, as long as you subtract in the same order for both coordinates.

Slope can be written as a percentage for road gradients. A slope of 0.1 is a 10% grade, which means a rise of 10 metres for every 100 metres of horizontal distance.

The equation of the line

Once the slope m is known, the y-intercept b is found by substituting one point into y = mx + b. For the example above, 2 = 2 × 1 + b, so b = 0 and the equation is y = 2x. This form makes it easy to predict y for any x.

Parallel lines have the same slope, and perpendicular lines have slopes that multiply to −1. These relationships are useful for checking geometry problems and drawing accurate diagrams.

Frequently asked questions

What if the two x-values are the same?

The line is vertical and its slope is undefined. The calculator reports this instead of a number.

What does a slope of zero mean?

The line is horizontal, so y does not change as x changes.

How is slope used in real life?

It describes road gradients, roof pitch, cost trends and any situation where one quantity changes steadily with another.

Related tools

Tools that pair well with this one.