Skip to calculator

Free · No sign-up · No ads

Slope calculator.

Enter two points, a point and a slope, a rise and run, or an equation. You get the slope as an exact fraction, the angle, the percent grade, every equation form and a graph — with the working shown.

Fractions and mixed numbers work too — type 1/2 or 3 1/2. You can also paste a whole pair like (3, 4) (6, 8) into any box.

Slope (m)

4/3

= 1.333333

Angle

53.1301°

Percent Grade

133.3333%

Rise (Δy)

4

Run (Δx)

3

Ratio

4 : 3

Distance

5

y-intercept

0

x-intercept

0

Midpoint

(4.5, 6)

Perpendicular Slope

−0.75

Slope-Intercept Form

y = 4/3x

Point-Slope Form

y − 4 = 4/3(x − 3)

Standard Form

4x − 3y = 0

The line rises from left to right.Extremely steepAt 100% the angle is 45°. Beyond this the surface is closer to a wall than a slope.
XY−4−22468102468run 3rise 4(3, 4)(6, 8)

Interactive graph. Drag to pan, or scroll to zoom. With the graph focused, use the arrow keys to pan, plus and minus to zoom, and 0 to reset the view.

A rising line through (3, 4) and (6, 8), with slope 1.3333, drawn on a grid with the rise and run marked.

Step-by-Step Solution

  1. Label the two points

    (x₁, y₁) = (3, 4) (x₂, y₂) = (6, 8)

    Which point you call the first one does not matter — swapping them negates both the rise and the run, and the two minus signs cancel.

  2. Find the rise (change in y)

    y₂ − y₁ = 8 − 4 = 4

  3. Find the run (change in x)

    x₂ − x₁ = 6 − 3 = 3

  4. Divide the rise by the run

    m = 4 / 3 = 4/3 = 1.333333

    The slope is positive, so the line rises from left to right.

  5. Find the y-intercept

    b = y₁ − m·x₁ = 4 − (4/3)(3) = 0

    This is where the line crosses the y-axis.

  6. Write the equation

    y = 4/3x

    Slope-intercept form. The same line in point-slope form is y − 4 = 4/3(x − 3).

  7. Convert to a percent grade and an angle

    grade = m × 100 = 133.3333% θ = arctan(m) = 53.1301°

    Percent grade and degrees are not the same scale. A 100% grade is 45°, not 90°.

  8. Find the distance between the points

    d = √((6 − 3)² + (8 − 4)²) = √(9 + 16) = 5

    This is the Pythagorean theorem applied to the rise and run.

How to Find the Slope of a Line

Slope measures how steep a line is and which way it leans. It is the ratio of the vertical change between two points to the horizontal change between the same two points — the rise divided by the run. A slope of 2 means the line climbs two units for every one unit it travels sideways.

The formula is:

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

Working through it with the points (3, 4) and (6, 8):

  1. Label the points. Call (3, 4) the first point, so x₁ = 3 and y₁ = 4. Call (6, 8) the second, so x₂ = 6 and y₂ = 8.
  2. Subtract the y-values. 8 − 4 = 4. That is the rise.
  3. Subtract the x-values. 6 − 3 = 3. That is the run.
  4. Divide. 4 ÷ 3 = 4/3, or about 1.333.

The order you pick the points in does not change the answer. Reversing them gives (4 − 8) ÷ (3 − 6) = −4 ÷ −3, which is still 4/3. What breaks the calculation is mixing the order between the top and the bottom — subtracting the first y from the second, then the second x from the first. That flips the sign and is the single most common mistake.

What the Number Tells You

The sign gives the direction and the size gives the steepness. A positive slope rises from left to right; a negative slope falls. A slope of zero is a flat, horizontal line. A vertical line has no slope at all — not an infinite one — because working it out would mean dividing by zero, and that has no answer.

Outside a maths classroom the same number gets written three other ways. A slope of 0.08 is an 8% grade on a road sign, a 1 in 12.5 ratio on a drawing, and 4.57° on a digital level. They all describe the same steepness. The one that catches people out is the relationship between percent and degrees: they are not proportional, and a 100% grade is 45°, not 90°.

When You Do Not Have Two Points

You rarely start with a tidy pair of coordinates. This calculator takes three other starting points, each on its own tab:

  • Point and slope — when you know one point the line passes through and how steep it is, which is enough to pin down the whole line.
  • Rise and run — the measurement you actually take on site, with a level and a tape.
  • An equation — when you already have the line written down. Paste in y = 2x + 3, 2x + 3y = 6, or f(x) = −x/2 + 1, and the slope is read straight out of it.

See the Line on a Graph

Every calculation is drawn as well as worked out. The graph plots the line through both of your points, writes each point’s coordinates beside its dot as (4, 3), and marks the rise and the run between them as a dashed triangle — so the fraction in the result tile and the shape on the screen are visibly the same thing.

It is a proper scale rather than a sketch. The gridlines are numbered, with finer lines between them, and both axes carry ruler tick marks, an arrowhead and an X or Y label. Both axes are always drawn at the same scale, so a slope of 1 comes out at 45° and is never flattened to fit the box.

Zoom in and out, drag to pan, reset the view, or open the graph full screen when a line runs off the edge. It redraws as you type, so changing one coordinate shows you straight away which way the line tips. The first graph is in the page the moment it loads, rather than drawn in afterwards.

