Free browser tools that respect your files — everything runs locally, nothing is uploaded.

Slope Calculator

Calculate the slope, angle, and equation of a line. Find slope from two points, or from slope and y-intercept. Includes visual graph and step-by-step solution.

Line Properties

Slope (m)

2

Rising

Equationy = 2x + 0
Angle63.4349°
Grade200%

Try These Examples

Real-world slope calculations

Calculation Mode

Enter Two Points

Line Graph

Point 1: (1, 2)Point 2: (4, 8)

Detailed Results

Slope (m)

2

Y-Intercept (b)

0

X-Intercept

0

Angle

63.4349°

Grade (%)

200%

Distance

6.7082

Midpoint

(2.5, 5)

Line Equation

y = 2x + 0

Step-by-Step Solution

1. Calculate the slope (rise/run):

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

m = (8 - 2) / (4 - 1)

m = 6 / 3

m = 2

2. Find the y-intercept (b):

b = y₁ - m × x₁

b = 2 - 2 × 1

b = 0

3. Write the equation:

y = 2x + 0

Slope Formula

Interactive formula breakdown

m = (y₂ - y₁) / (x₂ - x₁)
m
Slope

The steepness and direction of the line

Current value: 2
y₂
Y2

Y-coordinate of second point

Current value: 8
y₁
Y1

Y-coordinate of first point

Current value: 2
x₂
X2

X-coordinate of second point

Current value: 4
x₁
X1

X-coordinate of first point

Current value: 1
b
Y-Intercept

Where the line crosses the y-axis

Current value: 0

Common Slopes Reference

ApplicationRatioSlopeAngleGrade
ADA Ramp (max)1:120.0834.8°8.3%
Standard Roof4:120.33318.4°33.3%
Steep Roof12:121.00045.0°100.0%
Stairs (typical)7:110.63632.5°63.6%
Highway Grade1:200.0502.9°5.0%

Practice Slope Problems

Test your understanding with real problems

Practice with 6 problems to test your understanding.

Line Properties

Slope (m)

2

Rising

Equationy = 2x + 0
Angle63.4349°
Grade200%

?How to Calculate Slope

Slope (m) measures how steep a line is and is calculated as rise over run: m = (y2-y1)/(x2-x1) using two points (x1,y1) and (x2,y2). A positive slope rises left-to-right, negative slope falls. Zero slope is horizontal, undefined slope is vertical. In slope-intercept form y=mx+b, m is slope and b is the y-intercept.

What is Slope?

Slope is a number that describes both the direction and steepness of a line. Calculated as the ratio of vertical change (rise) to horizontal change (run) between any two points on a line, slope indicates how much y changes for each unit change in x. It is fundamental to linear equations, calculus, and real-world applications like road grades.

Key Facts About Slope

  • Slope formula: m = (y2-y1)/(x2-x1) = rise/run = change in y / change in x
  • Positive slope: line rises from left to right
  • Negative slope: line falls from left to right
  • Zero slope: horizontal line (y = constant)
  • Undefined slope: vertical line (x = constant)
  • Slope-intercept form: y = mx + b where m is slope, b is y-intercept
  • Point-slope form: y - y1 = m(x - x1)
  • Parallel lines have equal slopes; perpendicular lines have slopes that multiply to -1

Quick Answer

Slope (m) measures how steep a line is and is calculated as rise over run: m = (y2-y1)/(x2-x1) using two points (x1,y1) and (x2,y2). A positive slope rises left-to-right, negative slope falls. Zero slope is horizontal, undefined slope is vertical. In slope-intercept form y=mx+b, m is slope and b is the y-intercept.

Frequently Asked Questions

What is slope?

Slope measures the steepness and direction of a line. It's calculated as "rise over run" - the vertical change divided by the horizontal change between two points. A positive slope goes upward left-to-right, while a negative slope goes downward.

What does a slope of 0 mean?

A slope of 0 means the line is perfectly horizontal - it doesn't rise or fall as you move along it. The equation is simply y = b, where b is the y-intercept.

What is an undefined slope?

An undefined slope occurs with vertical lines where the "run" is zero. Since division by zero is undefined, vertical lines have undefined slope. Their equation is x = a constant value.

How do I find the y-intercept?

The y-intercept is where the line crosses the y-axis (when x = 0). Using point-slope form: b = y - mx. In slope-intercept form (y = mx + b), the y-intercept is the "b" value.

What is slope-intercept form?

Slope-intercept form is y = mx + b, where m is the slope and b is the y-intercept. This is the most common form for linear equations because you can immediately identify the slope and y-intercept.

How is slope used in real life?

Slope appears in many contexts: roof pitch (rise/run), road grades (as percentages), wheelchair ramp requirements (maximum 1:12 ratio), stairs (typically 30-35 degrees), and rate of change in economics, science, and engineering.

Last updated: 2026-01-15

Formula:
By Joseph OrdunaHow this works

How this works

Formulas follow standard definitions from the NIST Digital Library of Mathematical Functions and classical textbook derivations. Calculations run entirely in your browser. Where a closed-form solution exists, it is used; where an iterative or numerical method is required, the implementation is named on the page.

Sources

  1. [1]
    NIST Digital Library of Mathematical Functions
    Academicdlmf.nist.govAccessed Apr 21, 2026
Joseph Orduna
Founder & Software Engineer

Full-stack software engineer specializing in embedded systems, web architecture, and AI/ML. Founder of Practical Web Tools. Built the gesture-controlled drone IP acquired by KD Interactive (Aura Drone, sold on Amazon).