About the Slope Calculator tool
The slope of a line measures how steep it is: the change in y divided by the change in x, often remembered as “rise over run”. Given two points you can find the slope, and from the slope and one point you can write the whole equation of the line. It is one of the first skills in coordinate geometry and the basis of rates of change in science, economics and engineering.
Enter two points and this calculator returns the slope as an exact fraction (and decimal), then writes the line in all three standard forms: slope-intercept y = mx + b, point-slope y − y₁ = m(x − x₁) and standard form Ax + By = C with whole-number coefficients. Coordinates can be integers, decimals or fractions and the arithmetic stays exact, so a slope of −8/9 is never turned into −0.888888889.
You also get the y- and x-intercepts, the angle the line makes with the positive x-axis, the grade as a percentage, whether the line is rising, falling, horizontal or vertical, and the distance and midpoint between the two points. A graph plots both points and the line. Vertical lines, whose slope is undefined, are recognised and written as x = k.
How to use Slope Calculator
- Enter the first point in x₁ and y₁ and the second point in x₂ and y₂.
- Read the slope m in the result card.
- Copy the slope-intercept, point-slope or standard form of the equation with the copy icons.
- Check the intercepts, angle, grade, distance and midpoint, and look at the graph.
- Click “Show steps” to see rise, run and the intercept calculated.
Features
Exact slope
Fractions stay fractions, with the decimal shown alongside.
Three equation forms
Slope-intercept, point-slope and integer standard form, each copyable.
Intercepts, angle and grade
x- and y-intercepts, angle of inclination in degrees and percent grade.
Vertical and horizontal lines
Undefined and zero slopes are handled and explained.
Graph
Both points and the line are plotted on a labelled grid.
When to use it
- Find the equation of a line through two points for algebra homework.
- Calculate the gradient of a road, ramp or roof as a percentage.
- Measure a rate of change, such as cost per unit, from two data points.
- Check whether two lines are parallel (same slope) or perpendicular.
Frequently asked questions
What is the slope formula?
m = (y₂ − y₁) / (x₂ − x₁). Through (1, 2) and (4, 11) the slope is (11 − 2) / (4 − 1) = 3.
What does a negative slope mean?
The line falls from left to right: as x increases, y decreases. A zero slope is a horizontal line.
Why is the slope of a vertical line undefined?
Both points have the same x, so the run x₂ − x₁ is 0 and you would be dividing by zero. The line is written as x = constant.
How do I convert slope to an angle?
Angle = tan⁻¹(m). A slope of 1 is 45°, and a slope of 3 is about 71.57°.
What is the difference between slope and grade?
Grade is slope expressed as a percentage: slope × 100. A slope of 0.08 is an 8% grade, common on road signs.