Maths Coordinate geometry

Slope calculator

x₁
y₁
x₂
y₂
Slope 2
(8 − 2) ÷ (4 − 1) = 2
Line equation y = 2x + 0
Angle 63.435°
Grade 200%
Rise 6
Run 3
Distance between the points 6.7082
Midpoint (2.5, 5)
Live · rise over run, with the equation

A slope of 2 means the line rises two units for every one across. That is 63.4° from horizontal and a grade of 200%. Road signs use grade, surveyors use degrees, and algebra homework wants the plain ratio.

Slope is rise over run: the change in y divided by the change in x. For the points (1, 2) and (4, 8) the rise is 6 and the run is 3, so the slope is 2 and the line is y = 2x. A vertical line has no slope at all, because its run is zero and division by zero is undefined.

How to use it

1 Enter the coordinates of the first point, then the second.
2 The slope appears at the top and the equation of the line just below it.
3 Angle, grade, distance and midpoint are all derived from the same two points.

The angle and the grade are easy to confuse. A 100 per cent grade is a 45° slope rather than a vertical wall: grade is the tangent of the angle written as a percentage, so the two only track each other while both are small. Roads are signed in grade, so a 10 per cent hill climbs one metre for every ten travelled horizontally, an angle of 5.71°. Builders use a third notation again, the ratio: the 1:12 that the ADA sets as the steepest a new ramp may be is 8.33 per cent grade and 4.76°, and entering the points 0,0 and 12,1 puts all three on screen at once.

The edges of the model are where a slope calculator earns its keep, and this one shows them rather than hiding them. Give it two points with the same x and the slope and the grade both go to a dash, because dividing by a run of zero has no answer, while the angle still reads 90° and the distance and the midpoint are as valid as ever; the equation switches to the x = form, which is the only way to write a vertical line. Give it the same point twice and everything collapses: zero distance, zero rise, zero run, and an equation of x = that point.

One surprise is worth expecting. The slope, the distance and the midpoint do not care which point you enter first, but the angle does. It is measured as the direction of travel from the first point to the second, so reversing them rotates it by 180°: the default pair reads 63.435°, and entered the other way round it reads −116.565° while the slope stays at exactly 2. If you only want the incline, read the angle from the lower point to the higher one.

What people use it for

  • Turning a road grade off a signpost into degrees, or back again
  • Checking a ramp against a maximum gradient before building it
  • Working out the fall needed along a drainage or gutter run
  • Writing the equation of a line through two plotted points
  • Taking the midpoint and the distance off the same pair of coordinates
  • Converting a builder’s 1:20 into the percentage a spec sheet asks for

Questions

The line is vertical, so the slope and the grade both show a dash and the equation is reported as x equals that value rather than as y = mx + b.

US Access Board, ADA Standards §405 Ramps
Was this tool any good?
Internal signal only · I use it to find the tools worth rebuilding