Slope Calculator
Coordinates
Enter two points (x1, y1) and (x2, y2) to calculate the slope, distance, and angle of the line connecting them.
Understanding Slope
The slope of a line is a number that measures its "steepness" and direction. It is usually denoted by the letter m.
In mathematics, the slope is defined as the ratio of the "rise" (vertical change) to the "run" (horizontal change) between any two distinct points on a line.
Slope Formula
Given two points on a line, (x₁, y₁) and (x₂, y₂), the slope formula is:
Types of Slope
Positive Slope
The line goes up from left to right (m > 0).
Negative Slope
The line goes down from left to right (m < 0).
Zero Slope
A horizontal line (m = 0).
Undefined Slope
A vertical line (division by zero).
How to Find the Equation of a Line
Once you have the slope (m), you can find the equation of the line using the Point-Slope Form or Slope-Intercept Form.
Slope-Intercept Form
y = mx + bHere, b is the y-intercept (where the line crosses the y-axis).
Steps:
- Calculate the slope m.
- Use one point (x, y) and substitute into y = mx + b.
- Solve for b.
- Write final equation.
Real World Examples
- Road Grade: A road with a 6% grade rises 6 feet for every 100 feet of horizontal distance. The slope is 6/100 or 0.06.
- Roof Pitch: Roofers use "pitch" to describe slope, often written as x/12 (e.g., 4/12 pitch rises 4 inches for every 12 inches of run).
- Economics: In a supply and demand graph, the slope of the curve represents the rate of change in price relative to quantity.
Frequently Asked Questions
What if the denominator is zero?
If x₂ - x₁ = 0, the slope is undefined. This means the line is perfectly vertical.
Can slope be negative?
Yes. A negative slope means the line is decreasing (going downhill) as you move from left to right.
How do I calculate distance between points?
This calculator also provides the distance. The formula is based on the Pythagorean theorem: d = √[(x₂ - x₁)² + (y₂ - y₁)²].