Calculator
Example Data Table
| Point A (x₁, y₁) | Point B (x₂, y₂) | Δy | Δx | Slope (m) |
|---|---|---|---|---|
| (2, 3) | (8, 11) | 8 | 6 | 1.3333 |
| (-1, 4) | (3, 0) | -4 | 4 | -1 |
| (5, 2) | (5, 9) | 7 | 0 | Undefined |
Formula Used
- Δy = y₂ − y₁ and Δx = x₂ − x₁
- m = Δy / Δx (slope). If Δx = 0, the slope is undefined (vertical line).
- θ = arctan(m) gives the angle in radians; convert to degrees for display.
- Percent grade: grade% = 100 × m
- Line equation (when slope is defined): y = mx + b, where b = y₁ − m·x₁
How to Use
- Select a method: Two points or Rise and run.
- Enter values in the input fields (decimals supported).
- Optionally enable Show steps to see intermediate values.
- Click Calculate. The result appears above the form.
- Use Download CSV or Download PDF to export the result.
Direction and rate of change
Positive and negative slopes describe direction and rate of change. A positive slope means y increases when x increases, while a negative slope means y decreases as x grows. The magnitude tells steepness: values near zero look flat, and large absolute values look steep. In applications, slope represents speed, cost per unit, or sensitivity. Interpreting units matters, because slope carries y-units per x-unit, always. For example, m=2 rises two per one step.
Two-point computation and edge cases
Using two points, the calculator first finds run Δx and rise Δy, then divides to obtain m. This ratio is invariant for any two points on the same straight line, which is why slope is a defining property of linear relationships. When Δx equals zero, the line is vertical and the slope is undefined. The tool still reports rise and run so you can diagnose the geometry quickly, for planning and checking.
Angle and percent grade interpretation
Angle and percent grade are alternative slope views. The angle θ is arctan(m), so equal slopes share the same inclination. Percent grade is 100×m and is common in ramps, roads, and engineering drawings. Small slopes yield small angles; large slopes approach ninety degrees as the line becomes vertical. Converting between these forms helps communicate results to different audiences without changing the underlying relationship. In navigation, bearing changes relate to slopes on charts.
Link to line equations and reporting
Slope also connects to line equations. With m and a known point (x1, y1), the intercept b is computed as b = y1 − m·x1, producing y = mx + b. This is useful for forecasting y at new x values and for comparing multiple trends on the same axes. If your inputs are integers, a simplified fraction may be shown, which reduces rounding ambiguity in reporting. It also enables quick graphing.
Data quality and practical workflow
Quality of results depends on careful input. Use consistent coordinate units and verify that both points belong to the intended line. For measurement data, choose points that are far apart to reduce rounding effects in Δx and Δy. If values are noisy, compute slopes across multiple pairs and compare. Exporting the results table supports documentation, peer review, and repeatable calculations in reports. Record assumptions, then rerun scenarios when inputs or units change.
FAQs
What does an undefined slope mean?
It means the run Δx is zero, so the line is vertical. Division by zero is not defined, so slope cannot be expressed as a finite number.
Can the slope be a fraction?
Yes. When rise and run are integers, the calculator can show a simplified fraction like 3/4, which is often clearer than a rounded decimal.
How is slope related to percent grade?
Percent grade equals 100 multiplied by the slope m. A slope of 0.08 corresponds to an 8% grade.
Why does my slope change when I swap the points?
Swapping points changes both Δy and Δx signs, so their ratio stays the same. You should get the same slope unless values were entered incorrectly.
What units should I use for x and y?
Use any consistent units. Slope is expressed as y-units per x-unit, so mixing units can make interpretation misleading.
How can I reduce rounding error?
Use points that are farther apart, keep more decimal precision in inputs, and export results for review. For noisy data, compare slopes from several point pairs.