Follow Us

Free Slope Calculator – Find Slope, Equation & Intercept

A slope calculator helps you find how steep a line or surface is, calculate a line equation, determine a perpendicular slope, or work out the fall needed over a pipe or construction run. Enter the measurements you know, choose the appropriate calculation, and use the result to understand the slope as a ratio, percentage, angle, or equation.

Slope is used in algebra, geometry, architecture, construction, plumbing, drainage, and site planning. The calculation method depends on what you are measuring: a line between two coordinate points uses a different input method from a pipe that needs to fall over a certain distance.

Use the calculator above to calculate slope between two points, find slope-intercept and point-slope equations, calculate pipe grade using feet and inches, or work out a slope ratio such as 1:100.

Slope Calculator

Calculate slope, line equations, slope ratios, pipe grades, and more with step-by-step results.

Slope Between Two Points

Enter the coordinates of two points to find the slope and equation of a line.

First Point (x₁, y₁)
Second Point (x₂, y₂)

How to Use the Slope Calculator

Choose the calculator mode that matches your task, enter the known values, and review the result along with the formula used.

Calculate Slope Between Two Points

Use the two-points mode when you know the coordinates of two points on a line. Enter the first point as (x₁, y₁) and the second as (x₂, y₂).

For example, suppose a line passes through (2, 3) and (6, 11). The calculator finds the vertical change and divides it by the horizontal change:

  • Change in y: 11 − 3 = 8
  • Change in x: 6 − 2 = 4
  • Slope: 8 ÷ 4 = 2

The slope is 2, meaning the line rises two units for every one unit it moves horizontally. The calculator can also provide the line equation and related results, including the slope of a perpendicular line when the slope is defined.

Find a Line Equation and Perpendicular Slope

Choose the line-equation mode when you know the slope and y-intercept of a line. Enter the slope (m) and y-intercept (b) to calculate the equation in slope-intercept form.

If you know a point on the line as well, you can use it to express the equation in point-slope form. The calculator can also help find a perpendicular slope.

For a nonzero slope m, the perpendicular slope is its negative reciprocal:

Perpendicular slope = −1 ÷ m

For example, a line with slope 2 has a perpendicular slope of −1/2. The two lines meet at a right angle when they are not vertical or horizontal exceptions to the ordinary slope formula.

Calculate Pipe Slope, Grade, and Fall

Use the pipe and grade mode when you know the horizontal run and the amount of rise or fall. Enter the run and vertical change using feet and inches.

For example, a pipe that falls 3 inches over a horizontal run of 12 feet has a slope of:

Slope percentage = (3 ÷ 144) × 100 = 2.08%

This describes the measured grade; it does not by itself confirm that the pipe size, drainage design, or installation meets the applicable plumbing code. Check the rules for your location and the specific pipe system.

Calculate a Slope Ratio Such as 1:100

Use the slope-ratio mode when you know the ratio and want to find the required vertical change. A ratio of 1:100 means one unit of vertical change for every 100 units of horizontal run.

If the horizontal run is 10 feet, the required rise or fall for a 1:100 ratio is:

Required change = 10 feet ÷ 100 = 0.1 feet

That equals 1.2 inches. The direction depends on whether the surface needs to rise or fall.

What Is Slope? Understanding the Slope Formula

Slope measures the change in the vertical direction compared with the change in the horizontal direction. It tells you whether a line rises, falls, or remains level as you move from left to right.

Slope Formula Explained

The standard formula for finding the slope between two points is:

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

In this formula:

  • m is the slope.
  • x₁, y₁ are the coordinates of the first point.
  • x₂, y₂ are the coordinates of the second point.
  • y₂ − y₁ is the vertical change, often called the rise.
  • x₂ − x₁ is the horizontal change, often called the run.

The order of subtraction must be consistent. If you subtract the first point from the second in the numerator, do the same in the denominator. Reversing both differences produces the same slope; reversing only one can change the sign incorrectly.

How to Find Slope Step by Step

To calculate slope manually:

  1. Write down the coordinates of both points.
  2. Subtract the first y-coordinate from the second y-coordinate.
  3. Subtract the first x-coordinate from the second x-coordinate.
  4. Divide the vertical change by the horizontal change.
  5. Simplify the fraction or convert it to a decimal if useful.

For example, use the points (1, 2) and (5, 10):

  • Vertical change = 10 − 2 = 8
  • Horizontal change = 5 − 1 = 4
  • Slope = 8 ÷ 4 = 2

The slope is 2. If the horizontal change is zero, the formula requires division by zero, so the line has an undefined slope rather than a finite numerical slope.

Positive, Negative, Zero, and Undefined Slopes

The sign and value of a slope tell you the direction of a line.

