Enter two points, or a slope and one point, and get the slope, the angle of incline, the distance between the points, the midpoint, the full line equation and the perpendicular slope, with a labeled rise-over-run chart.
Slope, usually written m, is a single number that captures both the steepness and the direction of a straight line. It answers the question: for every one step I take to the right, how many steps does the line go up or down? A slope of 2 means the line climbs 2 units for every 1 unit across; a slope of -0.5 means it drifts half a unit down per unit across. The larger the absolute value, the steeper the line.
Because it is a pure ratio, slope carries no units of its own: a ramp with slope 0.083 is "one unit up for every twelve across" whether those units are meters, feet or miles. That is what makes slope the shared language of graphs, roads, roofs and drain pipes.
For two points on a line, the slope is the vertical change divided by the horizontal change:
m = (y₂ - y₁) ÷ (x₂ - x₁) = Δy ÷ Δx
rise over run · the order of subtraction does not matter as long as both differences keep the same order
Worked example: points (1, 2) and (4, 8). The rise is 8 - 2 = 6, the run is 4 - 1 = 3, and the slope is 6 ÷ 3 = 2. The distance between the points comes from the Pythagorean theorem on the rise and run: √(3² + 6²) = √45 = 6.70820. The angle of incline satisfies tan(θ) = m, so θ = arctan(2) = 63.43495°. The line equation is y = mx + b, and b = y₁ - m·x₁ = 2 - 2 × 1 = 0, giving y = 2x. A perpendicular line would have slope -1 ÷ 2 = -0.5.
Slope, the angle of incline and the grade percentage are three dialects of the same measurement. The angle satisfies m = tan(θ), so θ = arctan(m); the grade is the slope written as a percentage. A slope of 2 is an angle of 63.43° and a grade of 200%. Construction speaks in ratios instead: an accessibility ramp built at 1:12 rises one unit per twelve units of run, which is a slope of 1 ÷ 12 = 0.0833, a grade of 8.33% and an angle of arctan(0.0833) = 4.76°. Try the preset buttons above the inputs to see each of these computed live.
The angle reading is most useful for small slopes, where slope and grade feel abstract; the ratio reading is most useful in building codes, which specify maximum rises and runs precisely because angles are harder to measure accurately on site.
Two lines are parallel exactly when they share the same slope: y = 2x and y = 2x + 7 never meet, because one is the other lifted seven units. Two lines are perpendicular when their slopes multiply to -1, that is, each slope is the negative reciprocal of the other: the perpendicular partner of slope 2 is -1 ÷ 2 = -0.5, and the perpendicular partner of slope -3/4 is 4/3. Horizontal and vertical lines are each other's special case: a horizontal line (m = 0) meets a vertical one (undefined slope) at a perfect right angle, which is why the perpendicular-slope formula breaks down exactly there.
The perpendicular slope is the workhorse of coordinate geometry: it is how you build the shortest distance from a point to a line, the altitude of a triangle and the perpendicular bisector used to find a circle's center from three points.
Slope as we know it dates to 1637, when René Descartes published his appendix La Géométrie and welded algebra onto geometry: every straight line became an equation, and its steepness became a coefficient. Isaac Newton and Gottfried Leibniz sharpened the idea half a century later with calculus, defining slope for curves as the limit of ever-smaller secants, and engineers in the railway age turned it into the grade percentages still posted on mountain routes today. The letter m for slope appeared in English textbooks in the 19th century; nobody is certain whether it was meant for "modulus", from the Latin for measure, and the mystery has outlived every plausible explanation.
Subtract the y coordinates to get the rise, subtract the x coordinates in the same order to get the run, and divide: m = (y₂ - y₁) ÷ (x₂ - x₁). For points (1, 2) and (4, 8), that is (8 - 2) ÷ (4 - 1) = 6 ÷ 3 = 2. The calculator does this instantly and also gives the angle, distance and line equation.
Because the run between any two points on a vertical line is zero, and the slope formula would divide by zero, which has no answer. A vertical line rises without moving across, so no finite number describes its steepness. Its equation is written x = c rather than y = mx + b, and it has no y-intercept to speak of.
They are the same measurement in different clothing. Slope is the ratio itself, such as 0.0833; the grade is that ratio written as a percentage, so a 1-in-12 ramp has a grade of 8.33%. Road signs use the percentage form, mathematics uses the decimal form, and converting between them is just multiplying or dividing by 100.
Flip the slope and change its sign: the perpendicular slope is -1 divided by m. A slope of 2 has perpendicular slope -0.5, and a slope of -3/4 has perpendicular slope 4/3. The rule works for every nonzero slope; horizontal and vertical lines are perpendicular to each other by definition, which is exactly where the formula has no value to produce.
No, as long as the y and x differences are subtracted in the same order. Swapping the points flips the sign of both the rise and the run, and the two negatives cancel, returning the identical slope. What breaks the calculation is mixing the order, subtracting y₂ - y₁ but x₁ - x₂, which changes the sign of the answer.
Use y = mx + b and solve for b with any point on the line: b = y - m·x. With slope 2 through the point (1, 2), b = 2 - 2 × 1 = 0, so the equation is y = 2x. The calculator's "slope and a point" mode performs exactly this step and prints the finished equation, including the special forms y = b and x = c.
The angle of incline is the arctangent of the slope: θ = arctan(m). A slope of 1 is exactly 45°, a slope of 2 is 63.43°, and the accessibility standard of 1:12 works out to 4.76°. For steep slopes the angle changes slowly, since arctan approaches 90° only as the slope grows without bound.
No. Every calculation runs in your browser. Nothing is stored or transmitted.