Math

Slope Calculator

Find the slope of a line between two points.

CALCULATOR

Enter your numbers

Instant results

THE NUMORIX GUIDE

How to use the Slope Calculator

Last reviewed September 14, 2026

What this calculator does

For points (x1,y1) and (x2,y2), calculate dx=x2-x1, dy=y2-y1, slope m=dy/dx, angle=arctan(m) in degrees, and y-intercept b=y1-m*x1.

Formula and method

For points (x1,y1) and (x2,y2), calculate dx=x2-x1, dy=y2-y1, slope m=dy/dx, angle=arctan(m) in degrees, and y-intercept b=y1-m*x1. A vertical line has undefined slope and no y-intercept.

Variables and inputs

The default points are (0,0) and (4,6). The UI has four coordinate fields and accepts negative or fractional coordinates.

Worked example

For (0,0) and (4,6): dx=4, dy=6; m=6/4=1.5; angle=arctan(1.5)=56.31 degrees; b=0-1.5*0=0, so the line is y=1.5x.

How to interpret the result

Slope is vertical change per unit horizontal change. Its sign indicates increasing or decreasing direction from left to right.

Common mistakes to avoid

Keep the point order consistent in both numerator and denominator. Do not assign a finite slope to a vertical line or divide by zero when x2=x1.

Assumptions and limitations

The angle uses arctan and is reported in the principal range; the calculator does not fit a line to multiple noisy points. Vertical lines have an angle of 90 degrees by convention here.

Practical use and checks

The Slope Calculator describes the line through two coordinate points. Enter (0, 0) and (4, 6) as a check; the slope should be 1.5, the angle about 56.31 degrees, and the y-intercept 0, giving y = 1.5x. The numerator is the change in y and the denominator is the change in x, so reversing both point labels should leave the slope unchanged. Use the result for a rate of change, a line equation, or a quick coordinate-geometry check. A positive slope rises from left to right, a negative slope falls, and zero is horizontal. When the two x-values are equal, the line is vertical and the slope is undefined rather than a very large finite number; the calculator may use a special display convention for its angle. Keep coordinate units consistent because slope carries a unit ratio such as meters per second or dollars per item. The tool fits exactly two points and does not estimate a trend from noisy data, test causation, or provide a regression uncertainty. Rounding coordinates before calculating can change a result substantially when horizontal separation is small. For measurements, retain the original points and state whether the line is being used for interpolation, extrapolation, or a physical rate.

Sources and references

COMMON QUESTIONS

Frequently asked questions

What does slope zero mean?

The line is horizontal: y does not change as x changes.

Why is a vertical slope undefined?

The horizontal change is zero, so dy/dx would require division by zero; the line is better written x = constant.

FROM THE NUMORIX GUIDES

Learn more before you decide