Worked example: Slope Calculator
3-4-5. This fixed reference example shows one complete scenario; the interactive results above use your current inputs.
View the example inputs
- Known measurements
- Two coordinate points
- Starting x₁
- 0
- Starting y₁
- 0
- Ending x₂
- 3
- Ending y₂
- 4
| Calculated quantity | Example result |
|---|---|
| Slope m | 1.3333333333 |
| Distance along segment | 5 |
| Line equation | y = (1.333333333)x + 0 |
Slope Calculator: distinguish rise, run, distance, grade and direction
How do I find slope from two points?
For points (x₁, y₁) and (x₂, y₂), subtract corresponding coordinates and divide: m = (y₂ − y₁)/(x₂ − x₁). The Slope Calculator keeps those differences visible as rise and run. Starting at (0, 0) and ending at (3, 4) gives rise 4, run 3 and slope 4/3.
Keep the coordinates paired. Reversing both points negates both differences and leaves the finite slope unchanged. Reversing only the order in one subtraction changes the sign incorrectly. A negative slope means y decreases as x increases; it does not mean the straight-line distance is negative.
Is distance the same as horizontal run?
No. Horizontal run is Δx, while the segment’s straight-line length is √(Δx² + Δy²). In the 3-by-4 example, run is 3 but distance along the line is 5. The diagram draws the horizontal and vertical changes separately from the segment.
Use the same length unit on both axes when interpreting a physical angle or distance. A graph of dollars against years can have a meaningful rate of change, but its numerical slope is dollars per year; treating that number as a ramp angle would mix unrelated units.
How do I convert slope to percent grade or degrees?
Percent grade is 100m, while line inclination is arctan(m). A slope of 1 is a 100% grade and an inclination of 45°. A 10% grade means 0.10 unit of rise per unit of horizontal run; it is not an angle of 10°.
The reference table compares both representations. Inclination here lies between −90° and 90°. The directed heading uses the selected start-to-end direction and can differ by 180° after swapping endpoints. Neither quantity is a compass bearing or a determination that a real structure meets a regulation.
How do I find another point from slope and distance?
Choose one-point mode and enter the starting coordinates, slope and distance along the line. From (1, 1), a slope of 0.75 and length 5 give coordinate changes (4, 3), so the positive-direction endpoint is (5, 4). The opposite-direction endpoint is (−3, −2).
Both endpoints belong to the same line and lie the stated distance from the starting point. The direction selector makes that choice explicit. Angle mode accepts an inclination instead of a finite slope and includes exactly vertical angles. A zero distance repeats the starting point and cannot by itself establish a unique line.
How do I write the equation of a line from its slope?
A nonvertical line can be written as y = mx + b, where b = y₁ − mx₁. For (1, 1) and (5, 4), m = 0.75 and b = 0.25, giving y = 0.75x + 0.25. Substituting either point checks the equation.
A vertical line instead has equation x = a constant; it has no finite slope or unique finite y-intercept. Two coincident points do not determine any unique line. The calculator labels those cases explicitly rather than dividing by zero or treating a repeated point as a horizontal line.
When should I use the Slope Calculator?
Use it to check coordinate geometry, compare a stated rise/run ratio, derive a line equation or locate a point a known distance along an idealized straight line. It also helps interpret why a gentle-looking graph can have a large numerical slope when its axes use different scales.
The coordinate visual uses equal scale on both axes, and the signed-change chart separates direction from length. Geographic travel, curved paths and real construction tolerances require additional models or specifications. The related Distance and Right Triangle calculators answer connected questions with their own assumptions.
Formula and calculation method
Slope = (y₂−y₁)/(x₂−x₁); distance = hypot(Δx,Δy). Signed percent grade = 100 × slope, not an angle in degrees.
Inclination uses atan(slope) in −90° to 90°. Directed segment heading uses atan2(Δy,Δx) and can differ by 180° after swapping points. Exactly vertical signed inclination follows the segment direction.
With one point, length d and slope m, Δx = ±d/√(1+m²), Δy = mΔx. Angle mode uses d cos(θ), d sin(θ) with the selected direction.
Vertical lines have undefined finite slope and equation x = constant. Coincident points have zero distance and no unique line; they are not a horizontal line.
Line equations, angles and diagram geometry assume compatible coordinate units and equal horizontal/vertical scales. Inputs and derived values must stay within finite numeric limits.
Scope and Limitations
- A straight Cartesian line only. Percent grade is not a road or accessibility compliance assessment. Decimal/fraction inputs are numeric approximations; geographic coordinates need a different distance model.
Reference Sources
Frequently asked questions
Is a vertical line’s slope zero?
No. A vertical line has undefined finite slope. A horizontal line has slope zero.
What is the slope of two identical points?
It is not uniquely determined. The distance is zero, but infinitely many lines pass through that one point.
Does 100% grade mean 90 degrees?
No. A 100% grade has equal rise and horizontal run, giving 45°.
Why are there two possible endpoints?
A line, starting point and positive distance allow travel in two opposite directions. Select the desired direction.
Can I use differently scaled x and y units?
The slope can represent a rate, but a physical distance or inclination requires compatible units and equal coordinate scales.