Slope Calculator

–slope m
–as a fraction
–inclination angle
–y-intercept b
GradeDegreesRatioWhere you meet it
4.76%2.7°1:21highway cruise
8.33%4.8°1:12ADA ramp maximum
15%8.5°1:6.7steep-driveway warning zone
100%45°1:1a wall in ski-map terms
Grade-percent is rise per 100 of run; degrees = arctan(grade/100); ratios are what codes use - the ADA ramp cap of 1:12 is 8.33%, one inch of rise per foot. Roads rarely pass 8% because every point costs trucks a gear.
The rulebook for the ratio column: the Access Board's ADA ramp guide sets the 1:12 running-slope cap - the 8.33 percent figure above - and ramps are the one place where slope is written into federal accessibility law rather than left to convention.

Slope is rise over run, and the fraction is where the understanding lives: from (2, 3) to (7, 8) the line rises 5 over a run of 5 - slope 1, a 45° line, clean and exact. Enter any two points and this calculator returns the slope as both decimal and reduced fraction, the inclination angle in degrees, the y-intercept, and the slope any perpendicular line would need - the four numbers algebra homework and roof-pitch questions actually ask for.

The worked note shows the rise-over-run division with your numbers substituted, so the answer demonstrates its own method. Vertical lines are handled as the special case they are - undefined slope, 90°, no intercept - rather than crashing into a division by zero. Points are remembered between visits for multi-part problems, and the page sits with the fraction and degrees-radians tools in the study corner.

How to use

  1. Enter the x and y of both points.
  2. Read the slope as decimal and fraction, plus angle and y-intercept.
  3. Use the perpendicular slope in the note for parallel/perpendicular questions.

Worked examples

Two points, the fraction the calculator prints

From (1, 2) to (4, 8): slope = (8 - 2) / (4 - 1) = 6/3 = 2. The calculator also reduces it as a fraction - here 2/1, which reads '2 up for every 1 across'. Swapping the points gives (2-8)/(1-4) = -6/-3 = 2 again: order of points never changes the slope, only the direction you walked it does.

The horizontal line and its zero

From (2, 3) to (7, 3): slope = (3 - 3) / (7 - 2) = 0/5 = 0. Five units of run, zero rise. This is also the slope every driveway and storm drain is specified against - the 'flat' that is never quite 0.00 in practice, which is why drainage specs say 1-2 percent instead of zero: water needs a number to obey.

A steep pair and its angle

From (0, 0) to (2, 5): slope = 5/2 = 2.5, which as a percent is 250 percent and as an angle is arctan(2.5) = about 68.2 degrees. Notice the percent outran the degrees - percent is unbounded while degrees stop at 90. A vertical wall is 'infinite percent' but exactly 90 degrees, which is the clearest way to see why the two scales agree on steepness yet never on size.

Good to know — Slope, grade and angle are three languages for one ratio: rise over run. Grade-percent is rise per 100 of run (a 10% grade climbs 10 feet per 100), degrees is the same ratio passed through arctangent, and the ratio form (1:12) is what building codes and ramps actually use - the classic ADA ramp maximum is 1:12, which is 8.33%, about 4.8 degrees. The languages diverge fast as terrain steepens: a 45-degree wall is a 100% grade, and 30 degrees - which looks modest on a ski map - is already a 58% grade that ordinance maps call extreme. Roads rarely exceed 6-8% because every extra percent costs trucks a gear; driveways start worrying around 15% and garages around 20% with the right transitions.
Quick reference — Convert with the two buttons you actually remember: percent x 100 divided by run gives rise; degrees = arctan(percent/100). The 1:12 ramp rule is the one worth memorizing - one inch of rise per 12 inches of run - because it recurs in codes, wheelchairs, and moving-day reality: a 24-inch porch needs 24 feet of ramp, which is why switchbacks exist.

Frequently asked questions

What is the slope formula?

m = (y₂ - y₁) / (x₂ - x₁) - the vertical change between the points divided by the horizontal change. From (2, 3) to (7, 8): (8-3)/(7-2) = 5/5 = 1. The note line reproduces exactly this substitution with your values.

What does a negative slope mean?

The line falls as it moves left to right - downhill in standard reading order. Positive slopes rise, zero slopes run horizontally (both y values equal), and undefined slopes are vertical (both x values equal). The direction is named in the result note.

How do I find the y-intercept from two points?

Solve y = mx + b with one of your points: b = y₁ - m·x₁. The calculator does this and hands you the full line equation, which is usually the second half of the same homework problem.

How are slope and angle related?

The inclination angle is the arctangent of the slope: slope 1 is 45°, slope √3 ≈ 1.732 is 60°, and roofers flip the relationship - a 6:12 pitch means slope 0.5, about 26.57°. The angle stat connects the algebra view with the physical one.

How do I convert slope between ratio, percent and degrees?

All three describe the same rise-over-run. Ratio 1:2 means 1 unit up per 2 across = 0.5. Percent multiplies by 100: 0.5 = 50 percent slope. Degrees take the arctangent: arctan(0.5) = 26.57 degrees. Roofers' pitch is the same language with a fixed denominator - a 6/12 pitch is 6/12 = 0.5, so 50 percent, so 26.57 degrees. One number, three costumes; pick whichever your trade speaks and the others are one line of arithmetic away.

Related tools