Slope Calculator

Updated

Slope calculator for rise over run, two points, pipe inverts or a line equation, giving percent grade, angle in degrees, 1 in N ratio, inches per foot and sloped length of the run.

Quick Setup

Enter any two points on the line. Negative and decimal coordinates work.

ft
Slope (m) of the Line
m = 3/4 Rising Line
Positive slope: the line climbs from left to right
(0, 1.25) y-Intercept
Line equationy = 0.75x + 1.25
x-intercept(-1.6667, 0)
Where your line crosses each axis, plus its slope-intercept equation, ready to plot or to check your own homework answer.
36.87° Slope Angle
Percent grade75.00%
Angle in radians0.6435 rad
The same line steepness written as an angle, a grade or a plain number, all found from rise over run.
10 Distance Between Points
Midpoint(5, 5)
Rise and runUp 6, right 8
Straight-line length between your points by the Pythagorean theorem, plus the exact midpoint and the rise and run between them.
-4/3 Perpendicular Slope
Point-slope formy - 2 = 0.75(x - 1)
Perpendicular through P₁y = -1.3333x + 3.3333
Perpendicular lines meet at 90° and use the negative reciprocal slope. Point-slope form writes your line through its first point.
Slope GraphYour line and points
Step-by-Step Slope MathWith your numbers
1Slope formula: m = (y₂ - y₁) ÷ (x₂ - x₁)
Rising Line
A slope of 3/4 means the line climbs 3 units for every 4 units across. Parallel lines share this slope; perpendicular lines use -4/3.

Slope Calculator Math From Two Points

Slope is the vertical change divided by the horizontal change between two points on a line. Every slope calculator answer starts here: subtract the y values, subtract the x values in the same order, then divide.

Here m is the slope, y2 - y1 is the rise and x2 - x1 is the run. Either point can go first, as long as both differences start from that same point.

Take (-3, 7) and (5, 1). The rise is 1 - 7 = -6 and the run is 5 - (-3) = 8, so the slope is -6/8 = -3/4. The line falls 3 units for every 4 across, at an angle of -36.87°.

The same pair finishes a full homework answer from two points. The y-intercept is b = 7 - (-0.75)(-3) = 4.75, so the line is y = -0.75x + 4.75, and it meets the x-axis at (6.3333, 0).

The distance between the points is √(8² + 6²) = 10 and the midpoint is (1, 4). The perpendicular slope is the negative reciprocal, 4/3, so the perpendicular line through (-3, 7) is y = 1.3333x + 11.

Four point pairs cover every kind of line a slope calculator from two points can meet. Negative and decimal coordinates follow the same subtraction, so watch the sign on each one.

PointsRiseRunSlopeAngleLine
(1, 2) and (9, 8)683/436.87°Rising
(-3, 7) and (5, 1)-68-3/4-36.87°Falling
(2, 4) and (7, 4)0500°Horizontal
(3, 1) and (3, 6)50Undefined90°Vertical

A slope calculator result of 0 and one marked undefined describe different lines. A horizontal line has no rise, so its slope is exactly 0, while a vertical line has no run and the division has no answer at all.

Percent, Degrees and Ratio Side by Side

Percent grade is rise over run times 100, and the angle in degrees is the arctangent of that same ratio. The two drift apart fast, so a 45% grade is only 24.23°, while a 45° angle is a 100% grade.

G is the percent grade. Rise and run must be in the same unit before dividing, so 6 in over 10 ft is 6 ÷ 120 = 5%, not 60%.

θ is the angle above level. For a slope calculator with angle input, percent equals 100 × tan(θ), so 1° is 1.75%, 5° is 8.75%, 10° is 17.63% and 30° is 57.74%.

Each row below is one steepness written five ways. Any slope calculator percentage result can be read across a row to match a plan, a level reading or a metric drawing.

Percent gradeDegreesRatio (1 in N)Inches per footmm per meter
0.5%0.29°1 in 2000.06 in5 mm
1%0.57°1 in 1000.12 in10 mm
2%1.15°1 in 500.24 in20 mm
5%2.86°1 in 200.60 in50 mm
6%3.43°1 in 16.670.72 in60 mm
8.33%4.76°1 in 121.00 in83.3 mm
10%5.71°1 in 101.20 in100 mm
25%14.04°1 in 43.00 in250 mm
50%26.57°1 in 26.00 in500 mm
100%45.00°1 in 112.00 in1,000 mm

Inches per foot is also a roof pitch over 12, so a 6/12 roof is the 50% row at 26.57°. For a roof slope calculator check, divide the pitch by 12 and multiply by 100 to get the grade.

