Home › Blog › Slope Calculator Guide

❤ Want to see our calculators more often in Google? Add us as a trusted source:

Slope Calculator: Find Slope, Angle & Line Equation

Calculator200 Editorial Team — published September 2026

A slope calculator answers a question that appears simple but carries real consequences in construction, engineering, and mathematics: how steep is this line? Enter two points, and it returns the slope, the angle of incline, the percent grade, and the full equation of the line. Whether you are checking the grade of a drainage pipe, verifying a wheelchair ramp against ADA standards, or solving coordinate geometry homework, a reliable slope calculator eliminates the guesswork that manual arithmetic introduces. It transforms a handful of coordinates into actionable numbers you can build on, pour concrete against, or submit as part of a design plan.

What the Slope of a Line Really Tells You

Slope measures steepness and direction in a single number. Mathematically, it is the ratio of vertical change to horizontal change between any two points on a line. The vertical component is called the rise; the horizontal component is the run. Divide the rise by the run, and you have the slope.

The sign matters as much as the magnitude. A positive slope means the line rises as you move from left to right. A negative slope means it falls. A slope of zero belongs to a perfectly horizontal line. An undefined slope — the result of dividing by zero — belongs to a vertical line. These four cases cover every straight line you will ever encounter.

In real-world terms, the slope tells you how much effort or material a task requires. A shallow slope moves water slowly. A steep slope sheds it quickly but erodes soil. A ramp with a gentle slope is accessible; one that is too steep becomes a barrier. The number is not abstract — it determines whether a design works or fails.

The Slope Formula: Rise Over Run

The slope formula takes two points and returns the slope. Given points (x₁, y₁) and (x₂, y₂), the slope m is:

m = (y₂ − y₁) / (x₂ − x₁) = Δy / Δx

Subtract the first y-coordinate from the second, then divide by the second x-coordinate minus the first. The order of subtraction must be consistent. If you start with the first point for y, you must start with the first point for x as well. Reversing one and not the other gives you the negative of the correct slope — a mistake that changes the direction of your line.

Work through an example. Take the points (2, 3) and (8, 11). The rise is 11 − 3 = 8. The run is 8 − 2 = 6. The slope is 8/6, which simplifies to 4/3 or approximately 1.333. A free slope calculator performs this subtraction and simplification instantly, including the cases where the run is zero or the coordinates contain negative numbers.

Slope, Gradient, and Grade: Same Idea, Different Names

Three terms describe the same ratio, and the distinction lies in how the number is expressed. Slope and gradient are mathematical terms for rise over run, usually written as a fraction or decimal. Grade is the same ratio multiplied by 100 to express it as a percentage.

A slope of 0.05 is a 5% grade. A slope of 1 is a 100% grade, which corresponds to a 45-degree angle. This equivalence is useful because different professions prefer different conventions. Mathematicians write slope as m = 0.05. Civil engineers and road designers specify a 5% grade. Roofers use pitch ratios like 4/12, which is the same concept expressed as rise per 12 inches of run.

Slope (m)Percent GradeAngle (degrees)Common Context
0.011%0.57°Drainage pipes, minimum grades
0.055%2.86°Roads, parking lots, accessible routes
0.08338.33%4.76°ADA maximum ramp slope (1:12)
0.2525%14.04°Steep driveway, roof pitch 3/12
0.5050%26.57°Roof pitch 6/12, steep hill
1.00100%45.00°45-degree angle, very steep terrain

Converting between these formats is straightforward. To go from slope to percent grade, multiply by 100. To go from slope to angle, take the inverse tangent (arctan) of the slope. To go from percent grade back to angle, divide by 100 first, then take the arctangent. A slope and grade calculator handles all three conversions from a single set of inputs.

Slope in Construction: Ramps, Drainage, and Roofs

Construction professionals use slope calculations daily, and the tolerances are tight. A ramp that is slightly too steep fails an accessibility inspection. A drainage pipe with insufficient fall backs up. A roof with the wrong pitch leaks.

Wheelchair Ramps and ADA Compliance

The Americans with Disabilities Act sets a maximum running slope of 1:12 for ramps, which is 8.33% or approximately 4.76 degrees. That means for every inch of vertical rise, a ramp must have at least 12 inches of horizontal run. A 6-inch rise requires a 6-foot ramp. A 30-inch rise requires a 30-foot ramp — and the ADA also limits the maximum rise of any single ramp run to 30 inches before a landing is required.

The U.S. Access Board recommends designing ramps at 7.5% or lower when possible. A ramp that is slightly below the maximum is easier to navigate, especially for manual wheelchair users and people with limited stamina. Cross slope — the side-to-side tilt — must not exceed 1:48, or about 2.08%, because a steep cross slope pulls a wheelchair toward the downhill edge.

Drainage Pipe Slope

Drainage relies on gravity, and gravity needs a slope. The International Plumbing Code specifies minimum slopes for horizontal drain pipes: 1/4 inch per foot for pipes 2 inches and smaller, 1/8 inch per foot for pipes 3 to 6 inches, and 1/16 inch per foot for 8-inch and larger pipes. These minimums ensure that water flows fast enough to carry solids without leaving them behind.

A pipe that is too flat allows solids to settle and clog the line. A pipe that is too steep allows water to drain away too quickly, leaving solids stranded. The goal is a slope that produces a self-cleansing velocity — typically around 2 feet per second. A pipe slope calculator converts between inches per foot, percent grade, and ratio, making it easy to verify a design against code requirements before trenching begins.

Roof Pitch

