Skip to main content

Slope Calculator

Calculate the slope, angle, distance, and equation of a line given two points.

Slope Calculator

Calculate the slope of a line from two points.

Point 1

Point 2

Slope Diagramxy(x₁, y₁)(x₂, y₂)Run (x₂ - x₁)Rise (y₂ - y₁)

Understanding Slope

In mathematics, the slope (or gradient) of a line is a number that describes both the direction and the steepness of the line. It's often denoted by the letter 'm'.

Slope Formula

The slope is calculated as "rise over run" - the change in the vertical direction (y) divided by the change in the horizontal direction (x).

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

Line Equation

The equation of a straight line is commonly written as:

y = mx + b

Where 'm' is the slope and 'b' is the y-intercept (the point where the line crosses the y-axis).

Angle of Inclination

The angle of inclination (θ) is the angle the line makes with the positive x-axis. It is calculated using the arctangent of the slope.

θ = arctan(m)

Understanding the Steepness of a Line

In mathematics, the slope (or gradient) of a line is a number that describes both its direction and steepness. It's the "rise over run"—the change in the vertical direction divided by the change in the horizontal direction. I built this calculator to not only find the slope but also provide other key properties of the line connecting two points.

How to Use the Slope Calculator

Simply enter the coordinates for two points, and the calculator will instantly provide:

  • The slope of the line, as both a decimal and a simplified fraction.
  • The angle of inclination in degrees.
  • The distance between the two points.
  • The equation of the line in slope-intercept form (y = mx + b).

1. The Slope Formula

Given two points (x₁, y₁) and (x₂, y₂), the slope 'm' is calculated as:

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

A positive slope means the line goes up from left to right, while a negative slope means it goes down. A horizontal line has a slope of 0, and a vertical line has an undefined slope.

2. The Line Equation

The calculator provides the equation in the form y = mx + b, where 'm' is the slope and 'b' is the y-intercept (the point where the line crosses the vertical y-axis). It finds 'b' by plugging one of the points and the calculated slope back into the equation: b = y₁ - m * x₁.

3. Angle and Distance

The angle of the line is found using the arctangent of the slope: θ = arctan(m). The distance is found using the distance formula, which is derived from the Pythagorean theorem.

Related Calculators

Nth Root Calculator

Standard Deviation Calculator

Time to Decimal