Slope type What it means Example
Positive The line rises from left to right m = 2
Negative The line falls from left to right m = −1/2
Zero The line is horizontal m = 0
Undefined The line is vertical x = 4

A negative slope is not automatically a mistake. It simply means that y decreases as x increases. In construction or pipe calculations, describe the direction clearly as a rise or fall instead of relying only on a positive or negative number.

Slope-Intercept Form and Point-Slope Form

The slope formula calculates the steepness of a line, while line equations describe the full relationship between x and y. Two commonly used forms are slope-intercept form and point-slope form.

How to Calculate Slope-Intercept Form

The slope-intercept equation is:

y = mx + b

Here, m is the slope and b is the y-intercept—the value of y where the line crosses the y-axis.

For example, if the slope is 3 and the y-intercept is −2, the equation is:

y = 3x − 2

To find the y-intercept when you know a point and the slope, rearrange the equation:

b = y − mx

If a line has slope 3 and passes through (2, 4), then:

b = 4 − (3 × 2) = −2

Its equation is y = 3x − 2.

A slope-intercept calculator is useful when you need the equation from a slope and intercept, or when you need to calculate an intercept from a known point and slope.

How to Find the Point-Slope Equation

Point-slope form is useful when you know the slope and one point on a line. Its formula is:

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

Suppose the slope is 2 and the line passes through (3, 5). Substitute the known values:

y − 5 = 2(x − 3)

This is the point-slope equation. Expanding it gives y = 2x − 1, which is the same line in slope-intercept form.

Use a point slope calculator when a problem provides a point and slope but does not give the y-intercept directly.

How to Calculate the Slope of a Perpendicular Line

Two nonvertical lines are perpendicular when their slopes are negative reciprocals of each other. To calculate the perpendicular slope, swap the numerator and denominator of the original slope and change the sign.

Examples:

  • Original slope 2 → perpendicular slope −1/2
  • Original slope −3/4 → perpendicular slope 4/3
  • Original slope 1/5 → perpendicular slope −5

A horizontal line has slope 0, and its perpendicular line is vertical, which has an undefined slope. A vertical line’s perpendicular is horizontal. These cases cannot be represented by the ordinary negative-reciprocal calculation as a finite number.

How to Calculate Slope Ratio and Percentage

Slope can be expressed as a fraction, ratio, percentage, or angle. These formats describe related measurements, but they are not interchangeable without conversion.

How to Calculate a 1:100 Slope

A 1:100 slope represents one unit of vertical change for every 100 units of horizontal distance. The units must match: 1 inch over 100 inches, for example, is the same ratio as 1 foot over 100 feet.

To calculate the required fall:

Fall = Horizontal run ÷ 100

For a 20-foot run:

  • Fall in feet: 20 ÷ 100 = 0.2 feet
  • Fall in inches: 0.2 × 12 = 2.4 inches
  • Slope percentage: (1 ÷ 100) × 100 = 1%

A 1:100 slope is therefore equivalent to a 1% grade. Whether that grade is suitable depends on the application; do not assume that it is appropriate for every pipe, roof, path, or floor.

Slope Ratio vs. Slope Percentage vs. Slope Angle

Each format communicates the same basic idea in a different way.

Format How it is expressed Example
Rise/run Vertical change divided by horizontal change 1/100
Ratio Vertical change to horizontal run 1:100
Percentage Rise divided by run, multiplied by 100 1%
Angle Angle above or below horizontal About 0.57° for 1:100

The angle can be found with:

Angle = arctan(Rise ÷ Run)

A slope of 1:100 is about 0.57°, not 1°. For accurate work, use the appropriate conversion rather than assuming the percentage and angle are the same.

Practical Uses of Slope in Construction and Architecture

Slope calculations help describe how a line, pipe, path, roof, or site surface changes over a horizontal distance. The required slope depends on the purpose, materials, dimensions, and local standards.

Pipe Slope Calculator for Drainage and Plumbing

A pipe slope calculator estimates the vertical fall along a horizontal drainage run. The calculation is:

Fall = Run × Slope

Use consistent units before multiplying. For example, a 12-foot run with a 2% grade requires a fall of:

  • Convert 2% to a decimal: 2 ÷ 100 = 0.02
  • Fall: 12 × 0.02 = 0.24 feet
  • Convert to inches: 0.24 × 12 = 2.88 inches

Plumbing requirements vary with pipe diameter, system type, and the adopted local code. For example, the 2024 International Residential Code includes different minimum slopes for horizontal drainage piping based on pipe diameter. Check the code adopted by the relevant authority before using a calculator result for installation. See the 2024 International Residential Code provisions for horizontal drainage pipe slope.

