Slope of a Line


Output: Press calculate


Buy Me A Coffee

Formula:m = (y2 - y1) / (x2 - x1)

Introduction to Slope of a Line Calculator

The slope of a line, represented by the letter 'm' in the formula, indicates the steepness or incline of the line. It is calculated by finding the ratio of the vertical change (difference in the y-coordinates) to the horizontal change (difference in the x-coordinates) between two distinct points on the line. If the line is vertical, the slope is undefined, and if the line is horizontal, the slope is 0. This formula applies to all straight lines, including ones with positive, negative, or zero slopes.

Parameter usage:

Example valid values:

Output:

Data validation

The x-coordinates should not be equal to each other to avoid division by zero. All numbers are allowed for computation.

Summary

This calculator accepts the coordinates of two points and outputs the slope of the line passing through those points. It works for both positive and negative slopes, as well as for undefined slopes in the case of vertical lines.

Tags: Geometry, Line, Slope