Slope Calculator

Slope m

1.3333333333

Distance along segment

5

All results
Calculator inputs
?

A distance and inclination define two opposite endpoints; the direction selector chooses one.

?

Horizontal coordinate of the first point. Both x coordinates must use the same unit.

?

Vertical coordinate of the first point. Use the same scale on x and y when interpreting the geometric angle.

?

Horizontal coordinate of the second point, paired with y₂.

?

Vertical coordinate of the second point, paired with x₂.

Rise, run and segment

Signed horizontal and vertical changes

Signed changes retain the selected endpoint direction. The chart uses the entered coordinate units. Their squares, not their signed sum, determine straight-line distance.

Run Δx3
Rise Δy4

Coordinates and line interpretation

An angle requires compatible x/y scales. Grade is a percent; inclination and heading are degrees. Reversing endpoints retains finite slope but reverses signed changes.

Coordinates and line interpretation
MeasurementValue
Starting x₁0
Starting y₁0
Ending x₂3
Ending y₂4
Run Δx3
Rise Δy4
Distance5
Line inclination (degrees)53.1301023542
Directed heading (degrees)53.1301023542
Signed percent grade133.3333333333
y-intercept0
x-intercept-0
Rows 1–12 of 13

Compare slope, grade and inclination

Illustrative geometric conversions, not construction recommendations. 100% grade corresponds to 45°, not 90°.

Compare slope, grade and inclination
SlopeGradeInclination
-2-200 %-63.43494882 °
-1-100 %-45 °
-0.5-50 %-26.56505118 °
00 %0 °
0.550 %26.56505118 °
1100 %45 °
2200 %63.43494882 °

How to use the Slope Calculator

Find slope, rise, run, distance, inclination and line equations. Use two points or one point plus slope or angle and distance, with a labeled coordinate diagram.

  1. 1. Enter your inputs

    Start with Known measurements, Starting x₁, Starting y₁, Ending x₂. Use the units shown beside each field and open the field help when you need its assumptions.

  2. 2. Read the results

    Results update as you enter valid values. Review Slope m, Distance along segment, Line equation. Keep the entered units and settings consistent when comparing scenarios.

  3. 3. Check the calculation

    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.

    See the worked example and method

Understanding the Slope Calculator: uses, inputs and results

The Slope Calculator connects two Cartesian points with their gradient and straight-line separation.

Is the known measurement a horizontal run or a distance along the line?

The Slope Calculator distinguishes rise, run and straight-line length, then connects them to inclination and a line equation.

Direction is not distance

Reversing endpoints changes rise and run signs but keeps a finite slope and positive distance.

A line and a length allow two endpoints

Use the direction selector to choose travel from the given point. Exactly vertical lines belong in angle mode.

Further reading: OpenStax: slope of a line

What do the Slope Calculator inputs mean?

Known measurements
A distance and inclination define two opposite endpoints; the direction selector chooses one.
Starting x₁
Horizontal coordinate of the first point. Both x coordinates must use the same unit.
Starting y₁
Vertical coordinate of the first point. Use the same scale on x and y when interpreting the geometric angle.
Ending x₂
Horizontal coordinate of the second point, paired with y₂. This field applies when Known measurements is set to Two coordinate points.
Ending y₂
Vertical coordinate of the second point, paired with x₂. This field applies when Known measurements is set to Two coordinate points.
Known slope m
Signed rise divided by horizontal run. Use angle mode for a vertical line. This field applies when Known measurements is set to One point, slope and distance.
Inclination angle
Line inclination from -90° through 90°. This is not a compass bearing; reversing direction adds 180° to the directed heading. Unit: °. This field applies when Known measurements is set to One point, angle and distance.
Distance along the line
Straight-line segment length, not horizontal run. Zero length repeats the starting point and cannot determine a unique slope. This field applies when Known measurements is set to One point, slope and distance or One point, angle and distance.
Endpoint direction
The same line and distance have two opposite endpoints. For exactly vertical angles, positive follows the sign of the angle. This field applies when Known measurements is set to One point, slope and distance or One point, angle and distance.

When is the Slope Calculator useful?

Find a line’s gradient

Enter both coordinate pairs to calculate the change in y relative to the change in x.

Check vertical and horizontal cases

Use equal x or y coordinates to understand the slope convention and compare the distance result.

Slope Calculator: a practical reference

The fixed “3-4-5” example on this page produces the results below. It illustrates the stated model; your live results above use your current inputs.

Known measurements
Two coordinate points
Starting x₁
0
Starting y₁
0
Slope m
1.3333333333
Distance along segment
5
Review the example inputs and calculation

Use the result in context

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.

Try the Slope Calculator·Read the subject guide·Explore a related calculator

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 results for the fixed example
Calculated quantityExample result
Slope m1.3333333333
Distance along segment5
Line equationy = (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.

OpenStax: slope of a line

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.