For other plumbing projects, see our guides to PEX-A vs. PEX-B and how to unclog a toilet without a plunger.

Slope Calculations in Construction and Architecture

Architects and builders use slope calculations to plan ramps, walkways, driveways, roofs, drainage routes, and graded ground. The same mathematical formula can describe each one, but the acceptable slope can be very different depending on the use.

For example, the U.S. ADA Standards specify maximum running and cross slopes for certain accessible walking surfaces and ramps. Those requirements apply within their legal scope and should not be treated as universal design rules for every country or project. Review the official 2010 ADA Standards for Accessible Design.

A calculator can help check the geometry before a project proceeds. It cannot verify the entire design, site conditions, surface finish, drainage capacity, or code compliance. For wider home planning, you may also find our online room layout planner and fence calculator guide useful.

Slope Calculator Examples

These examples show how to use the same rise-over-run principle in coordinate geometry and practical measurements.

Example 1: Find the Slope Between Two Coordinates

Find the slope of the line through (2, 4) and (8, 16).

  • Vertical change = 16 − 4 = 12
  • Horizontal change = 8 − 2 = 6
  • Slope = 12 ÷ 6 = 2

Answer: 2. The line rises two units for every one unit of horizontal movement.

Example 2: Calculate a 1:100 Slope

A surface needs a 1:100 ratio over a horizontal run of 15 feet.

  • Fall = 15 ÷ 100 = 0.15 feet
  • Convert to inches = 0.15 × 12 = 1.8 inches

Answer: 1.8 inches of vertical change over 15 feet. Whether the surface rises or falls depends on the design direction.

Example 3: Calculate Pipe Fall in Feet and Inches

A pipe has a horizontal run of 8 feet and a planned fall of 2 inches. Convert the run to inches:

8 × 12 = 96 inches.

Then calculate:

Slope percentage = (2 ÷ 96) × 100 = 2.08%

Answer: approximately 2.08% slope. Confirm that the calculated grade suits the pipe and local plumbing requirements before installation.

Common Slope Calculation Mistakes

Avoid these common errors when using a slope equation calculator or measuring a physical surface.

  • Mixing units: Convert the run and rise to the same unit before calculating.
  • Reversing only one subtraction: In the coordinate formula, subtract in the same order in the numerator and denominator.
  • Confusing ratio and percentage: A 1:100 ratio is 1%, not 100%.
  • Assuming a negative slope is wrong: A negative value simply indicates a downward direction as x increases.
  • Using the formula for a vertical line: A vertical line has an undefined slope because its horizontal change is zero.
  • Treating a calculation as code approval: Plumbing, drainage, accessibility, and construction rules depend on the project and jurisdiction.
  • Rounding too early: Keep a few extra decimal places during intermediate steps, then round the final measurement to a precision suitable for the job.

Use the Right Slope for Your Project

A slope calculator makes it easier to find line equations, perpendicular slopes, pipe fall, grade percentages, and slope ratios without repeating the calculations by hand. Choose the mode that matches your measurements, keep units consistent, and review the formula behind the result.

For real construction or plumbing work, treat the result as a calculation—not a substitute for the applicable design requirements, code, or professional review.

Frequently Asked Questions

What is the easiest way to calculate slope?

For two coordinate points, subtract the y-values and divide by the difference between the x-values. For a physical surface, divide the vertical rise or fall by the horizontal run. The calculator can then convert the result into a percentage, ratio, or angle.

What is the formula for finding slope?

The standard formula is m = (y₂ − y₁) ÷ (x₂ − x₁). It measures vertical change divided by horizontal change between two points.

How do you calculate a 1:100 slope?

Divide the horizontal run by 100 to find the vertical change. For a 10-foot run, the change is 0.1 feet, or 1.2 inches. A 1:100 slope equals 1%.

How do you calculate slope in feet and inches?

Convert the measurements to the same unit first. For example, 3 inches of fall over 12 feet means 3 inches divided by 144 inches, giving a slope of about 2.08%.

How do you find the slope of a perpendicular line?

For a nonzero, finite slope, take the negative reciprocal. A slope of 3/4 becomes −4/3. Horizontal and vertical lines are perpendicular to each other.

Is slope the same as gradient?

In many math and construction contexts, slope and gradient describe the rate of vertical change relative to horizontal distance. The exact convention and preferred format can depend on the field and region.

What is a 2% slope in inches per foot?

A 2% slope means 0.02 feet of vertical change for every foot of horizontal run. That equals 0.02 × 12 = 0.24 inches per foot, or about 1/4 inch per foot.

Can slope be negative or undefined?

Yes. A negative slope means the line falls as x increases. A vertical line has an undefined slope because the horizontal change is zero, making the standard formula divide by zero.

Leave a Comment