Solved.tools: Free Online Calculators & Tools

We use cookies for analytics and advertising. Learn more about our cookie policy

Slope Calculator

Last updated: 27 June 2026

Reviewed by Gavin Meiring, Lead research and primary author ยท Doctoral Candidate (Corporate Governance) ยท Research and drafting assisted by AI

Was this helpful?


Slope Calculator

A slope calculator finds the gradient (slope) of a line given two points, a point and an angle, or a rise and run measurement. It is used by students, surveyors, architects, engineers, and construction professionals working with inclines, gradients, and linear equations.

How to Use the Slope Calculator

  1. Select your input method: two coordinate points, rise and run values, or angle in degrees.
  2. Enter the required values. For two points, enter x1, y1, x2, and y2.
  3. Click Calculate to see the slope (gradient), angle in degrees, percentage grade, and the equation of the line.
  4. Use the visual display to confirm the direction of the slope (positive or negative).
  5. Switch to the line equation mode to find the y-intercept and full equation in slope-intercept form.

The Formula

Slope (m) = (y2 minus y1) divided by (x2 minus x1), also written as rise divided by run. A positive slope rises from left to right; a negative slope falls from left to right. A horizontal line has slope 0; a vertical line has undefined slope. The slope-intercept form of a line is y = mx plus b, where m is slope and b is the y-intercept. The angle of inclination = arctan(m). Percentage grade = (rise divided by run) multiplied by 100. Ratio grade expresses the same as "1 in n", where n = run divided by rise.

Real-World Example

A road rises 8 m vertically over a horizontal distance of 200 m. Slope = 8 divided by 200 = 0.04. Angle = arctan(0.04) = 2.29 degrees. Percentage grade = (8 divided by 200) multiplied by 100 = 4%. Ratio grade = 1 in 25 (200 divided by 8 = 25). In practice this is a moderately steep road; most major roads are designed with grades below 6 to 8 percent.

Slope in Construction and Engineering

Building regulations in the UK specify maximum gradient for ramps accessible to wheelchair users: no steeper than 1 in 20 (5 percent) for extended lengths. Drainage pipes are typically laid at a minimum gradient of 1 in 80 (1.25 percent) to ensure self-cleansing flow. Staircases typically rise at a slope of approximately 35 to 42 degrees. Road design limits depend on speed category; motorways are typically limited to 4 percent maximum grade. Solar panels are often installed at 30 to 35 degrees from horizontal to optimise energy capture in the UK.

Conversion Table: Slope, Angle, and Grade

The three ways of expressing steepness convert cleanly. Slope is the dimensionless ratio rise/run. Angle is arctan(slope). Percent grade is slope x 100. The table shows common conversions.

SlopeAngle (degrees)Percent gradeRatio
1.00045.00100%1 in 1
0.50026.5750%1 in 2
0.33318.4333.33%1 in 3
0.25014.0425%1 in 4
0.1257.1312.5%1 in 8
0.1005.7110%1 in 10
0.0834.768.33%1 in 12
0.0502.865%1 in 20
0.0402.294%1 in 25
0.0100.571%1 in 100

The 1 in 12 row is the maximum ramp gradient required for wheelchair access in many accessibility standards, including the UK's Part M and the US ADA. The 1 in 20 row is the gentler gradient used for extended ramps and pavement crossfalls.

Slope in Mathematics Education

The slope concept is the first step into calculus. The slope of a line is the constant rate of change: how much y changes for each unit of x. The derivative generalises this idea to curves, where the slope changes at every point and is found by taking the limit of the rise-over-run ratio as the run shrinks to zero. Understanding slope as a rate of change makes later topics easier. The slope of a distance-time graph is speed; the slope of a speed-time graph is acceleration; the slope of a cost curve is marginal cost. Each of these is the same rise-over-run idea wearing a different label.

Why Slope Matters in Everyday Life