As a deck slope calculator check, a deck pitched ⅛ in per foot away from the house is a 1.04% grade and drops 1½ in over a 12 ft depth. At ¼ in per foot the same deck drops 3 in, which is the 2.08% grade.

Ratios That Read Backwards: 1 in N vs N:1

A ratio written "1 in 20" puts the rise first, meaning 1 up for every 20 across, or 5%. Earthwork plans flip the order and write horizontal to vertical. A 2:1 bank in any slope calculator ratio check runs 2 across for every 1 up.

That H:V order comes straight from OSHA 29 CFR 1926 Subpart P, Appendix B. Its Table B-1 sets the steepest trench walls under 20 ft deep at ¾:1 (53°) for Type A soil, 1:1 (45°) for Type B and 1½:1 (34°) for Type C.

H:V ratioRise per 1 acrossPercent gradeDegrees
¾:11.333133.33%53.13°
1:11.000100.00%45.00°
1½:10.66766.67%33.69°
2:10.50050.00%26.57°
3:10.33333.33%18.43°
4:10.25025.00%14.04°

Ramp and road notes use the rise-first style instead, so a 1:12 ramp is 8.33%, not 1,200%. Before any slope calculator ratio answer goes on a drawing, check the plan legend for which number is horizontal.

Fall Between Two Inverts

Slope from two elevations is the fall divided by the level distance between them. Pipe inverts at 100.00 ft and 99.50 ft, set 40 ft apart, fall 0.50 ft, which is 1.25%, 0.15 in per foot or 1 in 80.

The mid-run invert sits at 99.75 ft, and the pipe drops 1½ in every 10 ft. A slope calculator with start and end invert values gives both, so a crew can set stakes or a string line without a second level shot.

Fall per foot decides whether a drain passes. In the 2021 International Plumbing Code, Table 704.1, horizontal drain pipe 2½ in and smaller needs ¼ in per foot, 3 to 6 in pipe needs ⅛ in, and 8 in and larger needs 1/16 in.

So the 0.15 in per foot run above passes for a 4 in building drain but fails for a 2 in branch line, the kind of pipe slope calculator check that catches a failed inspection early. The table gives the total fall each minimum needs over common runs.

Run¼ in per ft (2.08%)⅛ in per ft (1.04%)1/16 in per ft (0.52%)
10 ft2½ in1¼ in⅝ in
20 ft5 in2½ in1¼ in
40 ft10 in5 in2½ in
60 ft1 ft 3 in7½ in3¾ in
100 ft2 ft 1 in1 ft ½ in6¼ in

For a concrete slope calculator figure, a patio or garage slab sloped ¼ in per foot falls 3 in over 12 ft. In metric, 1% is 10 mm per meter, so a 5 m slab at 1% falls 50 mm.

For drop per foot on its own, the Slope Per Foot Calculator works the total fall over any run, in inches per foot or millimeters per meter.

For grades between surveyed ground points rather than pipe inverts, the Elevation Grade Calculator fits the job. A road profile that changes grade over its length needs the Vertical Curve Calculator instead of one straight slope.

Ramp and Sidewalk Slope Limits

Under the 2010 ADA Standards for Accessible Design, a walking surface steeper than 1:20 (5%) counts as a ramp. A ramp run may be no steeper than 1:12 (8.33%), and cross slope stays at 1:48 (2.08%) or less.

At exactly 1:12, the minimum run in feet equals the rise in inches. Each ramp run may rise 30 in at most and needs a level landing at the top and bottom, and runs that rise more than 6 in need handrails on both sides.

RiseMinimum run at 1:12Sloped lengthHandrails needed
6 in6 ft6 ft ¼ inNo
12 in12 ft12 ft ½ inYes
18 in18 ft18 ft ¾ inYes
24 in24 ft24 ft 1 inYes
30 in30 ft30 ft 1¼ inYes

A 36 in rise can't be one run, since it passes the 30 in cap. It needs two runs of 18 ft each with a landing between, so plan the space before pouring. The Ramp Slope Calculator checks a ramp against a target ratio.

A sidewalk with a running slope of 5% or less is not a ramp, and a 6% walk is. Its cross slope limit of ¼ in per foot means a 5 ft wide walk may drop only 1¼ in from edge to edge. The Sidewalk Slope Calculator checks both directions at once.

These are US rules for public and commercial sites. Other countries set their own ramp and walkway limits, so a slope calculator result for a project abroad should be checked against the local building code.

Sloped Length Is Not the Run

Percent grade always uses the level run, never the distance along the surface. The sloped length is the long side of the right triangle, and it is the number to order decking, membrane, handrail or pipe by.

L is the sloped length, and both rise and run must share one unit in any slope calculator setup. Dividing L by the run gives a length factor that scales any run to the material length needed along the slope.

