CalculateRoofPitch

How to Find Slope: From Two Points, on a Graph, or on a Roof

· ~14 min read

Slope measures how steep something is — a line on a graph, a road, a ramp, or a roof. The same idea covers all of them: slope = rise over run, the change in vertical position divided by the change in horizontal position. The formula does not care what the slope describes; only the units and conventions change.

For two points (x₁, y₁) and (x₂, y₂) on a coordinate plane, the slope formula is m = (y₂ − y₁) / (x₂ − x₁). For a line on a graph with grid intersections, count rise and run between two clear points and divide. For a roof, use a level and tape measure to read rise per 12 inches of run. The math is identical; the measurement technique differs by application.

This guide covers all the common phrasings of the same question. How to find slope, how to do slope, how to calculate slope, how to find the slope of a line, how to determine slope, how to figure out slope, how to get slope, formula for slope, slope math — they all reduce to the same rise-over-run identity. The sections below walk through finding slope from two points, finding slope on a graph, finding slope from a table, special cases (zero and undefined slope), and finally the three field methods for measuring an existing roof slope.

The slope formula — rise over run

The formula for slope between any two points (x₁, y₁) and (x₂, y₂) is: m = (y₂ − y₁) / (x₂ − x₁). The numerator is the rise (change in y); the denominator is the run (change in x). The variable m is the conventional symbol for slope in algebra. This is the answer to "how to find slope with two points," "how to find slope between two points," "how to find slope from 2 points," and "how to calculate slope with two points" — different phrasings of the same single formula.

The slope formula works in either direction. (y₂ − y₁) / (x₂ − x₁) and (y₁ − y₂) / (x₁ − x₂) give the same answer because both numerator and denominator flip sign together. What you cannot do is mix them — (y₂ − y₁) / (x₁ − x₂) gives the wrong answer (the negative of the true slope). Pick a "first" and "second" point and stay consistent.

A positive slope means the line goes up from left to right. A negative slope means the line goes down from left to right. A slope of 0 means the line is horizontal (no rise). An undefined slope means the line is vertical (the run is 0, and division by zero is undefined). These four cases — positive, negative, zero, undefined — cover every possible line on the coordinate plane.

How to find slope from two points — step by step

Finding slope from two points is the most common slope problem in algebra. The procedure is a five-step recipe.

  1. Identify the two points. Each point has an x-coordinate and a y-coordinate, written (x, y). Label one point (x₁, y₁) and the other (x₂, y₂). It does not matter which is which, as long as you stay consistent.
  2. Subtract the y-coordinates. Calculate (y₂ − y₁). This is the rise — the vertical change between the two points.
  3. Subtract the x-coordinates. Calculate (x₂ − x₁). This is the run — the horizontal change between the two points.
  4. Divide rise by run. m = (y₂ − y₁) / (x₂ − x₁). Simplify the fraction if possible.
  5. Check the sign. If both differences had the same sign (both positive or both negative), slope is positive. If signs differ, slope is negative. If the run is zero, slope is undefined (vertical line). If the rise is zero, slope is zero (horizontal line).

Worked examples — slope between common point pairs

Examples make the procedure concrete. Each row in the table works through the slope formula for a specific pair of points and shows the result both as a fraction and as a decimal where it makes sense. The same examples answer common search variants like "slope of 1," "slope of 3 4," "slope 3 2," "slope of 9," "slope of 2 5" — each is a slope value that comes out of the formula for some pair of points.

Slope between two points — worked examples
Point 1 (x₁, y₁)Point 2 (x₂, y₂)Rise (y₂ − y₁)Run (x₂ − x₁)Slope m
(0, 0)(1, 1)111 (line goes up at 45°)
(1, 2)(4, 8)636/3 = 2
(0, 0)(4, 3)343/4 = 0.75
(2, 5)(5, 11)632
(0, 5)(3, 2)−33−1 (line goes down)
(1, 4)(5, 4)040 (horizontal line)
(3, 1)(3, 7)60undefined (vertical line)
(−2, 1)(2, 9)842
(0, 0)(9, 9)991

How to find the slope of a line on a graph

When you have a line drawn on a coordinate plane rather than two listed points, the procedure is essentially the same — you just have to read the points off the graph first. This is the answer to "how to find the slope of a line graph," "how to find slope of a line on a graph," "how to determine the slope of a graph," and "how to find the slope of a line without points listed" — all describe the same five-step recipe.

