HomeMathSlope Calculator

Last updated: August 21, 2026

Slope Calculator

Twelve connected tools covering every way slope is measured — from raw coordinates to percent grade, degrees, ratios, roof pitch and driveway grading. Calculate any card independently, or let results flow automatically into the next.
1
Slope Calculator (Two Points)Anchor card
Enter any two coordinates and get the slope instantly, using the rise-over-run formula every other card in this suite builds on.
Slope (m)
Rise (Δy)
Vertical change between the two points. In daily use, this is "how much higher" — a bigger rise means the path climbs more over the same distance.
Run (Δx)
Horizontal change between the two points — think of it as "how far across." A longer run for the same rise means an easier, gentler climb.
Direction
Tells you whether the line climbs, falls, stays flat, or is a vertical wall with no defined slope.
Slope as Fraction
The simplified rise/run ratio — the quickest way to sketch this line by hand: from any point, count over the bottom number and up the top number.
Everyday Take
Interactive coordinate plane — hover to read exact coordinates along the line. Drag the + / − controls to zoom the grid.
Formula & Step-by-Step
Slope formula
m = (y₂ − y₁) / (x₂ − x₁)
    Expert commentary. Slope is the single most-used measurement in coordinate geometry — it's the same rise-over-run logic that later determines a road's percent grade, a roof's pitch, and a ramp's ADA compliance further down this page. Getting this first number right keeps every downstream conversion accurate.
    Formula reference: rise-over-run definition follows standard Algebra I/II coordinate geometry (Khan Academy, OpenStax Algebra).
    2
    Slope-Intercept Form Calculator
    Turns a slope into the y = mx + b equation used to graph or predict values. Slope and point auto-fill from Card 1.
    Full Equation
    Y-Intercept (b)
    The point where the line crosses the vertical axis, when x equals zero. This anchors the equation.
    X-Intercept
    The point where the line crosses the horizontal axis, when y equals zero. Undefined for horizontal lines.
    Everyday Take
    Graph with both intercepts labeled — hover the axis markers to confirm exact crossing points.
    Formula & Derivation
    Slope-intercept form
    b = y − (m × x)
    y = mx + b
    x-intercept = −b / m
    Expert commentary. Slope-intercept form is the most common way to graph a line by hand: plot b on the y-axis, then use the slope to step to the next point. It's also the format most graphing calculators and spreadsheet trendlines expect.
    3
    Point-Slope Form Calculator
    Builds y − y₁ = m(x − x₁) directly from a slope and a single point — the form most Algebra courses test first.
    Off
    On
    On
    Off
    Point-Slope Equation
    Everyday Take
    Graph with the anchor point and slope triangle drawn — hover the triangle legs to see rise and run.
    Step-by-Step Derivation
      Expert commentary. Point-slope form is the fastest way to write a line's equation when you only know one point and the steepness — no need to solve for the y-intercept first. It expands algebraically into the same slope-intercept equation Card 2 produces.
      4
      Rise Over Run Calculator
      Strips slope to its most physical form — how far up for how far across — the way it's taught before formulas appear.
      On
      Off
      Slope (Rise ÷ Run)
      Steepness
      Rated against standard grade bands used across the road, trail and construction industries.
      Simplified Ratio
      Rise and run reduced to their smallest whole-number form using the greatest common divisor.
      Everyday Take
      Animated staircase diagram — each step's height and depth is drawn to scale. Hover a step for its exact rise/run.
      Expert commentary. Rise over run is the physical intuition behind every other number in this suite: percent grade, degrees, and ratio notation are all just different ways of labeling this same staircase.
      5
      Slope Percentage (Percent Grade) Calculator
      Converts a slope ratio into the percent-grade format used on road signs, trail apps and civil-engineering drawings.
      Percent Grade
      Equivalent Decimal Slope
      The raw rise/run ratio before converting to a percentage — multiply by 100 to get the grade.
      Difficulty Flag
      A general road and trail difficulty rating based on common civil-engineering grade bands.
      Everyday Take
      Road-sign style gauge with color-coded grade bands — hover the needle arc to read the exact percent at any point.
      Expert commentary. Percent grade is the standard on US and UK road signage and hiking apps because it scales intuitively: a 10% grade means 10 feet of rise for every 100 feet traveled, regardless of unit system.
      6
      Slope to Degrees (Angle) Calculator
      The most-searched conversion in the niche — turns a percent grade or ratio into the actual angle of inclination.
      Slope → Degrees
      Degrees → Slope
      Angle
      Slope %
      The same steepness re-expressed as a percent grade for cross-checking against Card 5.
      Decimal Slope
      The tangent of the angle — this is the raw slope value m used throughout the suite.
      Everyday Take
      Live protractor with a rotating angle indicator — hover the arc to see the degree value at that position.
      Expert commentary. Degrees and percent grade are not linearly related — a 100% grade is a 45° angle, not 90°. This nonlinearity is why steep trail warnings jump quickly in degrees even when the percent number looks moderate.
      7
      Slope Ratio Calculator (X:1 / N-in-M)
      Converts slope into the ratio notation used on ADA ramp specs, retaining-wall drawings and earthworks callouts.
      Ratio Notation
      Equivalent Percent
      The same slope re-expressed as a percent grade for cross-checking against road and trail specs.
      Equivalent Degrees
      The angle of inclination that this ratio represents, useful for CAD and site-plan annotations.
      Select a preset and calculate to see a code-compliance check.
      Everyday Take
      Engineering blueprint-style diagram — hover the ratio triangle to see rise and run at scale, color-coded against the preset limit.
      Expert commentary. Ratio notation is preferred in construction drawings because it avoids decimals on the job site: a framer can measure "1 in 12" with a tape measure far more easily than "8.33%."
      8
      Gradient Calculator — All-in-One Converter
      Drop in a value in any format and instantly see it in percent, degrees, ratio and decimal slope, all synced together.
      FormatValueMeaning
      Percent GradeRise per 100 units of run
      Angle (Degrees)Angle above horizontal
      Ratio (X:1)Run units per 1 unit of rise
      Decimal Slope (m)Raw rise/run value
      Everyday Take
      Four synced dashboard dials — percent, degrees, ratio and decimal all move together. Hover any dial for its exact reading.
      Expert commentary. This hub exists because every trade speaks a different slope dialect: engineers use decimal slope, roofers use ratio, road crews use percent, and surveyors use degrees. Converting once here avoids translation errors downstream.
      9
      Roof Pitch / Roof Slope Calculator
      The construction application of slope-to-angle math, expressed the way roofers spec a roof — rise per 12 inches of run.
      Rise per 12"
      Span & Height
      On
      Off
      Roof Pitch
      Angle
      The roof surface's angle from horizontal — steeper roofs shed water and snow faster.
      Percent Grade
      The same pitch expressed as a percent grade, useful when comparing to civil-engineering drawings.
      Calculate to see material suitability.
      Everyday Take
      House silhouette with the roof triangle highlighted to scale — hover the slope face for pitch and angle.
      This calculator provides general estimates based on standard mathematical and engineering formulas and is not a substitute for a licensed surveyor, structural engineer, or local building-code review — especially for roofing projects subject to code compliance.
      Expert commentary. Most residential asphalt shingle roofs fall between 4/12 and 9/12 — steep enough to shed water, shallow enough to walk safely during installation and maintenance.
      10
      Driveway & Land Grading Slope Calculator
      Applies percent-grade math to driveways, drainage ditches and yard grading, where max-slope codes actually matter.
      Grade
      Angle
      The incline expressed in degrees — anything above roughly 17° starts to feel steep underfoot.
      Ratio
      The same grade in X:1 ratio form, the format most site-grading permits reference.
      Calculate to see the code-compliance check.
      Everyday Take
      Top-down site-plan view with color-coded slope zones (green/yellow/red) — hover any zone to see its grade band.
      Within typical limits Needs review Exceeds recommended max
      This calculator provides general estimates based on standard mathematical and engineering formulas and is not a substitute for a licensed surveyor, structural engineer, or local building-code review — especially for driveway, ADA-ramp, or drainage projects subject to code compliance.
      Expert commentary. Most residential codes treat 15–20% as the practical ceiling for a paved driveway before requiring engineering review; steeper grades struggle with vehicle traction and winter ice.
      11
      Parallel & Perpendicular Slope Calculator
      Given one line's slope, find the slope a parallel or perpendicular line needs — the second most-searched slope question after "what is slope."
      Slope of Line B (m₂)
      Everyday Take
      Dual-line graph redrawing live — hover either line to confirm its slope and the right-angle marker where relevant.
      Formula
      Parallel: m₂ = m₁
      Perpendicular: m₂ = −1 / m₁
      Expert commentary. Perpendicular slopes are negative reciprocals because rotating a line 90° swaps and inverts its rise and run, flipping the sign in the process. Vertical and horizontal lines are perpendicular by definition even though one has an undefined slope.
      12
      Slope Field (Differential Equations) Calculator
      Plots a slope field for dy/dx = f(x,y) so you can visualize solution curves without solving the ODE by hand.
      On
      Off
      Dense grid of slope tick-marks, each angled to f(x,y) — hover any tick to read its local slope. The orange curve (if enabled) is one particular solution.
      Sample Slope Values
      xySlope f(x,y)
      Expert commentary. Every tick-mark in this grid is just Card 1's slope formula evaluated at a point — a slope field is what you get when you calculate slope at every coordinate simultaneously instead of just two. This visual approach is standard in AP Calculus BC and university differential equations courses.
      This calculator is for informational purposes only and does not constitute professional advice. Consult a licensed advisor before making decisions.

      Slope Calculator: Find Slope, Equation, and Grade From Any Two Points

      What This Calculator Does

      A slope calculator finds how steep a line is. You enter two points on that line, and it tells you the slope.

      Slope shows how much a line rises or falls as it moves sideways. It applies to math class, road signs, roof designs, and hiking trails.

      This guide explains every part of the slope calculator. You will learn the formula, see worked examples, and find out how slope connects to percent grade, degrees, ratios, and even multi-point data sets.

      Slope belongs to a branch of math called coordinate geometry (sometimes taught inside linear algebra). Understanding that background helps explain why the same rise-over-run idea shows up in so many unrelated fields.

      Who Should Use a Slope Calculator

      Students use this tool to check algebra homework. Teachers use it to build practice problems fast.

      Builders and roofers use slope math to plan roof pitch and drainage. Homeowners use it to check driveway grade before pouring concrete.

      Engineers and land surveyors use slope to meet code requirements. Hikers and cyclists use percent grade to judge trail difficulty.

      Data analysts use a related version of slope — called a regression slope — to describe trends in a data set instead of a single straight line.

      Slope Calculator vs. Related Math Tools

      Before you scroll through the full explainer, confirm you have the right tool for your question.

      ToolBest For
      Slope CalculatorFinding steepness between two points
      Percentage CalculatorGeneral percent-based math problems
      Percentage Change CalculatorComparing two values over time
      Right Triangle CalculatorFinding triangle sides and angles
      Grade CalculatorAcademic scoring, not slope
      Graphing CalculatorPlotting full equations and curves

      In short: if you have two coordinate points and want steepness, this is your tool. If you have an angle and a side length instead, use the right triangle calculator. If you’re grading a test, the grade calculator — not this page — is what you want.

      Why Slope Matters

      Slope is one of the most useful numbers in math. It appears in geometry, algebra, physics, construction, and everyday life.

      A single slope value can answer very different questions. Is this line steep? Will this ramp meet accessibility rules? Is this roof pitched enough for shingles?

      Getting slope wrong has real consequences. A driveway with too much grade floods a garage. A roof with too little pitch leaks.

      What Is Slope? A Simple Definition

      Slope measures steepness. It compares vertical change to horizontal change between two points on a line.

      Mathematicians call vertical change “rise.” They call horizontal change “run.”

      Slope equals rise divided by run. A bigger number means a steeper line.

      The Slope Formula

      The standard slope formula is:

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

      Here, m stands for slope. The letters x and y represent coordinates of two points on the line.

      This formula works for any straight line on a coordinate plane. It is the foundation every other slope calculation builds on.

      SymbolMeaning
      mSlope
      (x₁, y₁)First point
      (x₂, y₂)Second point
      ΔyRise (y₂ − y₁)
      ΔxRun (x₂ − x₁)

      In short, m is just shorthand for “rise divided by run,” and Δy and Δx are the rise and run values you calculate before dividing.

      How to Use the Slope Calculator

      Follow these steps to find slope from two points.

      Step 1: Identify Your Two Points

      Write down the coordinates of both points. Label the first point (x₁, y₁) and the second point (x₂, y₂).

      For example, use Point 1 (0, 0) and Point 2 (4, 8).

      Step 2: Enter the Coordinates

      Type the x and y values for each point into the calculator’s input fields. This tool defaults to (0, 0) and (4, 8) so you can see a sample result right away.

      Step 3: Choose Your Display Precision

      Select how you want the result rounded. Options include whole numbers, one decimal, two decimals, or a simplified fraction.

      For example, a raw result of 4/2 automatically simplifies to 2 when you choose the fraction display, instead of showing the unreduced fraction.

      Step 4: Read the Results

      The calculator returns the slope as both a decimal and a fraction. It also shows rise, run, percent grade, angle in degrees, ratio format, and the direction of the line.

      Step 5: View the Graph

      The calculator draws the line on a coordinate plane, with both input points labeled and the connecting line rendered in color. This helps you confirm the answer visually before you use it for homework or a real project.

      Worked Example: Calculating Slope From Two Points

      Let’s calculate the slope between Point 1 (0, 0) and Point 2 (4, 8).

      1. Find the rise: Δy = 8 − 0 = 8
      2. Find the run: Δx = 4 − 0 = 4
      3. Divide rise by run: m = 8 / 4 = 2

      The slope is 2. In plain English, for every 1 unit the line moves right, it rises 2 units.

      A Second Example With Negative Slope

      Try Point 1 (2, 6) and Point 2 (5, 0).

      Δy = 0 − 6 = −6 Δx = 5 − 2 = 3 m = −6 / 3 = −2

      The slope is −2. This line falls as it moves right, which is a negative slope.

      Understanding Slope Direction

      Slope direction tells you the shape of the line at a glance. There are four possible cases.

      A vertical line has no run — both points share the same x-value, so Δx equals zero. Dividing by zero is impossible in math, which is why vertical lines have an undefined slope instead of a numeric one.

      A horizontal line has no rise — both points share the same y-value, so Δy equals zero. Zero divided by any run still equals zero, which is why horizontal lines always have a slope of exactly 0.

      Slope ValueDirectionLine Behavior
      Positive (m > 0)UphillRises left to right
      Negative (m < 0)DownhillFalls left to right
      Zero (m = 0)FlatPerfectly horizontal
      UndefinedVerticalStraight up and down

      In short, a positive slope climbs, a negative slope falls, a zero slope stays flat, and an undefined slope only exists on a straight vertical line.

      From Slope to Equation: Two Common Forms

      Once you know the slope, you can write a full equation for the line. Two formats are used most often.

      Slope-Intercept Form (y = mx + b)

      This is the most common form. It uses the slope (m) and the y-intercept (b), which is where the line crosses the y-axis.

      Formula: b = y − (m × x)

      Example: Using slope m = 2 and point (4, 8):

      b = 8 − (2 × 4) = 8 − 8 = 0

      The equation is y = 2x + 0, or simply y = 2x.

      Point-Slope Form (y − y₁ = m(x − x₁))

      This form is common in Algebra I and II courses. It uses the slope and any single point on the line, without solving for the intercept first.

      Example: Using slope m = 2 and point (4, 8):

      y − 8 = 2(x − 4)

      You can expand this into slope-intercept form if needed. Both equations describe the exact same line.

      Slope From an Equation (No Two Points Needed)

      Sometimes you already have an equation instead of two coordinate points. You can still find slope without plotting anything.

      If the equation is already in slope-intercept form (y = mx + b), the slope is simply the number in front of x. For the equation y = 3x + 5, the slope is 3 and the y-intercept is 5 — no calculation required.

      If the equation is in standard form (Ax + By = C), rearrange it first. For example, take 2x + 4y = 8:

      1. Solve for y: 4y = −2x + 8
      2. Divide every term by 4: y = −0.5x + 2
      3. The slope is the coefficient of x: m = −0.5

      This method works for any linear equation, and it’s useful whenever a textbook or worksheet gives you a formula instead of two raw coordinates.

      Converting Slope to Other Formats

      Raw slope numbers like “2” or “0.25” don’t mean much outside a math class. Real-world fields use percent grade, degrees, or ratios instead.

      Slope as Percent Grade

      Percent grade is the format used on road signs and hiking apps.

      Formula: Percent Grade = (Rise / Run) × 100

      A slope of 0.25 becomes a 25% grade. Road signs, trail maps, and civil engineering drawings all use this format.

      Slope as an Angle in Degrees

      Degrees describe the actual angle of a slope compared to flat ground.

      Formula: Angle° = arctan(Rise / Run)

      A slope with a 25% grade equals about 14 degrees. This is the format engineers use when specifying incline angles.

      Slope as a Ratio (X:1 Format)

      Ratio notation appears on wheelchair ramp specs, retaining walls, and earthworks drawings. Common examples include “3:1” or “1-in-12.”

      Formula: Ratio (X:1) = Run / Rise

      A slope of 1-in-12 is the maximum ratio commonly cited for wheelchair ramps under U.S. accessibility guidance. [VERIFY: confirm the exact current code section before using this figure for a real construction project — always check with a licensed professional or your local building authority.]

      Quick Reference: Slope Format Comparison

      Slope (Decimal)Percent GradeAngle (Degrees)Ratio
      0.0838.3%4.8°1:12
      0.1717%9.6°1:6
      0.2525%14°1:4
      0.550%26.6°1:2
      1.0100%45°1:1

      In short, a 1-in-12 slope equals about 8.3 percent grade and roughly 4.8 degrees, while a 1-in-1 slope equals 100 percent grade and 45 degrees.

      Rise Over Run: The Physical Way to Think About Slope

      Before formulas, most students learn slope as “rise over run.” This is the most visual way to understand steepness.

      Rise is how far a line moves up or down. Run is how far it moves left or right.

      Picture a staircase. Each step has a height (rise) and a depth (run). The steepness of the whole staircase is rise divided by run, exactly like slope.

      Steepness Categories by Rise-Over-Run

      Slope RangeDescription
      Under 10%Gentle
      10–20%Moderate
      20–40%Steep
      Over 40%Very steep

      In short, most everyday inclines — driveways, sidewalks, and gentle trails — fall under 10 percent, while anything past 40 percent is considered genuinely steep terrain.

      Finding Slope With Multiple Points (Line of Best Fit)

      The two-point slope formula only works for a single, perfectly straight line. Real data sets often have more than two points that don’t line up exactly.

      When that happens, you need a line of best fit, also called a linear regression line. This is a single straight line drawn through a scattered set of points so that it sits as close as possible to all of them at once.

      The math behind it — called the least-squares method — calculates a slope and intercept that minimize the total distance between the line and every data point. You don’t need to memorize the formula to use the concept.

      Practical angle, not homework math: if you have a spreadsheet of measurements — say, hours studied versus test scores, or distance versus elevation gain on a trail — a line of best fit slope tells you the average rate of change across the whole data set, not just between two isolated points.

      For example, if five data points roughly trend upward but aren’t perfectly aligned, a regression slope of 1.8 means the line rises about 1.8 units for every 1 unit it moves right, on average, across all five points combined. This differs from simple two-point slope because it accounts for every point’s position, not just two.

      Spreadsheet tools like Excel and Google Sheets calculate this automatically with a built-in SLOPE() function or a trendline feature — more on that below.

      Real-World Applications of Slope

      Slope isn’t just a classroom concept. It shows up constantly in construction, transportation, and land planning.

      Roof Pitch

      Roofers express slope as “rise per 12 inches of run,” written as a fraction like 6/12. A steeper pitch sheds water and snow faster.

      Asphalt shingles typically need a minimum pitch of about 2/12, though exact minimums vary by shingle manufacturer and local code. [VERIFY: confirm the specific shingle manufacturer’s minimum-pitch specification before relying on this figure.] Flat or low-slope roofs need membrane roofing instead. Use our roof pitch calculator to check your roof’s exact pitch, angle, and material suitability.

      Driveway and Land Grading

      Most residential driveways should stay under a 15–20% grade. Anything steeper can cause traction problems in rain or snow.

      Yards and drainage swales need a small positive slope, usually 1–2%, so water flows away from the house instead of pooling. The same math applies to drainage pipe and sewer-line fall requirements, where installers calculate a minimum slope per foot to keep water moving.

      Wheelchair Ramps

      Ramps built to meet the accessibility requirements of the Americans with Disabilities Act (ADA) commonly follow a maximum slope of 1:12, which equals about 8.33%. This helps ensure ramps are safe and usable for wheelchair users. [VERIFY: confirm current ADA Standards for Accessible Design section and any landing-length requirements before finalizing a real ramp build.] Use our ramp calculator to check ramp length and rise against this code requirement.

      Parallel and Perpendicular Lines

      Two lines are parallel when they share the same slope. Two lines are perpendicular when their slopes are negative reciprocals of each other.

      • Parallel: m₂ = m₁
      • Perpendicular: m₂ = −1 / m₁

      For example, if Line A has a slope of 2, a line perpendicular to it has a slope of −1/2.

      How Surveyors and Engineers Measure Slope in the Field

      Classroom slope problems start with two neat coordinate points. Field measurements work differently.

      Surveyors typically describe slope in one of three ways: percent slope (vertical rise divided by horizontal distance, times 100), slope distance (the actual measured length along the sloped ground itself, not the flat map distance), and horizontal distance (the flat, map-view distance between two points, which is always shorter than or equal to the slope distance on any incline).

      This distinction matters because a tape measure run directly along a hillside records slope distance, not horizontal distance. Engineers correct for this using trigonometry before the number goes into a grading plan, ADA ramp design, or road profile.

      Land surveyors also work with elevation-based or GPS slope, which is common in hiking apps and road-grade tools. Instead of x and y coordinates on a flat graph, these tools use elevation gain (vertical) divided by trail distance (horizontal) to produce the same rise-over-run result — just measured with a GPS receiver instead of a coordinate plane.

      Slope in Excel, Desmos, and Graphing Calculators

      You don’t always need a dedicated slope calculator. Several everyday tools can find slope too, though each works a little differently.

      Excel and Google Sheets include a built-in SLOPE() function. Enter your y-values and x-values as two ranges, and the formula returns a single slope number — this is especially useful for the multi-point regression slope discussed above, since spreadsheets handle least-squares math automatically.

      Desmos lets you plot two points directly and see the connecting line drawn instantly, along with its equation. It’s a strong visual option when you want to experiment with different points side by side.

      Graphing calculators, like a TI-84, require entering the two-point slope formula manually or using a built-in linear regression menu for multi-point data.

      The advantage of a dedicated slope calculator like this one is speed: no formula entry, no menu navigation, and an instant conversion to percent grade, degrees, and ratio format in the same result. If you want to plot a full equation or compare multiple lines visually, our graphing calculator is the better next step.

      Slope Calculator vs. Golf Slope Rating: Not the Same Thing

      If you searched for “slope calculator” and expected golf scoring information, this is not that tool.

      A golf course’s Slope Rating is a completely different statistic. It’s a number between 55 and 155, published by the USGA, that measures how much harder a course plays for a bogey golfer compared to a scratch golfer — it has nothing to do with rise-over-run line steepness.

      The two concepts share a word by coincidence, not by mathematical connection. If you’re looking for golf handicap math instead of line-steepness math, our golf handicap calculator is the correct tool. The same naming overlap also exists in unrelated technical fields — molecular biology uses “slope” to describe a qPCR standard-curve measurement, and chromatography uses “gradient” for a solvent-mixing ratio. Neither is covered on this page.

      Common Mistakes When Calculating Slope

      • Mixing up rise and run. Always put the y-values (rise) on top and the x-values (run) on the bottom.
      • Subtracting points in the wrong order. Keep the same order for both x and y. If you start with y₂ − y₁, you must also use x₂ − x₁, not x₁ − x₂.
      • Confusing percent grade with degrees. A 100% grade is a 45-degree angle, not a 90-degree angle. These two units are not interchangeable without conversion. If you’re mixing up percent grade with a percentage change or difference calculation instead, the percentage difference calculator handles that separate type of math.
      • Forgetting undefined slope. A perfectly vertical line has no slope value at all. Don’t force a number where one doesn’t exist.
      • Ignoring code limits. A mathematically correct slope can still fail a building code. Always check driveway, ramp, and roofing limits separately with a licensed professional.

      Pro Tips for Working With Slope

      • Use a graph whenever possible. Seeing the line makes direction and steepness obvious.
      • Keep units consistent. Don’t mix feet and meters within the same calculation.
      • Simplify fractions for cleaner answers. A slope of 4/2 should be reduced to 2 for clarity.
      • Double-check vertical and horizontal cases separately. These are the two most common sources of calculation errors.
      • For data sets larger than two points, use a line of best fit instead of picking two points at random — random point selection can distort the true trend.

      Limitations of This Calculator

      This calculator handles straight lines only. It does not calculate the slope of curves, which requires calculus.

      For curves, the “slope” changes at every point and requires a derivative rather than a simple rise-over-run formula. That advanced calculus topic — sometimes called a slope field — is outside the scope of this page and this calculator.

      Building and safety codes vary by region. This tool provides general math, not official code approval. Always confirm construction slopes with a licensed engineer or your local building department for roofing, driveway, ADA-ramp, or drainage projects.

      Frequently Asked Questions

      How do you find the slope of a line?

      Pick any two points on the line and label them (x₁, y₁) and (x₂, y₂). Subtract the y-values, subtract the x-values, then divide the first result by the second.

      What is the slope formula?

      The slope formula is m = (y₂ − y₁) / (x₂ − x₁). This calculates rise divided by run between any two points on a straight line.

      How do you convert slope to degrees?

      Divide the rise by the run to get a decimal slope, then take the arctangent of that number. The formula is Angle° = arctan(Rise / Run).

      How do you calculate roof slope?

      Measure how many inches a roof rises for every 12 inches of horizontal run. This is written as a fraction like 6/12, and it can be converted to degrees using the arctangent formula.

      What is a good slope for a driveway?

      Most residential driveways stay between 0% and 15–20% grade. Steeper slopes usually require engineering review and better traction surfaces.

      What is the slope of a horizontal line?

      A horizontal line always has a slope of 0. It has zero rise because the y-value never changes between points.

      What is the slope of a vertical line?

      A vertical line has an undefined slope. Its run equals zero, and dividing by zero is not possible.

      How do you find a line perpendicular to another line?

      Take the negative reciprocal of the original slope. If the original slope is m, the perpendicular slope is −1/m.

      Can slope be a negative number?

      Yes. A negative slope means the line falls as it moves from left to right on the graph.

      What’s the difference between slope and gradient?

      The terms are used interchangeably in practice. “Gradient” is more common in UK, civil engineering, and physics contexts, while “slope” is the standard US math term.

      How do you find slope from an equation instead of two points?

      If the equation is in slope-intercept form (y = mx + b), the slope is the number multiplied by x. If it’s in standard form (Ax + By = C), rearrange it into y = mx + b first, then read the slope directly.

      What is the maximum slope for a wheelchair ramp?

      A slope of 1:12, or about 8.33%, is the maximum commonly cited under U.S. accessibility guidance. Confirm the exact current requirement with a licensed professional before building.

      How steep can a driveway be?

      Most residential driveways stay under 15–20% grade. Anything steeper often needs engineering review and a higher-traction surface.

      Is slope the same thing as golf Slope Rating?

      No. Golf Slope Rating is a USGA statistic measuring course difficulty for different skill levels. It has no mathematical connection to line steepness.

      Can I use this calculator for a curved line?

      No. This calculator finds the slope of straight lines only. Curved lines require calculus and a derivative at each point, which is beyond this tool’s scope.

      What’s the difference between rise-over-run and percent grade?

      They describe the same underlying steepness, just in different formats. Percent grade simply multiplies the rise-over-run decimal by 100.

      How do I find slope in Excel?

      Use the built-in SLOPE() function, entering your y-value range first and your x-value range second. It works for both two points and larger data sets.

      What does an undefined slope mean in real life?

      It describes a perfectly vertical surface or line, like a cliff face or a wall, where there is no horizontal change at all.

      How many points do I need for a line of best fit?

      At least three points are needed for a meaningful line of best fit, though the method works with any number of points above two.

      Does slope have units?

      Slope itself is usually unitless when both axes use the same measurement (like feet and feet). It becomes unit-specific only when comparing different measurement types, such as elevation in meters over distance in miles.

      Key Takeaways

      Slope measures steepness as rise divided by run. The core formula, m = (y₂ − y₁) / (x₂ − x₁), works for any two points on a straight line.

      Slope converts easily into percent grade, degrees, or ratio format depending on your field. Roofers, road engineers, and ramp designers each use a different version of the same underlying number. For data sets with more than two points, a line of best fit calculates an average slope instead.

      Always double-check construction-related slope calculations against local building codes. This calculator delivers accurate math, but code compliance requires a licensed professional for projects involving roofing, driveways, ramps, or drainage.

      Use the slope calculator above to find slope instantly from any two points, then convert your result into the format you need for school, work, or your next building project.