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 (m)1.5000
Inclination56.3099°
Gradient150%
DirectionIncreasing
Rise (Δy)6
Run (Δx)4
Interactive line graph
Drag points to change the line
Drag handles, or use inputs above. Graph dragging works in two-point mode.
Line details
Slope-intercept formy = 1.5000x + 0.5000
Angle from +x axis56.3099°
Perpendicular slope−0.6667
x-intercept−0.3333
y-intercept0.5000
Line segment length7.2111

Table of Contents

  1. How Slope Tool Works?
  2. Practical Use Cases
  3. Accuracy and Limitations
  4. Frequently Asked Questions (FAQs)
  5. Cite This tool

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₁.

m=y2−y1x2−x1=ΔyΔ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.

θ=tan−1(m)gradient=100m%

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.

L=Δx2+Δy2

ResultMeaning
m > 0Line increases from left to right
m < 0Line decreases from left to right
m = 0Horizontal line
Δx = 0Vertical 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.

Frequently Asked Questions

A negative slope means the line falls as x increases. The greater its absolute value, the steeper the descent.

No. Its horizontal change is zero, making the rise-to-run ratio undefined.

Slope is the rise divided by the run. Gradient percentage expresses the same ratio multiplied by 100.

A zero slope describes a horizontal line, where y stays constant as x changes.

For two non-vertical, non-horizontal perpendicular lines, their slopes multiply to −1. A horizontal line is perpendicular to a vertical line.

Cite This tool