Step 1: pick two points on the line where it passes through clear grid intersections. Picking points on grid intersections lets you read the coordinates without estimating. Avoid picking points on a curved or partial section of the line — only pick where the line is clearly defined.

Step 2: read the coordinates of each point. The x-coordinate is the horizontal position; the y-coordinate is the vertical position. Write each as (x, y).

Step 3: count the rise. From the leftmost point to the rightmost, count how many units the line goes up (positive rise) or down (negative rise). The rise is the change in y.

Step 4: count the run. From the leftmost to the rightmost point, count how many units to the right the line goes. The run is the change in x and is always positive when you move left-to-right.

Step 5: write the slope as the ratio rise/run. Simplify the fraction if possible. If the line goes down, the slope is negative.

Reading the equation when the line is plotted with its equation: if the equation is y = mx + b (slope-intercept form), the slope is the coefficient of x — the m. For y = 3x + 5, slope = 3. This is the fastest way to find the slope when the equation is provided alongside the graph.

How to find slope from a table

A table of x and y values represents the same line as a graph or an equation — just in tabular form. Finding slope from a table answers searches like "slope from a table" and "find slope line" when the line is presented as a list of paired values rather than a drawn graph.

The procedure: pick any two rows from the table. Each row gives you a point (x, y). Apply the slope formula: m = (y₂ − y₁) / (x₂ − x₁) for the two rows you picked. The result is the slope of the line.

Example: a table lists points (0, 1), (2, 7), (4, 13), (6, 19). Pick any two rows — say, the first and fourth: (0, 1) and (6, 19). Slope = (19 − 1) / (6 − 0) = 18 / 6 = 3. Verify with another pair to confirm the data is linear: (2, 7) and (4, 13) gives (13 − 7) / (4 − 2) = 6/2 = 3. Same answer, so the table represents a line with slope 3.

If different pairs give different slope values, the table does not represent a straight line — it represents a curve, and "slope" is not a single value but varies along the curve. Most school-level problems assume linear data; verify by checking at least two pairs.

Special cases — zero, undefined, and integer slopes

A few specific slope values come up often enough to be worth memorising. They are the answers to searches like "what is the slope of the equation y 3" and "what is the slope of x 4" and "what is the slope of the line y 8" — questions about specific equations of horizontal and vertical lines.

Slope = 0 means a horizontal line. The y-coordinate stays the same regardless of x. Equations of the form y = constant (y = 3, y = −5, y = 8) have slope 0. Visually they are flat lines parallel to the x-axis.

Slope is undefined means a vertical line. The x-coordinate stays the same regardless of y. Equations of the form x = constant (x = 4, x = −2, x = 0 which is the y-axis itself) have undefined slope. The slope formula divides by zero in this case, which is why the slope is "undefined" rather than infinite.

Slope = 1 means the line rises one unit for every one unit of horizontal travel — exactly 45°. Common in basic algebra problems. Slope = −1 is the same magnitude going downward.

Integer slopes (slope = 2, 3, 4) mean the line rises that many units per one unit of horizontal travel. A slope of 3 rises 3 for every 1 — quite steep. A slope of 9 rises 9 per 1 — very steep, almost vertical.

Common slope special cases
Slope valueWhat it meansExample equationVisual description
m = 0Horizontal liney = 3Flat line parallel to x-axis
m = undefinedVertical linex = 4Straight up-down line parallel to y-axis
m = 1Rises 1 per 1y = x45° line going up-right
m = −1Falls 1 per 1y = −x45° line going down-right
m = 2Rises 2 per 1y = 2xSteeper than 45° going up
m = 1/2Rises 1 per 2y = x/2Less steep than 45° going up
m = −3Falls 3 per 1y = −3x + 1Steep downward
m = 3/4Rises 3 per 4y = 0.75x + 2Moderate upward; 0.75 decimal form

Point-slope form — the slope of a line from one point and slope

A point-slope calculator answers a different version of the slope question: given one point (x₁, y₁) and the slope m, what is the equation of the line? The point-slope formula is: y − y₁ = m(x − x₁). This rearranges to slope-intercept form (y = mx + b) by solving for y.

Example: a line passes through (2, 5) with slope 3. The point-slope form is y − 5 = 3(x − 2). Expand: y − 5 = 3x − 6. Add 5 to both sides: y = 3x − 1. The line's equation in slope-intercept form is y = 3x − 1, with slope 3 and y-intercept −1.

