🧮AlphaCalc

Slope Calculator

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

Cómo funciona

Slope measures how steep a line is — specifically, how much the line rises or falls vertically for every unit it moves horizontally. This calculator computes it as rise over run: (y₂ − y₁) ÷ (x₂ − x₁), using the coordinates of two points on the line.

A positive slope means the line rises as it moves left to right (like an uphill path), a negative slope means it falls (downhill), a slope of zero means the line is perfectly horizontal (flat), and an undefined slope means the line is perfectly vertical, since dividing by a run of zero is mathematically undefined.

Once slope is known, the y-intercept (where the line crosses the vertical axis) can be found using the point-slope relationship: b = y − mx, using either of the two original points and the calculated slope m. Together, slope and y-intercept fully define the line in the familiar y = mx + b form.

The line's angle from horizontal is found by taking the arctangent of the slope: angle = arctan(slope). A slope of 1 corresponds to a 45° angle (rising at the same rate horizontally and vertically), while steeper slopes correspond to angles approaching 90° (near-vertical) and shallower slopes correspond to angles closer to 0° (near-horizontal).

Slope is one of the most widely used concepts in mathematics and its applications: in construction and road design, it's expressed as "grade" or "pitch" (a percentage or ratio); in physics, the slope of a distance-vs-time graph gives speed; in economics, the slope of a supply or demand curve indicates sensitivity to price changes.

Two lines with the same slope are parallel (they never intersect, since they rise and fall at exactly the same rate), while two lines whose slopes are negative reciprocals of each other (like 2 and −0.5) are perpendicular, intersecting at a perfect right angle.

The slope-intercept form (y = mx + b) this calculator effectively derives is one of the most useful ways to express a line's equation, because both key parameters — steepness (m) and starting position (b) — are directly visible, making it easy to graph the line or predict a y-value for any given x without additional calculation.

What if the two x-values are the same?

That's a vertical line — its slope is undefined, which this calculator reports directly.

What does a negative slope mean?

The line falls as it moves from left to right, the opposite of a positive slope, which rises left to right.

How do I find the y-intercept once I know the slope?

Use b = y − mx with either original point's coordinates and the calculated slope m — this gives the line's y = mx + b equation.

How is slope related to the angle of a line?

The angle from horizontal equals the arctangent of the slope (angle = arctan(slope)) — a slope of 1 corresponds to exactly 45°.

What does it mean if two lines have the same slope?

They're parallel — parallel lines rise and fall at identical rates and therefore never intersect, no matter how far they're extended.

How can I tell if two lines are perpendicular from their slopes?

Their slopes are negative reciprocals of each other (like 2 and −0.5) — multiplying two perpendicular slopes together always gives −1.

What's the difference between slope and grade in road construction?

Grade is slope expressed as a percentage (rise ÷ run × 100) rather than a raw ratio — a 5% grade means 5 units of rise for every 100 units of horizontal run.

Why is slope sometimes called 'rate of change'?

Slope quantifies exactly how much one quantity (y) changes per unit change in another (x) — the same underlying concept used to describe rates in physics, economics, and other applied fields.

Why is slope-intercept form (y = mx + b) useful?

It directly shows both the line's steepness (m) and where it crosses the y-axis (b), making it easy to graph the line or calculate any y-value for a given x without extra steps.

Can a line have a slope of exactly zero?

Yes — a slope of zero describes a perfectly horizontal line, where y stays constant regardless of x.