Slope of a Line Calculator

Calculate slope and equation of a line.

Save

Inputs

Your values stay on this device.

Results

Slope (m)
Equationy = 2x + 0
Angle (°)63.43

Report

Export and share

Document

Copy and share

Assumptions

  • The two points are in the same 2D coordinate plane.
  • A vertical line has undefined slope and is reported as Infinity.
  • For non-vertical lines, the calculator reports the line in slope-intercept form.

Sensitivity preview

x1 -10%: Slope (m) 1.95

x1 Current: Slope (m) 2

x1 +10%: Slope (m) 2.05

Related Tools

View All

About this Slope Calculator

The slope describes the steepness and direction of a line. It is a fundamental concept in algebra and calculus, often referred to as 'Rise over Run'. This calculator finds the slope and the full linear equation given two points.

Who this calculator is for

  • Students graphing lines or practicing slope-intercept form.
  • Teachers and tutors checking coordinate geometry work.
  • Anyone who needs a fast rise-over-run check from two points.

When to use it

  • Use this calculator to find the slope from two points.
  • Use it to write the line equation in y = mx + b form.
  • Use it to identify horizontal, vertical, positive, or negative slopes.

How to use this calculator

  1. Enter the coordinates of the first point (x1, y1).
  2. Enter the coordinates of the second point (x2, y2).
  3. The tool calculates the Slope (m), the Y-Intercept (b), and the angle.

Key assumptions

  • The two points are in the same 2D coordinate plane.
  • A vertical line has undefined slope and is reported as Infinity.
  • For non-vertical lines, the calculator reports the line in slope-intercept form.

Accuracy and testing

Review formula sources, default test cases, assumptions, unit handling, rounding rules, and changelog for this calculator.

View accuracy page

How this calculator works

1. Slope (m): $(y_2 - y_1) / (x_2 - x_1)$ 2. Y-Intercept (b): $y_1 - (m \times x_1)$ 3. Equation: $y = mx + b$

Inputs explained

Coordinates

The X and Y positions of two distinct points on the line.

Understanding your results

A Positive Slope goes up from left to right. A Negative Slope goes down. A Zero Slope is a horizontal line. An Undefined Slope is a vertical line.

Example scenarios

Positive Slope

Points (1,2) and (3,6). Rise = 4, Run = 2. Slope = 2. Equation: y = 2x.

Negative Slope

Points (0,10) and (5,0). Rise = -10, Run = 5. Slope = -2. Equation: y = -2x + 10.

Key Features

  • Calculates Slope (m)
  • Generates Line Equation
  • Finds Angle in Degrees

Tips & Best Practices

  • Slope is often denoted by the letter 'm'.
  • Parallel lines have the same slope.
  • Perpendicular lines have slopes that are negative reciprocals (e.g., 2 and -1/2).

Glossary of Terms

Rise
The vertical change between two points.
Run
The horizontal change between two points.
Intercept
The point where the line crosses the Y-axis (when x=0).

Frequently Asked Questions

What is the slope formula?
Slope (m) = (y₂ - y₁) / (x₂ - x₁).
What does an undefined slope mean?
It means the line is vertical. The 'Run' is zero, and you cannot divide by zero.
What is slope-intercept form?
It is the equation format y = mx + b, where 'm' is the slope and 'b' is the y-intercept.