How to find slope with one point alone is impossible — one point does not define a unique line. You need either a second point (slope formula above), the slope value itself (point-slope formula), or another piece of information (parallel/perpendicular to a known line, passing through another known point) to determine the slope.

How to find slope on an existing roof

Finding the slope of an existing roof is the same idea as finding slope from two points — but with a level and tape measure instead of a graph. Roof slope is conventionally expressed as rise per 12 inches of run rather than as a unitless ratio, but the underlying calculation is the same.

Three field methods cover almost every residential situation: the attic level method (safest), the roof-surface level method (most direct), and the digital angle finder or smartphone method (fastest). Pick the safest method for your situation, take three measurements, and average them.

Method 1 — Attic level method (safest)

Bring a 2-foot spirit level, a tape measure, and a flashlight into the attic. Place the level horizontally against the underside of a clean, straight rafter. Push the free end up until the bubble reads level.

With the level bubbled, mark 12 inches along the level from the rafter contact point. Measure straight up from that 12-inch mark to the bottom edge of the rafter. That vertical distance is your rise; the run is 12.

Repeat at three different locations along the roof and average the results. This method is the safest of the three and the most accurate because it reads pitch directly off the framing.

Method 2 — Level and tape on the roof

Climb onto the roof with a 2-foot level, a tape, a pencil, and a notepad. Place the level horizontally against the roof surface, with one end touching the shingles. Lift the other end until the bubble reads level.

Mark the 12-inch point on the roof surface below the level, then measure vertically from that mark down to the roof surface. That measurement is the rise; the run is 12.

This method is more direct than the attic method but requires roof access. Use a harness, non-slip footwear, and a spotter.

Method 3 — Digital angle finder or smartphone

Place a digital angle finder flat against a rafter (in the attic) or against the roof surface. Read the angle in degrees. Plug it into the calculator above to get the equivalent rise/12 pitch.

A smartphone with a clinometer app or the calculator's mobile sensor mode does the same job. Calibrate the phone before use by laying it on a known-flat surface and zeroing the reading.

Converting between slope formats — ratio, percent, degrees

Slope can be expressed in three different formats depending on the context. Math class uses the unitless ratio (slope = rise/run as a single number). Civil engineering, roads, and ramps use percent grade (slope × 100). Surveying, architecture, and physics use degrees (the inclination angle from horizontal). All three describe the same physical slope; the format depends on convention.

Converting between formats: a slope of 0.5 (ratio) = 50% (percent) = 26.57° (degrees). A slope of 1 (ratio) = 100% (percent) = 45° (degrees). A slope of 0.083 (ratio) = 8.3% (percent) = 4.76° (degrees) — this is a 1/12 roof pitch. The conversions are straightforward: percent = ratio × 100, degrees = arctan(ratio) × (180/π). The slope-degrees-to-percent calculator on this site handles the conversion in either direction.

Slope format conversions — ratio, rise/12 pitch, percent, degrees
Ratio (rise/run)Roof pitch (rise/12)Slope %Angle (degrees)Common application
0.0831/128.3%4.76°Low-slope roof; minimum membrane
0.1672/1216.7%9.46°Asphalt-shingle minimum (with double underlayment)
0.2503/1225.0%14.04°Sheds, garages; metal panel minimum
0.3334/1233.3%18.43°Most common residential pitch
0.4175/1241.7%22.62°Conventional residential
0.5006/1250.0%26.57°Versatile mid-pitch
0.6678/1266.7%33.69°Steep residential; walkability threshold
0.83310/1283.3%39.81°Steep traditional styles
1.00012/12100.0%45.00°Equal rise and run; very steep
0.083 (8.33%)1:128.33%4.76°ADA-compliant ramp maximum
0.058N/A5.8%3.32°5.8% road grade — typical highway maximum
0.020N/A2.0%1.15°Driveway minimum slope for drainage

Need to run the numbers?Use the free roof pitch calculator on the home page to convert pitch to angle, calculate rafter length, or estimate roof area in any unit.

Frequently asked questions

Reviewed by

CalculateRoofPitch Editorial Team

Editorial team — construction reference content

Our editorial team produces and maintains this reference site. Every formula, code reference, material specification, and price range is checked against authoritative primary sources — the 2024 International Residential Code, current manufacturer technical bulletins, and published construction cost data — before publication and on a documented review cycle. For any project requiring engineered design, defer to a licensed structural engineer or architect familiar with your local conditions.

Last reviewed: May 2026 · See methodology →