Home Academic Skills Childhood Education Freelancing & Remote Jobs Physical Education Free Tools →
Thursday, October 22, 2026
Math · Coordinate geometry

Slope Calculator

Find the slope of a line from two points, from a point and a slope, or from an equation. You also get the line equation, intercepts, angle, percent grade, a graph, and every step of the work.

  • Two points, point and slope, or equation
  • Exact fractions and decimals
  • Graph and step-by-step solution
  • Free, no sign-up

Last updated:

Calculate slope

Runs in your browser
I know

Point 1

Point 2

You can type whole numbers, decimals like 0.5, negative numbers, and fractions like 2/3.

Slope (m)
—
 

    Graph of the line

    Step-by-step solution

      Quick answers about slope

      What is the slope formula?

      m = (y₂ − y₁) ÷ (x₂ − x₁). Slope is the change in y (rise) divided by the change in x (run) between two points.

      What does the slope tell you?

      A positive slope goes up from left to right. A negative slope goes down. A slope of 0 is flat. A vertical line has an undefined slope.

      How do you turn slope into percent grade?

      Multiply the slope by 100. A slope of 0.0833 (a 1:12 ramp) is an 8.33% grade, which is about 4.76 degrees.

      How to use this slope calculator

      This slope calculator has four modes. Pick the one that matches what you know. The results update as you type, and you can use whole numbers, decimals, negative numbers, and fractions.

      Two points

      Type the coordinates of two points on the line, (x₁, y₁) and (x₂, y₂). You get the slope, the line equation, both intercepts, the distance, the midpoint, the angle, and the percent grade.

      Point and slope

      Type one point and the slope. The tool builds the full equation of the line in three forms and shows where the line crosses each axis.

      Equation

      Type a line equation such as y = 2x + 1 or 3x + 2y = 12. The tool finds the slope and the intercepts and shows how it solved for y.

      Grade and angle

      Type a ratio, a slope, a percent grade, or an angle. The tool converts it to all the others. This is helpful for ramps, roofs, roads, and trails.

      Slope formula: rise over run

      Slope measures how steep a line is and which way it leans. It is often written as m. To find it, divide the vertical change (the rise) by the horizontal change (the run).

      m = rise ÷ run = Δy ÷ Δx = (y₂ − y₁) ÷ (x₂ − x₁)

      The sign and size of the slope tell you what the line looks like:

      • m > 0: the line rises from left to right.
      • m < 0: the line falls from left to right.
      • m = 0: the line is horizontal. The rise is 0.
      • Undefined: the line is vertical. The run is 0, and you cannot divide by 0.
      • The larger the absolute value of m, the steeper the line.

      How to find the slope from two points

      Follow these steps. We will use the points (2, 1) and (8, 5).

      • Step 1: Find the rise. Δy = y₂ − y₁ = 5 − 1 = 4.
      • Step 2: Find the run. Δx = x₂ − x₁ = 8 − 2 = 6.
      • Step 3: Divide. m = 4 ÷ 6 = 2/3, which is about 0.6667.

      Use the same order for both points every time. If you subtract y in one order and x in the other, the sign of the slope will be wrong.

      Slope-intercept, point-slope, and standard form

      Once you know the slope, you can write the equation of the line in three common forms. Here they are for the same line as above, which has a slope of 2/3 and passes through (2, 1).

      Three forms of a line equation
      FormPatternExample
      Slope-intercepty = mx + by = (2/3)x − 1/3
      Point-slopey − y₁ = m(x − x₁)y − 1 = (2/3)(x − 2)
      StandardAx + By = C2x − 3y = 1

      To get the y-intercept b, use b = y₁ − m × x₁. Here, b = 1 − (2/3)(2) = −1/3. To reach standard form, multiply every term by the common denominator so that no fractions are left. Here, multiply by 3 to get 3y = 2x − 1, which becomes 2x − 3y = 1.

      How to find slope from an equation

      If the equation is in slope-intercept form, y = mx + b, the slope is the number in front of x. For y = 3x − 6, the slope is 3.

      If the equation is in standard form, Ax + By = C, the slope is −A ÷ B. For 3x + 2y = 12, the slope is −3/2. You can also solve for y: 2y = −3x + 12, so y = (−3/2)x + 6.

      Slope as percent grade, angle, and ratio

      People describe steepness in different ways, but they all come from the same number. Use these rules to switch between them:

      • Percent grade = slope × 100
      • Angle = tan−1(slope), in degrees
      • Slope = tan(angle)
      • Ratio 1 : x means the slope is 1 ÷ x
      Common ratios, slopes, percent grades, and angles
      Ratio (rise : run)SlopePercent gradeAngle
      1:11100%45°
      1:20.550%26.57°
      1:30.333333.33%18.43°
      1:40.2525%14.04°
      1:50.220%11.31°
      1:80.12512.5%7.13°
      1:100.110%5.71°
      1:120.08338.33%4.76°
      1:200.055%2.86°
      1:500.022%1.15°

      A 1:12 slope is the maximum running slope that the ADA allows for most wheelchair ramps. It equals an 8.33% grade, or about 4.76 degrees.

      Roof pitch

      Roof pitch is written as rise over 12 inches of run. A 6/12 roof rises 6 inches for every 12 inches of horizontal distance.

      Common roof pitches
      Roof pitchRise : runSlopePercent gradeAngle
      2/122:120.166716.67%9.46°
      3/123:120.2525%14.04°
      4/124:120.333333.33%18.43°
      5/125:120.416741.67%22.62°
      6/126:120.550%26.57°
      8/128:120.666766.67%33.69°
      10/1210:120.833383.33%39.81°
      12/1212:121100%45°

      Parallel and perpendicular lines

      Parallel lines never meet, and they have the same slope. Perpendicular lines meet at a 90 degree angle, and their slopes are negative reciprocals. To find a perpendicular slope, flip the fraction and change the sign. If the slope is 2/3, the perpendicular slope is −3/2. A horizontal line (slope 0) is perpendicular to a vertical line.

      x-intercept and y-intercept

      The y-intercept is where the line crosses the y-axis, so x = 0. In y = mx + b, it is simply b. The x-intercept is where the line crosses the x-axis, so y = 0. To find it, solve 0 = mx + b, which gives x = −b ÷ m. A horizontal line has no x-intercept unless it is the x-axis itself. A vertical line has no y-intercept unless it is the y-axis itself.

      Where slope is used in real life

      • Roofs and stairs: builders describe steepness with rise over run.
      • Ramps and accessibility: ramp slopes are limited so people can use them safely.
      • Roads and trails: a 10% grade rises 10 feet for every 100 feet of horizontal distance.
      • Science and business: the slope of a graph is a rate of change, such as speed on a distance-time graph or cost per item on a price graph.
      • Calculus: the derivative of a function at a point is the slope of the tangent line at that point.

      Slope terms explained

      Slope (gradient)
      A number that tells how steep a line is and which way it leans.
      Rise
      The vertical change between two points, written as Δy.
      Run
      The horizontal change between two points, written as Δx.
      y-intercept
      The point where the line crosses the y-axis.
      x-intercept
      The point where the line crosses the x-axis.
      Slope-intercept form
      The equation y = mx + b, where m is the slope and b is the y-intercept.
      Point-slope form
      The equation y − y₁ = m(x − x₁), built from one point and the slope.
      Standard form
      The equation Ax + By = C, usually with whole numbers.
      Undefined slope
      The slope of a vertical line, because the run is 0.
      Percent grade
      Slope written as a percent, which is the slope times 100.
      Common questions

      Slope calculator FAQs

      Clear answers to the questions students and builders ask most about slope.

      What is slope?

      Slope is a number that tells you how steep a line is and which way it leans. It is also called the gradient. It is usually written as m, and it equals the rise divided by the run.

      How do you calculate slope from two points?

      Subtract the y values and the x values, then divide. The formula is m = (y2 - y1) / (x2 - x1). For the points (2, 1) and (8, 5), the slope is (5 - 1) / (8 - 2) = 4/6 = 2/3.

      What is rise over run?

      Rise over run is another name for the slope formula. The rise is the vertical change between two points, and the run is the horizontal change. Divide the rise by the run to get the slope.

      What does a negative slope mean?

      A negative slope means the line goes down as you move from left to right. For example, a slope of -2 means the line drops 2 units for every 1 unit you move to the right.

      What is the slope of a horizontal line?

      The slope of a horizontal line is 0. The rise is 0, so 0 divided by any run is 0. The equation of a horizontal line is y = b.

      Why is the slope of a vertical line undefined?

      A vertical line has a run of 0, and you cannot divide by 0. So the slope is undefined. The equation of a vertical line is x = c.

      How do you find the slope from an equation?

      If the equation is y = mx + b, the slope is the number in front of x. If it is in standard form, Ax + By = C, the slope is -A / B. For 3x + 2y = 12, the slope is -3/2.

      How do you convert slope to percent grade?

      Multiply the slope by 100. A slope of 0.1 is a 10% grade. A slope of 1/12, which is about 0.0833, is an 8.33% grade.

      How do you convert slope to degrees?

      Use the inverse tangent. The angle equals tan-1 of the slope. A slope of 1 is 45 degrees, and a slope of 0.5 is about 26.57 degrees.

      What slope is a 1:12 ramp?

      A 1:12 ramp rises 1 unit for every 12 units of horizontal distance. Its slope is 1/12, which is about 0.0833, an 8.33% grade, or about 4.76 degrees. This is the maximum running slope that the ADA allows for most ramps.

      How do you find a perpendicular slope?

      Flip the slope into its reciprocal and change the sign. If the slope is 2/3, the perpendicular slope is -3/2. A horizontal line (slope 0) is perpendicular to a vertical line.

      Can the slope be a fraction or a decimal?

      Yes. The slope can be a whole number, a fraction, or a decimal. This calculator shows the exact fraction and the decimal value, so you can use whichever your teacher or project needs.

      Does this calculator show the steps and a graph?

      Yes. Below the calculator you get a step-by-step solution and a graph of the line with your points marked. The tool also gives the equation in slope-intercept, point-slope, and standard form.

      Is my information saved anywhere?

      No. All calculations run in your browser. Nothing you type is sent to a server or stored.

      More free calculators from SkillGuidely

      Syed Osama
      Developed by

      Syed Osama

      Syed Osama is a digital publishing specialist who builds career metrics, financial calculators, and interactive web tools. He focuses on developing practical calculation resources to help remote workers, freelancers, and professionals make quick, accurate financial estimations.

      View developer profile →
      This calculator is for learning and general use. For building work such as ramps, roofs, or drainage, check your measurements with a qualified professional and follow your local building codes.