Home › Calculators › Slope Calculator

Slope Calculator

Type two points to find the slope of the line through them, its equation in slope-intercept, point-slope and standard form, the angle of inclination, intercepts, percent grade and the distance between the points, all shown on a graph.

Last updated:

Point 1 (x₁, y₁)
Point 2 (x₂, y₂)
Enter your values to see the result.
Advertisement
Advertisement

How to use the Slope Calculator

  1. Enter point 1 (x₁, y₁).
  2. Enter point 2 (x₂, y₂). Negative numbers and decimals are fine.
  3. Read the slope and the line equation instantly.
  4. Look at the graph to see the rise, run and y-intercept.
  5. Copy the results or download more points on the line as CSV.

Slope and line formulas

WhatFormulaExample: (1, 2) and (5, 8)
Slopem = (y₂ − y₁) ÷ (x₂ − x₁)6 ÷ 4 = 1.5
y-interceptb = y₁ − m·x₁2 − 1.5 × 1 = 0.5
Slope-intercept formy = mx + by = 1.5x + 0.5
Point-slope formy − y₁ = m(x − x₁)y − 2 = 1.5(x − 1)
Standard formAx + By = C3x − 2y = −1
Angle of inclinationθ = arctan(m)arctan(1.5) ≈ 56.31°
Distanced = √((x₂ − x₁)² + (y₂ − y₁)²)√52 = 2√13 ≈ 7.2111

Slope, angle and grade

Slope (m)AngleGradeRatio (rise : run)
0.010.57°1%1 : 100
0.08334.76°8.33%1 : 12
0.15.71°10%1 : 10
0.2514.04°25%1 : 4
0.526.57°50%1 : 2
0.577430°57.74%1 : 1.732
145°100%1 : 1
1.732160°173.21%1.732 : 1

A 1 : 12 slope (about 8.33%) is the maximum running slope commonly specified for wheelchair ramps; road grades are usually given in percent and roof pitch as rise per 12 units of run.

Frequently asked questions

What is the slope formula?

Slope m = (y₂ − y₁) ÷ (x₂ − x₁), often called rise over run. For the points (1, 2) and (5, 8) the rise is 6, the run is 4 and the slope is 6 ÷ 4 = 1.5.

How do I find the equation of a line from two points?

Find the slope m, then the y-intercept b = y₁ − m·x₁ and write y = mx + b. For (1, 2) and (5, 8): m = 1.5, b = 2 − 1.5 = 0.5, so the line is y = 1.5x + 0.5.

What does a negative, zero or undefined slope mean?

A positive slope rises from left to right, a negative slope falls, a zero slope is a horizontal line (y = constant) and an undefined slope is a vertical line (x = constant), because the run is zero and you cannot divide by zero.

How do I convert slope to an angle or percent grade?

The angle of inclination is arctan(m): a slope of 1 is 45°. Percent grade is the slope × 100: a slope of 0.05 is a 5% grade, which rises 5 units for every 100 units of horizontal distance.

What is the slope of a perpendicular line?

It is the negative reciprocal, −1 ÷ m. Two non-vertical lines are perpendicular when their slopes multiply to −1, e.g. 2 and −0.5. Parallel lines have equal slopes.

Does it matter which point is first?

