# Slope Calculator

Calculate the slope of a line between two points instantly. Find the equation y=mx+b, y-intercept, angle, and distance. Free online slope calculator.

## What this calculates

Find the slope, equation, y-intercept, and angle of inclination of a line passing through two points. Enter the coordinates and get instant results with the complete line equation in slope-intercept form.

## Inputs

- **Point 1: X coordinate**
- **Point 1: Y coordinate**
- **Point 2: X coordinate**
- **Point 2: Y coordinate**

## Outputs

- **Slope (m)** — The slope of the line (rise / run).
- **Line Equation (y = mx + b)** — formatted as text — The equation of the line in slope-intercept form.
- **Y-Intercept (b)** — Where the line crosses the y-axis.
- **Angle of Inclination** — formatted as text — The angle the line makes with the positive x-axis.
- **Distance Between Points** — The distance between the two points.

## Details

The slope of a line measures its steepness and direction. It is defined as the ratio of the vertical change (rise) to the horizontal change (run) between any two points on the line.

Slope Formula

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

Slope-Intercept Form

The equation y = mx + b describes a line where m is the slope and b is the y-intercept (where the line crosses the y-axis). Given two points, you can find both m and b.

Types of Slope

- Positive slope: Line rises from left to right.

- Negative slope: Line falls from left to right.

- Zero slope: Horizontal line (y = constant).

- Undefined slope: Vertical line (x = constant).

Slope is fundamental in calculus (derivatives), physics (velocity), economics (marginal cost), and data science (linear regression).

## Frequently Asked Questions

**Q: How do I calculate slope?**

A: Use the formula m = (y2 - y1) / (x2 - x1). Subtract the y-coordinates (rise) and divide by the difference in x-coordinates (run). For points (2, 3) and (6, 11): m = (11 - 3) / (6 - 2) = 8 / 4 = 2. This means the line rises 2 units for every 1 unit it moves right.

**Q: What does a slope of 0 mean?**

A: A slope of zero means the line is perfectly horizontal. There is no vertical change between any two points on the line. The equation is y = b (a constant). For example, the line through (1, 5) and (7, 5) has slope 0 and equation y = 5.

**Q: What is an undefined slope?**

A: An undefined slope occurs when the line is vertical (x1 = x2), making the denominator zero in the slope formula. Vertical lines cannot be expressed as y = mx + b because they have infinitely steep rise. Instead, they are written as x = a constant, such as x = 3.

**Q: How do I find the y-intercept from two points?**

A: First calculate the slope m = (y2 - y1) / (x2 - x1). Then use point-slope form with either point: b = y1 - m x x1. For points (2, 5) and (4, 9): m = (9-5)/(4-2) = 2, then b = 5 - 2 x 2 = 1. The equation is y = 2x + 1.

**Q: How are slope and angle of inclination related?**

A: The angle of inclination (theta) is the angle the line makes with the positive x-axis. The relationship is m = tan(theta), or theta = arctan(m). A 45-degree angle gives slope 1, a 135-degree angle gives slope -1, and a 0-degree angle gives slope 0. Vertical lines have a 90-degree angle of inclination.

---

Source: https://vastcalc.com/calculators/math/slope
Category: Math
Last updated: 2026-04-21