Every Calculation Has Its Own Link

The numbers you type are kept in the address bar, so the URL always describes exactly what is on screen. Copy it and the person who opens it sees your calculation, not a blank form — useful for homework help, a question on a forum, or sending a measurement to someone on site. Nothing is stored on a server; the link is the whole record.

Common Questions

What is the formula for slope?

Slope is m = (y₂ − y₁) / (x₂ − x₁), the change in y divided by the change in x between two points on the line. It is often read as “rise over run”. For the points (3, 4) and (6, 8) the rise is 4, the run is 3, and the slope is 4/3.

Does it matter which point I use first?

No. Swapping the two points negates both the rise and the run, and the two minus signs cancel out, so the slope is identical. What does matter is being consistent — subtract the coordinates of the same point first in both the top and the bottom of the fraction.

Why is the slope of a vertical line undefined instead of infinite?

A vertical line has a run of zero, and the slope formula would require dividing by zero. Division by zero has no value at all, so the slope is undefined. It is not infinity — infinity is not a number the division produces, and the line has no y-intercept either.

How do I convert a slope into a percent grade?

Multiply the slope by 100. A slope of 0.08 is an 8% grade, and a slope of 1 is a 100% grade. Percent grade and degrees are different scales: a 100% grade is 45°, not 90°, and a 45% grade is only about 24.2°.

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

If the equation is in the form y = mx + b, the slope is m, the number multiplying x. If it is in standard form Ax + By = C, the slope is −A/B. Switch this calculator to the “From equation” tab and it will do either, showing the rearrangement step by step.

What does a negative slope mean?

A negative slope means the line falls from left to right — as x increases, y decreases. The steepness is given by the size of the number, so a slope of −3 is three times steeper than a slope of −1, and both descend.

Is this slope calculator free?

Yes, entirely. Every result, including the full step-by-step working and the graph, is free with no account, no subscription and no limit on how many calculations you can run.

More Slope Questions

How do I find the slope of a line on a graph?

Pick two points where the line crosses the grid cleanly, count the squares up or down between them for the rise, count the squares across for the run, and divide the rise by the run. Reading (3, 4) and (6, 8) off a grid gives a rise of 4 and a run of 3, so the slope is 4/3. Typing both pairs into the calculator above does the same arithmetic and draws the line back, which is the quickest way to check you read the grid correctly.

How do I find the slope of a line on a graphing calculator?

On a TI-83 or TI-84, press STAT and choose 1:Edit, put the x-values in L1 and the y-values in L2, then press STAT again, arrow across to CALC and choose 4:LinReg(ax+b). The a it reports is the slope and the b is the y-intercept. If the line is already entered under Y= as y = mx + b, no calculation is needed — the number in front of x is the slope.

How do I find b in a slope calculator?

b is the y-intercept, and it comes from b = y − mx using the slope and any single point the line passes through. With m = 4/3 and the point (3, 4), b = 4 − (4/3 × 3) = 0, so the line is y = (4/3)x. The calculator above reports b in the y-intercept tile and writes the finished y = mx + b equation underneath, so there is nothing to rearrange by hand.

How do I calculate my slope?

Measure the vertical change and the horizontal change between two points, then divide the vertical by the horizontal: slope = rise ÷ run. A deck that drops 2 inches over 96 inches of length has a slope of 2 ÷ 96 = 0.0208. Multiply that by 100 for the percent grade, 2.08%, or take the arctangent for the angle, 1.19°.

What is a 1 in 100 slope?

A 1 in 100 slope falls one unit for every hundred units travelled horizontally, which is a 1% grade, a slope of 0.01 and an angle of 0.57°. In metric that is 10 mm of fall per metre. It is close to flat, and it is the shallowest slope most drainage codes will accept — over a 10 metre run the total drop is only 100 mm.

What is 80% slope in degrees?

An 80% slope is 38.66°. Percent grade converts to degrees with θ = arctan(grade ÷ 100), and arctan(0.80) = 38.66°. The two scales are not proportional, which is what catches people out: 100% is 45°, not 90°, and no percent grade however large ever reaches vertical.

What is 1% slope in mm?

A 1% slope drops 10 mm for every metre of horizontal run, or 1 mm for every 100 mm. Over 3 metres that is 30 mm of fall, and over 10 metres it is 100 mm. For any length, multiply the run in millimetres by 0.01 to get the fall in millimetres.

How do I calculate a 1% slope?

Multiply the horizontal run by 0.01, and the answer is how far the surface has to fall across that run. A 1% slope over a 6 metre patio is 6 × 0.01 = 0.06 m, or 60 mm. In imperial the same slope is 0.12 inches per foot, just under ⅛ inch per foot.

How do I calculate a slope angle?

Take the arctangent of the slope: θ = arctan(rise ÷ run). A rise of 4 over a run of 3 is a slope of 1.333, and arctan(1.333) = 53.13°. Set a handheld calculator to degrees rather than radians before pressing the tan⁻¹ key, or read the figure straight off the Angle tile above, which converts every calculation as you type.

What is a zero slope?

A zero slope is a horizontal line: the rise between any two points is 0, so m = 0 ÷ run = 0, and y never changes as x moves. Its equation has the form y = c, such as y = 5. It is not the same as an undefined slope, which is a vertical line where the run is zero and the division has no answer at all.