No. Swapping the points changes the sign of both the rise and the run, so their ratio, the slope, stays the same. The distance and the equation are also unchanged.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Midpoint CalculatorFind the midpoint of two points in 2D or 3D, or the missing endpoint from a midpoint.Distance Formula CalculatorDistance between two points in 2D or 3D with step-by-step work and an exact radical answer.Graphing CalculatorPlot multiple functions with zoom, pan, intersections and a value table.Triangle CalculatorSolve any triangle from SSS, SAS, ASA, AAS or right-triangle values: sides, angles, area, type.Coordinate Plane Graph PaperPrint XY coordinate grids with numbered axes: range, scale and 1, 4, 6 or 9 grids per page.Domain and Range CalculatorFind the domain and range of a function in interval notation, with steps and a graph.Implicit Differentiation CalculatorFind dy/dx for any equation in x and y with steps, plus the slope and tangent at a point.Tangent Line CalculatorFind the tangent and normal line to f(x) at a point, with the derivative, slope and a graph.Roofing Calculator (Roof Squares)Estimate roof area, squares, shingle bundles and cost from pitch.Square Root CalculatorFind square, cube and nth roots with simplified radical form and steps.Body Surface Area CalculatorCalculate body surface area in m² with the Du Bois, Mosteller, Haycock and other formulas.Pythagorean Theorem CalculatorSolve for the hypotenuse or a missing leg of a right triangle, with a diagram and steps.Area CalculatorFind the area of squares, rectangles, triangles, circles, trapezoids, ellipses and sectors.Volume CalculatorVolume of a cube, box, cylinder, sphere, cone, pyramid or capsule, in liters and gallons too.Surface Area CalculatorSurface area of a cube, box, cylinder, sphere, cone or pyramid, with lateral and base areas.Circle CalculatorEnter a circle's radius, diameter, circumference or area and get all the others.Pascal's Triangle GeneratorGenerate Pascal's triangle up to row 30, highlight a row and expand (ax + by)ⁿ.Trigonometry CalculatorSin, cos, tan, csc, sec, cot and inverses in degrees or radians, with exact values.Arc Length CalculatorArc length, sector area and chord from radius and angle, or solve for the radius or angle.Cylinder Volume CalculatorCylinder volume in liters, gallons and cubic units from radius or diameter, plus surface area.Regular Polygon CalculatorArea, perimeter, apothem, radius and angles of a regular polygon from any one measurement.Aquarium Volume CalculatorFish tank gallons, liters and water weight: rectangle, cylinder, bow-front and hexagon tanks.Tank Volume CalculatorTotal and filled volume of cylinder, rectangular and capsule tanks in gallons and liters.Circle Skirt CalculatorWaist radius, fabric yardage and cutting layout for full, half or quarter circle skirts.Ellipse CalculatorArea, perimeter (Ramanujan), eccentricity, foci and equation of an ellipse from its axes.Camera Field of View CalculatorAngle of view and frame size from focal length, sensor size and subject distance.Law of Sines and Cosines CalculatorSolve SSS, SAS, ASA, AAS and SSA triangles with the laws of sines and cosines, steps shown.Miter Angle CalculatorMiter saw angle for any polygon or corner, plus crown molding miter and bevel settings.Simplify Square Root CalculatorSimplify square, cube and nth roots to simplest radical form a√b, with steps.Interactive Unit CircleDrag an angle on the unit circle to see degrees, radians and exact sin, cos and tan. Printable chart.Cone Volume CalculatorVolume, slant height and surface area of a right cone from its radius and height.Perimeter CalculatorPerimeter of a square, rectangle, triangle, circle, trapezoid, polygon or sector, with a diagram.Point Slope Form CalculatorLine equation in point-slope form from a point and slope or two points, plus y = mx + b.Polar to Cartesian ConverterConvert polar coordinates (r, θ) to rectangular (x, y) with steps, a plot and bulk lists.Right Triangle CalculatorSolve a right triangle from any two values: sides, angles, area, perimeter and altitude.Slope Intercept Form CalculatorGet y = mx + b from two points, a point and slope, or standard form, with steps and a graph.Sphere Volume CalculatorVolume and surface area of a sphere from radius, diameter or circumference, or the reverse.Trapezoid Area CalculatorArea, perimeter, median and missing base or height of a trapezoid, with a diagram.45-45-90 Triangle CalculatorSolve an isosceles right triangle from a leg or hypotenuse, with sides in exact √2 form.Complementary and Supplementary Angle CalculatorComplement, supplement and explement of any angle in degrees or radians, with diagrams.Coordinate Plane PlotterPlot points, segments and polygons on an interactive coordinate grid, or print blank planes.Coterminal Angle CalculatorList positive and negative coterminal angles and the principal angle, in degrees and radians.Heron's Formula CalculatorFind a triangle's area from its three sides with Heron's formula, semi-perimeter and steps.Inverse Trig Calculatorarcsin, arccos, arctan, arcsec, arccsc and arccot in degrees and radians, with exact values.Polygon Area from CoordinatesArea, perimeter and centroid of any polygon from its vertex coordinates (shoelace formula).Reference Angle CalculatorFind the reference angle and quadrant of any angle in degrees or radians, with a unit circle sketch.30-60-90 Triangle CalculatorEnter one side of a 30-60-90 triangle to get the other sides, area and perimeter in exact radical form.
See all 46 Geometry & Trigonometry Calculators →