True gradeLength factorExtra length per 100 ft of runGrade if sloped length is used as run
5%× 1.00120.12 ft4.99%
10%× 1.00500.50 ft9.95%
25%× 1.03083.08 ft24.25%
50%× 1.118011.80 ft44.72%
100%× 1.414241.42 ft70.71%

On gentle grades the mix-up barely shows, but a tape pulled down a 50% bank makes it read 44.72%. On a steep site, measure the run level or convert the taped length before any slope calculator rise over run answer is trusted.

Equations of a Line and Their Slopes

In y = mx + b the slope is the number in front of x. In standard form Ax + By = C the slope is -A/B and the y-intercept is C/B, so no rearranging is needed to read it.

A and B are the x and y coefficients once both terms sit on the left side. For 2x + 3y = 6, A is 2 and B is 3, so the slope is -2/3, the y-intercept is 2 and the line falls at -33.69°.

The same line looks different in each textbook layout. Whichever form the line arrives in, the slope stays -2/3, as the rows below show.

Form2x + 3y = 6 written as
Slope-intercepty = -0.6667x + 2
Standard2x + 3y = 6
General2x + 3y - 6 = 0
Point-slope through (1, 1.3333)y - 1.3333 = -0.6667(x - 1)
Interceptx/3 + y/2 = 1

In a slope calculator from equation work, x = 5 has B = 0, so it is a vertical line with an undefined slope. The line y = 4 has a slope of 0, and terms such as x² or xy make a curve that has no single slope.

Answers on Steepness, Degrees and Ratios

Percent and degrees only stay close on gentle grades, and a ratio changes meaning with its order. Each answer gives the number in more than one form so it can be matched to a plan or a textbook.

How do I calculate my slope?

Divide the rise by the run between two points. For (0, 1) and (3, 7), the rise is 7 - 1 = 6 and the run is 3 - 0 = 3, so the slope is 6 ÷ 3 = 2, a 200% grade at 63.43°.

For a slope calculator graph check, find two points where the line crosses grid corners, count squares up or down for the rise, then count squares across for the run. Counting down gives a negative rise and a falling line.

For a physical slope, measure the height change and the level distance in the same unit. A 3 in rise over 4 ft is 3 ÷ 48 = 0.0625, or 6.25%, and multiplying by 100 is the step most people miss.

What is a 1 in 100 slope?

A 1 in 100 slope rises or falls 1 unit for every 100 units across, which is a 1% grade at 0.57°. It equals 10 mm per meter, so a 25 m drain run at 1% falls 250 mm.

In US units it is 0.12 in per foot, just under the ⅛ in per foot minimum (1.04%) the plumbing code sets for 3 to 6 in drain pipe.

A 1% slope in mm is the same 10 mm per meter on any length, a figure worth keeping beside any slope calculator percentage reading.

How steep is a 6% slope?

A 6% slope is 3.43°, or 1 in 16.67, and it climbs 6 ft for every 100 ft across. That is steeper than the 5% point where an ADA walkway becomes a ramp, but gentler than the 8.33% ramp maximum.

A 70% slope is far steeper at 34.99°, rising 8.4 in per foot. It sits between OSHA's 1½:1 (66.67%) limit for Type C soil and the 1:1 (100%) limit for Type B, so it is a bank, not a walking surface.

What's a 2% slope in degrees?

A 2% slope is 1.15°, and a 5% slope is 2.86°. Below about 10%, degrees come out close to percent × 0.573, which stays within 0.02° of the exact arctangent up to a 10% grade.

In slope calculator decimals, a 2% slope is 0.02, or 0.24 in per foot, just under the 2.08% (¼ in per foot) cross slope limit on accessible walks. That makes 2% a common target with a little room for finishing tolerance.

What is a 1 to 1.5 slope?

It depends on which number is horizontal. Read as rise to run, 1 to 1.5 is 1 up for 1.5 across, a 66.67% grade at 33.69°, which is the same steepness as OSHA's 1½:1 H:V wall for Type C soil.

Read as H:V, 1 to 1.5 means 1 across for 1.5 up, a 150% grade at 56.31°. A 2 to 1 slope on an earthwork plan is 2 across for 1 up, or 50% at 26.57°, while 2 up for 1 across would be 200% at 63.43°.

How to find the slope of a line in physics?

Divide the change on the vertical axis by the change on the horizontal axis, and keep the units. On a position-time graph from (0 s, 2 m) to (4 s, 14 m), the slope is 12 m ÷ 4 s = 3 m/s, which is the velocity.

On a velocity-time graph the slope is acceleration in m/s², and on a force-stretch graph it is the spring constant in N/m.

Unlike a plain math line, a physics slope is rarely unitless, so carry the units through any slope calculator using two points from a lab graph.