Mathematics

Slope Calculator

Find the slope, y-intercept, equation, and angle between two points on a line.

Slope

2.6667

y-Intercept (b)-0.6667
Line Equationy = 2.6667x0.6667
Distance8.544 units
Angle69.44°

What is the Slope Calculator?

The slope of a line measures its steepness and direction. It is calculated as the ratio of the vertical change (rise) to the horizontal change (run) between two points. The slope is positive if the line goes up from left to right, negative if it goes down, zero if it is horizontal, and undefined for vertical lines.

How it works

Enter the coordinates of two points (x₁, y₁) and (x₂, y₂). The calculator computes the slope using m = (y₂ − y₁) / (x₂ − x₁), then derives the y-intercept b = y₁ − m·x₁, the line equation y = mx + b, the distance between points, and the angle in degrees.

m = (y₂ − y₁) / (x₂ − x₁), b = y₁ − m·x₁, distance = √[(x₂ − x₁)² + (y₂ − y₁)²], angle = arctan(m) × (180/π)

The slope m is the rise divided by the run. The y-intercept b tells you where the line crosses the y-axis. The distance formula uses the Pythagorean theorem. The angle converts the arctangent result from radians to degrees.

Examples

InputResultNotes
Point 1: (1, 2), Point 2: (4, 10)Slope = 2.6667The line rises 8 units for every 3 units to the right; a steep positive slope.
Point 1: (0, 5), Point 2: (5, 0)Slope = −1The line falls at a 45-degree angle; a negative slope indicates descent.
Point 1: (2, 3), Point 2: (2, 8)Slope = undefinedVertical line; the slope is undefined because the denominator (x₂ − x₁) is zero.

How to use the Slope Calculator

  1. Input the x and y coordinates of your first point (x₁, y₁).
  2. Input the x and y coordinates of your second point (x₂, y₂).
  3. The calculator automatically computes the slope using the slope formula.
  4. The y-intercept is calculated from the slope and the first point.
  5. The line equation y = mx + b is displayed in standard form.
  6. The distance and angle of inclination are also provided for reference.

Benefits

  • Quickly find the slope without manual algebra.
  • Understand the direction and steepness of any line.
  • Derive the complete line equation instantly.
  • Calculate the distance and angle between two points in one tool.
  • Verify homework answers and build confidence in coordinate geometry.
  • Apply slope to real-world contexts like road grades, roof pitches, and ramp angles.

Tips & common mistakes

Common mistakes

  • Forgetting that vertical lines have undefined slope, not zero slope.
  • Confusing slope (m) with y-intercept (b) when reading the line equation.
  • Entering points in the wrong order; slope is the same regardless of order.
  • Not accounting for negative slopes when interpreting the direction of a line.

Tips

  • Use the default points (1, 2) and (4, 10) to see a real calculation immediately.
  • Positive slope means the line goes up; negative slope means it goes down.
  • The angle output helps visualize how steeply the line is inclined.
  • For a horizontal line, the slope is exactly 0 and the angle is 0°.

Frequently asked questions

What does undefined slope mean?

A vertical line has undefined slope because you cannot divide by zero. The denominator (x₂ − x₁) is zero when both points have the same x-coordinate.

How do I interpret a negative slope?

A negative slope indicates that the line falls from left to right. The larger the absolute value of the slope, the steeper the decline.

What is the y-intercept?

The y-intercept (b) is the y-coordinate where the line crosses the y-axis. It occurs when x = 0.

How do I use the angle in practice?

The angle of inclination (in degrees) tells you how many degrees the line is tilted from horizontal. An angle of 45° means the slope is 1.

Can I swap the two points?

Yes. Swapping points does not change the slope, y-intercept, or equation—it is the same line.

How is distance calculated?

Distance uses the Pythagorean theorem: √[(x₂ − x₁)² + (y₂ − y₁)²]. This gives the straight-line distance between the two points.

Related tools

FreeToolz Editorial Team · Last reviewed July 2026

Reviewed for accuracy. Results are estimates for general information and are not professional (medical, financial or legal) advice.