Slope Calculator
• Slope (m) = (Y₂ - Y₁) / (X₂ - X₁)
• Angle (θ) = arctan(m) [in degrees]
• Line equation: y = mx + b
• Distance = √((X₂ - X₁)² + (Y₂ - Y₁)²)
Example:
Given Point A (2, 3) and Point B (6, 11):
• m = (11 - 3) / (6 - 2) = 8 / 4 = 2
• θ = arctan(2) ≈ 63.43°
• Line: y = 2x - 1 (using point-slope or slope-intercept form)
• Distance = √((6 - 2)² + (11 - 3)²) = √(16 + 64) = √80 ≈ 8.94
In mathematics, slope—also known as gradient—is a value that describes how steep a line is and the direction it moves. It’s commonly represented by the letter m. The slope is essentially a ratio that shows how much a line rises or falls as you move horizontally between two points. The steepness of a line is determined by the absolute value of its slope. A higher number indicates a steeper incline. The sign of the slope tells us the direction:
When m > 0, the line rises from left to right (increasing).
When m < 0, the line falls from left to right (decreasing).
When m = 0, the line is flat and runs horizontally.
A vertical line has an undefined slope because the horizontal change is zero, leading to division by zero.
The slope is commonly described using the phrase “rise over run,” referring to the change in vertical position divided by the change in horizontal distance. This concept is widely used in fields like engineering, architecture, and geography, especially when analyzing the grade of roads or hills. In this context, “rise” indicates elevation change, while “run” refers to the horizontal distance between two points—assuming the distance isn’t large enough to factor in the Earth’s curvature.
Slope Formula
To calculate slope from two points on a line, use this formula:
m = (y₂ – y₁) / (x₂ – x₁)
Here:
(x₁, y₁) and (x₂, y₂) are coordinates of two points on the line.
Δy = y₂ – y₁ represents the vertical change.
Δx = x₂ – x₁ represents the horizontal change.
These values create a right triangle, where the line between the two points is the hypotenuse. You can calculate the distance between the two points using the Pythagorean theorem:
d = √[(x₂ – x₁)² + (y₂ – y₁)²]
This formula gives the straight-line distance between the points.
Calculating the Angle of Incline
The angle of incline (θ) can be found using the tangent function:
m = tan(θ) → θ = arctan(m)
Let’s look at an example with the points (3, 4) and (6, 8):
m = (8 – 4) / (6 – 3) = 4 / 3
d = √[(6 – 3)² + (8 – 4)²] = √(9 + 16) = √25 = 5
θ = arctan(4 / 3) ≈ 53.13°
This means the line rises at an angle of approximately 53.13 degrees.
While this calculator focuses on linear slopes, the concept extends to calculus as well. For curves, the slope at a specific point represents the rate of change, calculated using derivatives. This is known as the slope of the tangent line to the curve at that point.