Slope Tool
Calculate the slope of a straight line from two points, rise and run, an angle, percentage gradient or standard-form equation. Explore an interactive coordinate graph, inspect intercepts and perpendicular slopes, and export results or graphics.
| Slope-intercept form | y = 1.5000x + 0.5000 |
|---|---|
| Angle from +x axis | 56.3099° |
| Perpendicular slope | −0.6667 |
| x-intercept | −0.3333 |
| y-intercept | 0.5000 |
| Line segment length | 7.2111 |
Table of Contents
Highlights
- Five slope input methods: points, rise/run, angle, gradient and equation
- Interactive line graph with draggable coordinate points
- Instant slope, inclination and percentage gradient results
- Intercepts, perpendicular slope and segment length details
- Export calculations as CSV or JSON and graphs as PNG or SVG
How Slope Tool Works?
The slope of a straight line measures the change in its vertical coordinate relative to the change in its horizontal coordinate. For points (x₁, y₁) and (x₂, y₂), rise is Δy = y₂ − y₁ and run is Δx = x₂ − x₁.
The tool also accepts rise and run directly, an inclination angle (degrees or radians), percentage gradient, or coefficients A, B and C from Ax + By + C = 0. The slope is tan(θ) for an angle, gradient ÷ 100 for a percentage, and −A/B for a standard-form equation when B ≠ 0.
For a non-vertical line the equation is y = mx + b, where b = y₁ − mx₁. The perpendicular slope is −1/m when m is non-zero and finite. The segment length, where defined by points or rise and run, follows the Pythagorean theorem.
| Result | Meaning |
|---|---|
| m > 0 | Line increases from left to right |
| m < 0 | Line decreases from left to right |
| m = 0 | Horizontal line |
| Δx = 0 | Vertical line; slope is undefined |
For example, points (1, 2) and (5, 8) give rise 6, run 4, slope 1.5, inclination approximately 56.31°, and equation y = 1.5x + 0.5. The graph shows the line and an optional rise/run triangle; in two-point mode, dragging the plotted points changes the results.
Practical Use Cases
Students and teachers: Check coordinate-geometry exercises using two points, compare positive and negative slopes, and inspect intercepts alongside the plotted straight line.
Architects and designers: Explore the relationship between a proposed line's rise, run, inclination angle and percentage gradient when sketching ramps or sloping layouts.
Surveyors and site planners: Express a straight-line grade as a percentage or an angle, and see how changing the horizontal run affects its steepness.
Engineers and CAD users: Start with a line equation in Ax + By + C = 0 form to inspect its slope, intercepts and perpendicular-line gradient.
Data analysts: Determine the rate of change between two data points and examine the corresponding line on Cartesian axes.
Accuracy and Limitations
Results use browser JavaScript floating-point arithmetic and are displayed to 2, 4, 6 or 8 decimal places. The tool models straight lines only, not curved or varying slopes. Coincident points and zero rise with zero run are rejected; a vertical line has an undefined slope, shown as infinity. Angles calculated from slopes use the principal arctangent range of −90° to 90°, so they do not preserve a full 0°–360° direction. Very large values may exceed numeric or plotting limits, and exported figures are graphical representations rather than scale-certified drawings.