Slope shows up wherever things are measured by steepness. Roofers describe pitch as rise over twelve inches of run. Cyclists talk about gradients as percentages, where 10 percent means rising one metre for every ten metres forward. Ski resorts rate their runs by steepness, and civil engineers design roads, railways, and drainage around maximum allowable gradients. The calculator on this page handles all these representations at once: enter any two values and read the slope, angle, percentage grade, and ratio. That single conversion is why the tool earns its place in construction, surveying, and the classroom.

The Connection to Trigonometry

Slope and trigonometry meet at the angle of inclination. The slope of a line is the tangent of its angle: tan(theta) = rise/run = slope. This single identity connects the calculator's angle mode to its slope mode. Given a 30-degree incline, the slope is tan(30) = 0.577, the grade is 57.7%, and the ratio is 1 in 1.73. Given a slope, the angle is arctan(slope), which is how the calculator converts between the two. The same relationship is used in surveying, where an instrument measures the angle and the surveyor computes the elevation change by multiplying the horizontal distance by the tangent.

Slope and the Equation of a Line

The slope calculator connects directly to the algebra of straight lines. Once you have the slope m, you can build the full equation. The point-slope form, y minus y1 = m(x minus x1), needs one point on the line and the slope. The slope-intercept form, y = mx + b, needs the y-intercept as well. The calculator's line-equation mode does this conversion automatically, which is useful when a problem gives you two points and asks for the equation. Knowing both forms is the difference between computing a number and understanding the line.

Slope in Road Signage

Road signs are the most visible use of slope in daily life. In most of Europe, steep sections are marked with a percentage grade, so a sign reading 10% means the road rises or falls one metre for every ten metres of horizontal distance. Some countries, including the UK, use a 1-in-n ratio on the same kind of sign, where 1 in 10 and 10% mean the same thing. The calculator converts between these formats, which is useful when comparing routes described in different systems or when a foreign sign needs translating into familiar terms.

Frequently Asked Questions

What is the difference between slope, gradient, and grade? They all describe the steepness of a line or surface but are expressed differently. Slope is the ratio of rise to run (a dimensionless number). Gradient means the same thing and is widely used in the UK. Grade (or percent grade) expresses slope as a percentage. A slope of 0.05, a gradient of 0.05, and a grade of 5% all describe the same steepness.

What does a negative slope mean? A negative slope means the line falls as you move from left to right. If you are walking along a path with a negative slope, you are going downhill. In a coordinate system, negative slope means y decreases as x increases.

How do I find the slope if I only know the equation of the line? If the equation is in slope-intercept form (y = mx plus b), the slope is the coefficient m. If the equation is in standard form (Ax plus By = C), rearrange to slope-intercept form: y = (minus A divided by B)x plus (C divided by B). The slope is minus A divided by B.

What is a perpendicular slope? Two lines are perpendicular when they meet at a 90-degree angle. Their slopes are negative reciprocals of each other: if one line has slope m, the perpendicular line has slope minus 1 divided by m. For example, a slope of 2 and a slope of minus 0.5 are perpendicular.

What is a 100% grade? A 100% grade means rise equals run, so the slope is 1 and the angle is 45 degrees. It does not mean vertical. A vertical cliff has infinite slope and an angle of 90 degrees, which no percentage grade can express.

How steep is a 1 in 12 ramp? A 1 in 12 ramp has a slope of 1/12 = 0.0833, an angle of about 4.76 degrees, and a grade of 8.33%. It is the standard maximum gradient for wheelchair ramps in many building regulations, and it is noticeably gentler than a staircase.

How do I find the equation of the line from two points? First find the slope m using the two-point formula. Then substitute one point and the slope into y = mx + b to solve for b, the y-intercept. For example, the line through (1, 3) and (3, 7) has slope (7 minus 3) divided by (3 minus 1) = 2, and using (1, 3): 3 = (2 x 1) + b, so b = 1. The equation is y = 2x + 1.

Why is the slope of a vertical line undefined? Because the run is zero: x2 minus x1 = 0, and division by zero is undefined. As a line approaches vertical, its slope approaches infinity. The angle is 90 degrees, and the percentage grade is infinite, which is why vertical surfaces are described as "plumb" or "sheer" rather than by a grade.


Also try these free tools: