Find the slope, angle, and equation of a line passing through two points.
A Slope Calculator determines the steepness and direction of a line based on two points' coordinates, expressing the result as a slope value, angle of inclination, or percentage grade. This tool is used in mathematics for analyzing linear equations, in construction and engineering for calculating ramp or roof pitch, and in geography for describing terrain steepness.
Slope (m) = (y2 − y1) / (x2 − x1), representing the "rise over run" between two points (x1, y1) and (x2, y2). This slope value can be converted to an angle using the arctangent function (angle = arctan(slope)), or expressed as a percentage grade by multiplying the slope by 100.
Enter the coordinates of two points, either as (x1, y1) and (x2, y2) values, or as rise and run measurements directly. The calculator returns the slope, along with the equivalent angle of inclination and percentage grade for easy interpretation across different contexts.
Example 1: Two points at (2, 3) and (6, 11) have a slope of (11−3)/(6−2) = 8/4 = 2, meaning the line rises 2 units for every 1 unit of horizontal distance.
Example 2: A wheelchair ramp rising 1 foot over a horizontal run of 12 feet has a slope of 1/12 ≈ 0.083, which as a percentage grade is approximately 8.3%.
A negative slope indicates that as you move from left to right along the line, the value decreases (the line goes downward), which is the opposite of a positive slope where the line rises as you move rightward.
A horizontal line has a slope of exactly zero, since there is no vertical change (rise) regardless of how far you move horizontally, meaning the y-coordinate stays constant across the entire line.
A vertical line has no horizontal change (run equals zero), and since the slope formula involves dividing by the run, dividing by zero produces an undefined result, which is why vertical lines are a special mathematical case.
Roof pitch is essentially a slope expressed as a ratio of vertical rise to a fixed horizontal run (commonly 12 units), such as a "6-in-12" pitch meaning the roof rises 6 inches for every 12 inches of horizontal distance, directly derived from the same slope concept.
Percentage grade is simply the slope expressed as a percentage (slope × 100), so a road with a 6% grade rises 6 units vertically for every 100 units traveled horizontally, a common way roads and trails communicate steepness to drivers and hikers.
In the standard slope-intercept form y = mx + b, the slope (m) directly determines how steeply the line rises or falls, while b represents the y-intercept, making slope one of the two fundamental values needed to fully describe a straight line.
Building codes typically limit ramp slope (often to a maximum of 1:12, or roughly 8.3%) to ensure ramps remain safely navigable for wheelchair users and people with mobility limitations, making slope calculations essential for compliant accessible design.
The slope formula calculates the average slope (secant line) between two points on any curve, while the instantaneous slope at a single specific point on a curve requires calculus (derivatives) to determine precisely.
Trail grade, essentially the slope of the path expressed as a percentage, is a key factor hiking organizations use when rating trail difficulty, since steeper sustained grades demand significantly more physical effort than gentler inclines over the same distance.
While mathematics uses "slope" for a simple line's steepness, fields like geography and engineering often use "gradient" interchangeably, though gradient can also refer to a more general multi-dimensional rate of change in advanced mathematical contexts.
Civil engineers calculate minimum and maximum slope requirements for drainage pipes and surface grading to ensure water flows properly without pooling or causing erosion, making accurate slope calculation essential for functional site drainage design.
Parallel lines always share the exact same slope, while perpendicular lines have slopes that are negative reciprocals of each other, relationships frequently used to verify or construct geometric figures in coordinate geometry.
The slope of a distance-time graph directly represents speed, since it captures how much distance changes per unit of time, making slope a visual, intuitive way to read speed information directly off a graph.