Slope Intercept Calculator
A vertical line has undefined slope, not infinite.
Work out Slope Intercept. A vertical line has undefined slope, not infinite. Every convention shown, not just one.
Slope 2
y = 2x + 0
Crosses the y-axis at 0 · 63.43° from horizontal
Perpendicular slopes multiply to −1, which is why the perpendicular to a slope of 2 is −0.5. Parallel lines share a slope and differ only in intercept. Both facts follow directly from the rise-over-run definition rather than needing to be memorised separately.
How the Slope Intercept Calculator works
The equation of a line through two points, with slope, both intercepts, the perpendicular slope and the angle from horizontal. Vertical lines are handled properly rather than returning infinity.
Also known as: slope from two points · find the equation of a line · gradient between two points · y equals mx plus b calculator
Undefined is not infinite
A vertical line has a run of zero, and slope is rise over run. Division by zero has no answer rather than an arbitrarily large one, which is why the slope is undefined rather than infinite.
It also means a vertical line cannot be written in slope-intercept form at all. That is a genuine limitation of the form, and it is why standard form Ax + By = C is preferred where vertical lines are possible.
The practical consequence appears in fitting and in graphics code. Any algorithm that computes a slope needs an explicit branch for the vertical case, and code that omits it produces an infinity that propagates.
Perpendicular slopes multiply to −1
The perpendicular to a slope of 2 is −0.5, and to −3 is 1/3. The rule follows from rotating a right triangle a quarter turn: the rise and run swap and one changes sign.
Parallel lines share a slope and differ only in intercept. If both match they are the same line rather than parallel ones, which matters when solving a system — it is the difference between no solution and infinitely many.
Both facts are consequences of the rise-over-run definition rather than separate rules to memorise. Deriving them once from the definition is more durable than remembering them as facts.
Slope as a rate of change
Every linear relationship has a slope with units attached: kilometres per hour, cost per unit, rise per unit run. The slope is the rate, and the intercept is the value when the input is zero.
That is why the same arithmetic appears as a gradient in construction and as a grade on a road sign. A 1 in 12 ramp is a slope of 0.0833, which as a percentage grade is 8.33%.
It is also the foundation of the derivative. The slope between two points becomes the instantaneous rate of change as the points converge, which is the whole of differential calculus starting from rise over run.
Where to go next
The Slope Intercept question rarely arrives on its own. These are the ones that usually come with it:
- Quadratic Formula Calculator — The discriminant decides everything before you solve.
- Perimeter Calculator — Three lengths only make a triangle if two beat the third.
- Angle Converter — 360 degrees is Babylonian; radians are natural.
- Percentage Calculator — Every common percentage question in one place.
Frequently asked questions
How do I find the slope from two points?
Rise over run: the change in y divided by the change in x. From (0,0) to (2,4) the rise is 4 and the run is 2, so the slope is 2.
What is slope-intercept form?
y = mx + b, where m is the slope and b is where the line crosses the y-axis. It is the most useful form for sketching a line, because both pieces of information are visible.
What is the slope of a vertical line?
Undefined, not infinite. The run is zero, and division by zero has no answer rather than a very large one. A vertical line cannot be written in slope-intercept form at all.
How do I find a perpendicular slope?
Take the negative reciprocal. Perpendicular slopes multiply to −1, so the perpendicular to a slope of 2 is −0.5. It follows directly from the rise-over-run definition.
What makes two lines parallel?
The same slope and a different intercept. If both the slope and intercept match they are the same line rather than parallel lines.
What is point-slope form?
y − y₁ = m(x − x₁), which is more convenient when you know a point and the slope rather than the intercept. It rearranges to slope-intercept form in one step.
What is standard form?
Ax + By = C, which handles vertical lines that slope-intercept form cannot and which makes finding both intercepts straightforward. It is preferred in linear programming for that reason.
How do I find where two lines intersect?
Set the two equations equal and solve for x, then substitute back for y. Parallel lines give no solution, which shows up as an equation with no x term left.
What does a negative slope mean?
The line falls from left to right — y decreases as x increases. The steeper the fall, the more negative the number.
What is slope in a real-world context?
A rate of change: distance per unit time, cost per unit produced, rise per unit run. Every linear relationship has a slope with units attached.
What is a line of best fit?
A line fitted through scattered points to minimise the total squared vertical distance. It has a slope and intercept exactly like any line, computed from the data rather than from two chosen points.
Put this calculator on your own site
Free to use, on any site, commercial or not. Paste this where you want it to appear. It is a plain iframe, so it works in WordPress, Squarespace, Wix, Webflow, Ghost and anything else that accepts HTML.
<iframe src="https://www.thecalclibrary.com/embed/slope-intercept-calculator" width="100%" height="640" style="border:1px solid #e2e8f0;border-radius:12px" loading="lazy" title="Slope Intercept Calculator"></iframe>
<p style="font:13px/1.5 system-ui,sans-serif;margin:6px 0 0;color:#64748b">Powered by <a href="https://www.thecalclibrary.com/slope-intercept-calculator" style="color:#64748b">Slope Intercept Calculator</a> from The Calc Library</p>The only condition is that the credit line below the frame stays in place. That one line is what pays for the tool being free — it is how anyone else finds it.
Related calculators
Quadratic Formula Calculator
The discriminant decides everything before you solve.
OpenPerimeter Calculator
Three lengths only make a triangle if two beat the third.
OpenAngle Converter
360 degrees is Babylonian; radians are natural.
OpenPercentage Calculator
Every common percentage question in one place.
Open