Try

Slope Calculator

Slope, y-intercept and angle of the line through two points.

Slope (m)

2

y = 2x + 0

Y-intercept

0

Angle

63.43°

ΔY / ΔX

6 / 3

AI Breakdown & Smart Takeaway

Plain-English insight on your numbers

Get a personalized explanation of what these results mean — and how to improve them.

AdvertisementAd space

How the Slope Calculator works

The GKCalculators Slope Calculator finds the slope (gradient), y-intercept, and angle of inclination of the straight line passing through any two points you enter — making it indispensable for students, engineers, architects, and anyone working with linear relationships in math or the real world.

At its core, this calculator takes two coordinate pairs — (x₁, y₁) and (x₂, y₂) — and computes how steeply the line between them rises or falls. The slope is calculated as the ratio of the vertical change to the horizontal change, often memorized as 'rise over run.' This single number tells you the direction and steepness of the line: a positive slope means the line climbs from left to right, a negative slope means it descends, a slope of zero means the line is perfectly horizontal, and an undefined slope means the line is perfectly vertical (where the run is zero and division becomes impossible).

Once the slope (m) is known, the calculator uses one of the two points to solve for the y-intercept (b) — the value of y where the line crosses the vertical axis. It applies the slope-intercept relationship b = y₁ − m·x₁, giving you the full equation of the line in the familiar form y = mx + b. This equation lets you predict any other point on the line instantly, which is why linear equations are so powerful in fields ranging from economics (cost functions) to physics (velocity graphs).

Beyond slope and y-intercept, the calculator also converts the slope into an angle of inclination measured in degrees. It does this using the arctangent function: angle θ = arctan(m). This is particularly useful in construction, road engineering, and roof design, where a gradient is often more intuitively expressed as an angle than as a decimal ratio. For example, a slope of 1 corresponds to a 45° angle, while a slope of 0.5 corresponds to roughly 26.57°.

A common mistake users make is swapping the order of coordinates — subtracting x₁ from x₂ in the numerator but y₂ from y₁ in the denominator (or vice versa). The sign of the slope will be wrong even though the magnitude looks right. Another frequent error is entering the same x-value for both points and not recognizing that this produces an undefined (vertical line) result rather than a zero slope. This calculator handles both edge cases explicitly, flagging undefined slopes and zero slopes with clear labels so you always know exactly what kind of line you're working with.

Formula

m = (y₂ − y₁) / (x₂ − x₁)

Pro tips

  • Always double-check that you subtract coordinates in the same order in both the numerator and denominator: (y₂ − y₁) / (x₂ − x₁). Mixing up the order flips the sign of your slope.
  • If you're working with a graph rather than an equation, pick two points where the line crosses grid intersections exactly — this eliminates rounding errors and gives you a clean, whole-number rise and run.
  • Use the angle output when communicating slopes to non-mathematicians. A roofer or civil engineer will immediately understand '30 degrees' far more readily than a slope of 0.577.
  • A slope of zero and an undefined slope are not the same thing — zero slope means a flat horizontal line, while undefined means a vertical line. Confusing these two is one of the most common errors on exams.
  • Once you have the slope, use it to check whether two lines are parallel (equal slopes) or perpendicular (slopes that multiply to −1). This is a fast way to verify geometric relationships without drawing anything.

Key terms

Slope (Gradient)
— The slope of a line measures its steepness and direction, defined as the ratio of the vertical change (rise) to the horizontal change (run) between any two points on the line.
Y-Intercept
— The y-intercept is the point where a line crosses the y-axis, found by setting x = 0 in the line's equation; it is represented as 'b' in the slope-intercept form y = mx + b.
Rise Over Run
— Rise over run is the intuitive way to remember the slope formula — rise is the vertical difference (Δy) and run is the horizontal difference (Δx) between two points.
Angle of Inclination
— The angle of inclination is the angle a line makes with the positive x-axis, calculated as the arctangent of the slope and expressed in degrees (ranging from 0° to just below 90° for positive slopes).
Slope-Intercept Form
— Slope-intercept form (y = mx + b) is a standard way to express a linear equation where m is the slope and b is the y-intercept, making it easy to graph and interpret the line.
Undefined Slope
— A slope is undefined when the two points share the same x-coordinate, producing a vertical line where the run equals zero and division by zero is mathematically impossible.

Frequently asked questions