All Over Tools logo
Tool Combiner
Analyze Tools Clean Tools Compare Tools Convert Tools Data Validation Extract Tools Format Tools Generate Tools Organize Tools Transform Tools
Image Tools Video Tools Audio Tools Subtitle Tools Font Tools
Analyze Tools Clean Tools Compress Tools Convert Tools Edit Tools Extract Tools Generate Tools Merge Tools Organize Tools Redact Tools Repair Tools Split Tools
Analyze Tools Clean Tools Compare Tools Convert Tools Extract Tools Generate Tools Merge Tools Transform Tools Validate Tools
Business Calculators Construction Calculators Date And Time Calculators Education Calculators Financial Calculators Food Calculators Health Calculators Math Calculators Science Calculators Sports Calculators Statistics Calculators
Blog About Us Contact Us

Slope Calculator

Find the slope of a line from two coordinate points, or directly from rise and run values. Review the formula and intermediate values, then copy or download the result.

Coordinates can be positive, negative, or zero. Both points must use the same unit.

This labels the coordinates only - slope itself is a dimensionless ratio (unit/unit), so the calculator does not attach a unit to the slope value.

What this slope calculator calculates

Use Two points to calculate slope from x1, y1, x2, and y2. Use Rise and run to enter Rise (Δy) and Run (Δx) directly. A selected Unit changes the coordinate label only; it does not convert the values.

Nonvertical results include the slope, direction, and angle of inclination. The line equation is shown only in Two points mode. A vertical result reports an undefined slope instead of showing an angle or line equation.

How to calculate a slope

  1. Select Two points or Rise and run.
  2. Choose a Unit if you want to label the coordinates.
  3. Enter the required numeric values.
  4. Select Calculate.
  5. Use Copy result or Download result (.txt) to save the plain-text result.

Understand the result

For two points, the calculator uses m = (y2 − y1) / (x2 − x1). For direct inputs, it uses m = rise / run. The rise is the vertical change and the run is the horizontal change.

  • A horizontal line has a slope of 0.
  • A negative slope means the line falls from left to right as x increases.
  • If the run is 0 and the rise is nonzero, the line is vertical and the slope is undefined. The result does not include an angle or line equation.
  • In Two points mode, a nonvertical result can include the line equation in slope-intercept form.

Input validation and limits

Fill in every required field with a value matching the calculator's supported decimal-number pattern. Empty fields and invalid text are rejected. Values with an absolute magnitude greater than 1e12 are also rejected, and the calculator rejects a computed slope that is not finite.

Two identical points are rejected because they do not define a line. In Rise and run mode, a rise and run of both 0 are rejected. A zero run with a nonzero rise is accepted as a vertical line.

Privacy and limitations

The calculation runs locally in your browser, and the tool does not upload the values used for the calculation. The page may still make other requests, such as analytics, page-view handling, or the server-backed subscription form.

The Unit selection labels coordinates but does not convert them. The calculator does not plot a line, infer missing values, or provide certified surveying, engineering, or professional advice.

Frequently Asked Questions

What is the slope formula?

For two points (x1, y1) and (x2, y2), slope m = (y2 - y1) / (x2 - x1). It measures how much y changes (rise) for every unit change in x (run).

What does a negative slope mean?

A negative slope means the line falls from left to right - as x increases, y decreases. A positive slope means the line rises from left to right.

What happens when the run is zero?

When x2 equals x1 (run = 0), the line is vertical and the slope is undefined, since division by zero is not defined. This calculator reports that case explicitly rather than showing a number.

What if the rise is zero?

When y2 equals y1 (rise = 0), the line is horizontal and the slope is exactly 0, regardless of the run value (as long as the run is not also zero).

What units does this calculator support?

You can label coordinates as unitless or in millimeters, centimeters, meters, kilometers, inches, feet, yards, or miles. Slope itself is a dimensionless ratio when both axes share the same unit, so the calculator does not attach a unit to the slope value - it only labels the coordinates you entered.

Related Tools

3 views