Rise Over Run Calculator
Result
Slope
- Change in y (Δy)
- 2.0000
- Change in x (Δx)
- 4.0000
- Slope angle
- 26.57 °
- Grade
- 50.00%
Rise over run is the slope of a line, and this slope calculator works it out from two points rather than from a rise and a run you have already measured. Give it the two points — x₁, y₁, x₂, y₂ — and it prints five readings: the slope itself, the rise, the run, the slope angle the line makes with the horizontal, and that same slope written as a percentage grade. The arithmetic is a single division, the rise and the run being the two coordinate differences, and the page is worth having because of everything around it. Points (0, 0) and (4, 2) give a rise of 2 and a run of 4, so the slope is 0.5: the line climbs half a unit for every unit it travels to the right. The same line has a slope angle of 26.57 degrees, found by taking the arctangent of the slope, and a grade of 50 percent, which is the slope multiplied by a hundred. Points (0, 0) and (1, 1) are the case worth memorising — a slope of 1, an angle of 45 degrees and a grade of 100 percent, the steepest climb that is still one step up for one step across. Points (0, 0) and (12, 1) give 0.0833 and a grade of 8.33 percent, which is the slope the elevation grade calculator reaches from an inch of rise per foot of run; that page takes the two distances, this one takes the two points they were measured between, and the two arrive at the same number from opposite ends. A line that goes downhill is neither an error nor quietly made positive. Points (2, 5) and (7, 1) have a rise of −4 and a run of 5, so the slope is −0.8, the slope angle is −38.66 degrees and the grade is −80 percent, while the run stays a positive 5 — the sign lives in the rise, and it is half the answer to the question of how steep the line is, which is why the page reports the rise and the run separately instead of only their ratio. Two more cases are worth naming before you type anything in. A horizontal line has a slope of 0 and a slope angle of 0, and that is a perfectly good answer rather than a missing one. A vertical line, where both points share the same x, has no slope at all: the run is 0, the division is undefined, and the page refuses rather than printing an infinity, because the slope of a vertical line is not a very large number but the absence of one. Nothing on this page is graded. Slope does have words attached to it — gentle and steep — but they are relative: a 1-in-12 grade that is gentle for a ramp is steep for a roof, and no standard draws the line between the two, so the page prints the numbers and leaves the judgement to whichever standard you are working to. Because coordinates are pure numbers, the slope, the rise and the run carry no units at all; the slope angle is in degrees and the grade is a percentage. Reach for this page when what you have is two points on a grid or two surveyed positions: after measuring the distance between them, or working out the midpoint of the segment, the next question about that same line is usually how steep it is. Reach for the elevation grade calculator when the rise and the run have already been measured as distances, which is how grades are written down on site — one inch of fall per foot of pipe, two centimetres of lift per metre of path.
Lines through two points, and the slopes they have
| x₁ | y₁ | x₂ | y₂ | Slope | Angle (°) |
|---|---|---|---|---|---|
| 0 | 0 | 4 | 2 | 0.5 | 26.57 |
| 0 | 0 | 1 | 1 | 1 | 45 |
| 0 | 0 | 4 | 1 | 0.25 | 14.04 |
| 0 | 0 | 12 | 1 | 0.0833 | 4.76 |
| 0 | 0 | 3 | 4 | 1.3333 | 53.13 |
| 0 | 0 | 1 | 0 | 0 | 0 |
| 3 | 1 | 4 | 11 | 10 | 84.29 |
| 2 | 5 | 7 | 1 | -0.8 | -38.66 |
Eight lines, and the columns to read together are the last two: the slope and the angle always agree, because one is the arctangent of the other, so a slope below 1 comes with an angle below 45 degrees and a slope above 1 with an angle above it. The first six rows start at the origin, which is why their slopes can be checked at a glance — the slope is just the second point's y divided by its x. Rows two and five are the two worth remembering: (1, 1) is a slope of 1 at 45 degrees, and (3, 4) is the 3-4-5 triangle standing on its side, a slope of 1.3333 at 53.13 degrees, the same angle that appears in the triangle page when two sides of 3 and 4 meet at a right angle. Row four is the gentle one: (12, 1) is a slope of 0.0833 and a grade of 8.33 percent, the standard accessible ramp, and the same number the elevation grade calculator reaches from a rise and a run measured separately. Row six is a horizontal line — slope 0, angle 0, answered rather than refused. Row seven is steep, a slope of 10 at 84.29 degrees, which is a 1000 percent grade. Row eight falls: the rise is negative, so the slope is −0.8 and the angle is −38.66 while the run stays positive at 5. Every cell is recomputed from its row when the page is built.
Formula
m = (y₂ − y₁) ÷ (x₂ − x₁) θ = arctan(m) grade % = m × 100
- m
- The slope, or the rise over the run: how much the line climbs for each unit it travels to the right. It has no unit, because it is one distance divided by another. Positive means the line goes uphill as x increases, negative means downhill, and 0 means it is horizontal. It is the primary answer on this page, and it is the one reading that survives swapping the two points, since exchanging them flips both the rise and the run and a ratio of two negatives is the same ratio
- Δy = y₂ − y₁
- The rise, the difference between the two y values and the numerator of the slope. It keeps its sign: going from a y of 5 down to a y of 1 gives a rise of −4, and the minus sign is what makes the slope negative. It is the number you would get by measuring the vertical distance between the two points, and it is printed on the page so that the slope can be checked by hand
- Δx = x₂ − x₁
- The run, the difference between the two x values and the denominator of the slope. It is the horizontal distance between the points, and unlike the slope and the angle it is never negative in practice for a left-to-right reading, though the page keeps whatever sign the subtraction gives. It must not be 0: a run of zero is a vertical line, which has no slope, and the page stops rather than dividing by zero. The pairing matters here — x₁ belongs with y₁ and x₂ with y₂, and shuffling the four numbers into points that are not the ones you measured gives the slope of a different line
- θ = arctan(m)
- The slope angle in degrees, the angle the line makes with the horizontal, printed to two decimals. It comes from the arctangent of the slope, which is why it is always between −90 and 90 and why it repeats every 180 degrees: the line through the two points continues in both directions, and the angle describes its direction rather than a particular segment. A slope of 0.5 gives 26.57 degrees, a slope of 1 gives 45, and a steep slope of 10 gives 84.29 — the angle crowds towards 90 as the line approaches vertical without ever reaching it
- grade % = m × 100
- The same slope as a percentage grade, printed to two decimals: the rise as a percentage of the run. A slope of 0.5 is a 50 percent grade, a slope of 1 is 100 percent, and the gentle 1-in-12 line is 8.33 percent. The percentage is not the angle and the two are easy to confuse: a 100 percent grade is only 45 degrees, because a grade measures the rise against the run while an angle measures it against the hypotenuse
Use it when two points are what you have, which in practice means coordinates rather than measurements: two surveyed positions on a site plan, two readings from a graph, two corners picked off a drawing, two samples in a table of x and y values. This page answers the question that comes right after the distance between two points, and it answers it in the form the line is described in mathematics — the slope, from which the equation of the line follows directly. It is also the honest page for a line that goes downhill, since the sign of the slope is printed rather than dropped. Use the elevation grade calculator when the rise and the run have already been measured as separate distances and the question is the one written on site — a fall of one inch per foot, a lift of two centimetres per metre — because that page skips the coordinate subtraction and takes those two numbers directly. Use the distance calculator when what you want is the length between the two points rather than the direction of the line through them; the midpoint calculator for the point halfway along it; and the endpoint calculator when you have the midpoint and one end of a segment and want the other end. Together the four describe the same segment — its length, its position, its direction, and where it ends.
Worked examples
Points (0, 0) and (4, 2)
- Rise: 2 − 0 = 2
- Run: 4 − 0 = 4
- Slope: 2 ÷ 4 = 0.5
- Slope angle: arctan(0.5) = 26.565…° → 26.57
- Grade: 0.5 × 100 = 50%
The default row and the easiest one to check by hand, since starting at the origin makes the rise the second point's y and the run its x. A slope of 0.5 means half a unit up for each unit across, which is gentle enough to walk without noticing — an accessible ramp is around 1 in 12, a sixth of this. The three readings agree with each other in the way the page intends: 0.5, 26.57 degrees and 50 percent are the same slope written three ways, and the run of 4 is the only one of them you could measure with a tape.
Points (1, 2) and (5, 8)
- Rise: 8 − 2 = 6
- Run: 5 − 1 = 4
- Slope: 6 ÷ 4 = 1.5
- Slope angle: arctan(1.5) = 56.309…° → 56.31
- Grade: 1.5 × 100 = 150%
Neither point at the origin, which is the ordinary case and the one that shows why the page subtracts rather than reading coordinates: both points are up and to the right of the origin, and neither coordinate on its own is the rise or the run. A grade of 150 percent is the reading that surprises people, because a percentage above 100 sounds impossible — it is not, and it only means the line climbs more than it travels across. The slope angle of 56.31 degrees is the check: everything above a slope of 1 is steeper than 45 degrees, and everything below it is shallower.
Points (0, 0) and (12, 1)
- Rise: 1 − 0 = 1
- Run: 12 − 0 = 12
- Slope: 1 ÷ 12 = 0.08333… → 0.0833
- Slope angle: arctan(0.08333…) = 4.763…° → 4.76
- Grade: 0.08333… × 100 = 8.33%
The gentle slope, and the row that meets the elevation grade calculator on the same number: here a rise of one over a run of twelve is 8.33 percent, and there an inch of rise per foot of run is 8.33 percent — one ratio written two ways, once from two points and once from two measured distances. That ratio is the standard maximum for an accessible ramp in many building codes, and reading it as a slope of 0.0833 or an angle of 4.76 degrees is what this page adds — the angle is small, which is exactly why the grade is quoted as a percentage instead: 4.76 degrees is hard to aim at, and 1 in 12 is easy to measure.
Points (2, 5) and (7, 1)
- Rise: 1 − 5 = −4
- Run: 7 − 2 = 5
- Slope: −4 ÷ 5 = −0.8
- Slope angle: arctan(−0.8) = −38.659…° → −38.66
- Grade: −0.8 × 100 = −80%
A downhill line, and the reason the page prints the rise as well as the ratio: the minus sign comes from the rise, so a reader who only saw −0.8 could not tell whether the run had been taken the other way round. The run stays positive at 5, because it is a distance to the right, and only the vertical direction carries the sign. Read left to right this line drops 80 centimetres for every metre forward — the sort of figure a drainage fall or a stair stringer is specified by, and one that would be actively misleading with its sign stripped.
Limitations
This page works the slope of a straight line from two points, and nothing else. It does not fit a line to more than two points, does not report where the line crosses either axis, and does not give the equation of the line, though the slope it prints is the first half of one. It does not work backwards: a slope on its own describes a direction rather than a line, and there are infinitely many lines with a slope of 0.5 — you would also need a point, which is what the point slope form does with the same numbers this page produces. The four coordinates are pure numbers and carry no units, so there is nothing to convert and nothing to choose: if your points are in metres, the slope is metres per metre and the run is metres, and the page will not label either of them. That is also why it cannot warn you about mixing units — enter x in metres and y in centimetres and it will divide them anyway, giving a slope a hundred times too large, with no sign that anything is wrong. A vertical line is refused rather than answered, because the slope of a vertical line does not exist; if your two points share an x, check that they are really two different points, since two identical points give the same refusal. A horizontal line is answered, with a slope and an angle of 0. Swapping the two points leaves the slope and the angle unchanged, since both differences change sign together, but pairing the coordinates into the wrong points — x₁ with y₂ — silently describes a different line, and no check on this page can catch it because any four numbers are some line's coordinates. Nothing here is graded: gentle and steep are relative judgements and the page makes none of them. The slope is printed to four decimals and the angle and grade to two, which are display widths shared with the rest of this subcategory rather than claims about precision; a slope of 0.0833 is a rounded 1 in 12, and a survey accurate to the centimetre over a run of a metre will not justify the last digit.
Frequently asked questions
- How do I calculate slope from two points?
- Subtract the y values to get the rise, subtract the x values to get the run, and divide: the slope is (y₂ − y₁) ÷ (x₂ − x₁). Points (0, 0) and (4, 2) give a rise of 2 and a run of 4, so the slope is 0.5. It does not matter which point you call the first one, since swapping them flips both differences and the two negatives cancel — but it does matter that x₁ is paired with y₁.
- How do I turn a slope into degrees?
- Take the arctangent of the slope. A slope of 0.5 gives 26.57 degrees, a slope of 1 gives 45 degrees, and a slope of 10 gives 84.29 degrees. The angle always lands between −90 and 90, because the arctangent does not distinguish the two directions of the line — the line through your two points continues both ways, and the angle describes its steepness rather than pointing along it.
- What does a negative slope mean?
- That the line goes downhill as you read from left to right. Points (2, 5) and (7, 1) drop by 4 over a run of 5, so the slope is −0.8 and the slope angle is −38.66 degrees. The minus sign is not an error and the page does not take an absolute value: it is the difference between a ramp going up and a drain falling away, which are opposite construction details built from the same numbers. The run stays positive; only the rise carries the sign.
- Is a 100 percent grade the same as a 90 degree angle?
- No, and this is the most common mix-up with grades. A 100 percent grade means the rise equals the run, which is a slope of 1 — and that is 45 degrees, not 90. A grade compares the rise with the run, while an angle compares it with the sloping distance itself. Steeper than 100 percent is perfectly possible: a slope of 1.5 is a 150 percent grade and only 56.31 degrees, and the angle only approaches 90 as the grade goes to infinity.
- What if both points have the same x?
- Then the line is vertical and it has no slope. The run is 0 and the division is undefined, so the page says so rather than printing an infinity — the slope of a vertical line is not a very large number but the absence of one. If you meant two distinct points, check the x values; if the line really is vertical, the distance calculator gives the length between them, which is the one thing a vertical line does have.
- How is this different from the elevation grade calculator?
- They compute the same number from different inputs. This page takes two points and subtracts the coordinates itself; the elevation grade calculator takes the rise and the run as two distances you have already measured, which is how grades are written on site — one inch of fall per foot, two centimetres of lift per metre. Points (0, 0) and (12, 1) here give 8.33 percent, the same figure that page gives for an inch of rise per foot of run. Note that the two fields there do not share a unit — the rise is read in inches and the run in feet — so the same ratio is entered there as 1 and 1, not as 1 and 12.
References
- Slope — the rise over the run, with the sign conventions for lines that fall as well as rise, and the relation between the slope, the angle of inclination and the grade — Wolfram MathWorld (United States)
- Line — the straight line through two points, whose direction is the slope this page computes and whose other properties follow from it — Wolfram MathWorld (United States)
- Point-Slope Form — where the slope from two points is used next: the equation of the line through them, which needs a slope and one point — Wolfram MathWorld (United States)
- 教育部关于印发义务教育课程方案和课程标准(2022 年版)的通知——The fifth item in the annex list of this notice is the Mathematics Curriculum Standards for Compulsory Education (2022 edition); the graph and slope of a linear function and how two points relate in the coordinate plane are part of the compulsory-education mathematics curriculum, and the wording of the standards and the grade-band breakdown are governed by that annex — 中华人民共和国教育部