Enter two points to get the slope, angle of incline, distance and equation of the line, or work out a second point from a slope or an angle.
Enter the coordinates of the two points on the line.
Give one point, how far away the second point is, and either the slope or the angle of incline. Fill in only one of slope and angle.
Slope is "rise over run": how far a line goes up or down (the change in y) for every step it goes across (the change in x). A slope of 2 means the line climbs 2 units for each 1 unit to the right. A positive slope rises from left to right, a negative slope falls, a slope of 0 is perfectly flat, and a vertical line has no slope at all because its run is zero and you cannot divide by zero. The bigger the number, ignoring the sign, the steeper the line.
Take the points (1, 2) and (4, 8). The run is 4 − 1 = 3 and the rise is 8 − 2 = 6, so the slope is 6 ÷ 3 = 2. The line makes an angle of about 63.43° with the horizontal, and the distance between the two points is √(3² + 6²) = √45, which is about 6.708. Because the line also passes through the origin, its equation is y = 2x. If you only need the straight-line distance, the Distance Calculator does that in one step and also covers 3D points and latitude and longitude.
Once you know the slope m, the line is y = mx + b, and you find b by putting one of your points into the equation. For (2, 5) and (7, 9) the slope is 4/5 = 0.8, so b = 5 − 0.8 × 2 = 3.4 and the line is y = 0.8x + 3.4. The calculator shows this both as a decimal and as exact fractions (y = 4/5 x + 17/5), which is handy for homework that wants fractions. It also gives the two intercepts: where the line crosses the y-axis (set x = 0) and the x-axis (set y = 0).
Roads, ramps and roofs are usually described by grade or pitch rather than slope. Multiply the slope by 100 for a percent grade, so a slope of 0.08 is an 8% grade. A ramp of 1 unit rise for every 12 of run, a common limit for wheelchair ramps, has a slope of 0.0833, which is an 8.33% grade and an angle of about 4.76°. A roof pitch of 6 in 12 is a slope of 0.5 and an angle of 26.57°. If you are building one, the Roofing Calculator and the Stair Calculator use the same rise-and-run idea.
The lower form answers a different question: you are standing at a point, you know which way a line runs, and you want to know where you will be after travelling a set distance. Give it a slope and it returns two points, one in each direction along the line. Give it an angle of incline and it returns the single point in that direction. This is the same maths surveyors, game developers and anyone laying out a plan on a grid use when they move "d units at angle θ".
A slope is half of a right triangle: the run and the rise are its two legs and the distance between the points is the hypotenuse. If you want all the angles and sides of that triangle, use the Right Triangle Calculator, and for the plain length of the hypotenuse the Pythagorean Theorem Calculator is quicker. For triangles that do not have a right angle, try the Triangle Calculator.
Subtract the y-values and divide by the difference of the x-values: m = (y₂ − y₁) ÷ (x₂ − x₁).
A horizontal line has a slope of 0. A vertical line has an undefined slope because the change in x is zero.
Take the arctangent of the slope. A slope of 1 is 45°, and a slope of 0.5 is about 26.57°.
The line goes downward as you move to the right. The steepness is given by the size of the number, ignoring the minus sign.
Multiply by 100. A slope of 0.06 is a 6% grade, meaning the surface rises 6 units for every 100 units of horizontal distance.
Pick another tool to jump straight to it.