Roof pitch is expressed as a ratio of rise to 12 inches of run. A roof that rises 4 inches over a 12-inch horizontal span has a 4/12 pitch. To convert roof pitch to grade, multiply the rise by 100 and divide by 12. A 4/12 pitch is a 33.3% grade. To convert to angle, take the arctangent of the rise divided by 12. A 4/12 pitch is approximately 18.4 degrees.

The pitch determines the roofing material that can be used. Asphalt shingles typically require a minimum pitch of 2/12 or 4/12, depending on the manufacturer. Lower pitches need rolled roofing or a membrane. Getting the pitch wrong means water infiltration and premature roof failure.

Calculating Slope in Excel and Google Sheets

Spreadsheet users have two functions at their disposal. The first is the SLOPE function, which takes two ranges of cells and returns the slope directly:

=SLOPE(known_ys, known_xs)

Enter your y-values in one column and your x-values in another, then point the function at both ranges. The order of the arguments is important: y-values first, x-values second. Reversing them returns the reciprocal of the slope, which is almost never what you want.

The second approach is manual, using the same formula you would apply by hand:

=(B2-B1)/(A2-A1)

This subtracts the first y from the second and divides by the second x minus the first. It is transparent and easy to audit, which makes it preferable when you need to show your work. For anything beyond a single calculation, the SLOPE function is faster and less error-prone.

The SLOPE function returns the same result regardless of how many data points you include, as long as they lie on a straight line. If the points do not fall on a perfect line, SLOPE returns the slope of the line of best fit — the linear regression line that minimises the distance to all points.

Slope Intercept Form and the Equation of a Line

Once you know the slope and the y-intercept, you can write the equation of the line in slope-intercept form:

y = mx + b

Here, m is the slope and b is the y-intercept — the point where the line crosses the vertical axis. Given two points, you can find b by substituting one point into the equation after calculating m. Using the points (2, 3) and (8, 11): the slope is 4/3. Substitute (2, 3): 3 = (4/3)(2) + b. That gives 3 = 8/3 + b, so b = 3 − 8/3 = 1/3. The equation is y = (4/3)x + 1/3.

A slope intercept form calculator performs this algebra in one step. Enter two points, and it returns the slope, the y-intercept, and the complete equation — often in multiple forms, including point-slope and standard form.

Slope Stability and Geotechnical Applications

In civil engineering, slope stability analysis determines whether a soil or rock slope will remain stable under its own weight and under imposed loads. The factor of safety is the ratio of resisting forces to driving forces. A factor of safety above 1.5 is typically required for permanent slopes; temporary slopes may accept lower values.

Slope stability calculations consider soil cohesion, internal friction angle, unit weight, pore water pressure, and the geometry of the slope. Software packages implement methods such as Bishop's simplified method or the Q-slope empirical method. A slope calculator that handles basic geometry is the starting point; specialised stability software takes the analysis further when the stakes are higher.

Frequently Asked Questions

What does the slope of a line actually tell me?

The slope tells you how steep a line is and in which direction it runs. A positive slope means the line rises as you move right, a negative slope means it falls. The steeper the line, the larger the absolute value of the slope. A slope of zero is a perfectly horizontal line, and an undefined slope belongs to a vertical line.

How do I find the slope from two points?

Use the formula m = (y₂ − y₁) / (x₂ − x₁). Subtract the first y-coordinate from the second, then divide by the second x-coordinate minus the first. The order matters: if you start with the first point for y, stay consistent for x.

What is the difference between slope, gradient, and grade?

In coordinate geometry, slope and gradient are the same thing: rise over run. Grade is the same ratio multiplied by 100 to express it as a percentage. So a slope of 0.05 is a 5% grade. Engineers and road designers typically use percent grade, while mathematicians use the term slope.

What slope does the ADA require for wheelchair ramps?

The Americans with Disabilities Act sets a maximum running slope of 1:12 for ramps, which works out to 8.33%. That means for every inch of vertical rise, you need at least 12 inches of horizontal run. Many designers aim for 7.5% or lower to make ramps easier to use.

How do I convert slope percentage to degrees?

Divide the percent grade by 100 to get the rise-over-run ratio, then take the inverse tangent (arctan) of that ratio. For example, a 50% grade is 0.5 as a ratio, and arctan(0.5) equals approximately 26.6 degrees.

What is the minimum slope for drainage pipes?

The International Plumbing Code specifies a minimum slope of 1/4 inch per foot for pipes 2 inches and smaller, 1/8 inch per foot for pipes 3 to 6 inches, and 1/16 inch per foot for 8-inch and larger pipes. These minimums ensure water flows without solids settling.

What is roof pitch and how is it different from slope?

Roof pitch is expressed as a ratio of rise to 12 inches of run, like 4/12 or 9/12. Slope is the same concept but usually written as a decimal or percentage. A 4/12 pitch converts to a 33.3% grade or about 18.4 degrees.

Can a slope be negative?

Yes. A negative slope means the line falls as you move from left to right. If you are walking uphill in the direction of positive x, the slope is positive; walking downhill gives a negative slope. In real-world applications, the sign tells you the direction of elevation change.

In sum, a slope calculator converts coordinates into meaningful information. It tells you how steep a line is, which way it runs, and what that means in practical terms — whether a ramp meets accessibility standards, a drainage pipe will flow, or a roof will shed water. The mathematics is not complicated, but the consequences of getting it wrong are. Use the slope calculator above, enter your two points, and treat the output as what it is: a precise measure of steepness that you can act on with confidence.