Slope Intercept Form Calculator

Free Slope Intercept Form Calculator: enter slope m and y-intercept b to get y=mx+b, point-slope, standard & general form. Also finds x/y intercepts,...

?????? ?????????

y=mx+bm=(y2y1)/(x2x1)b=ymxy = mx + b | m = (y₂-y₁)/(x₂-x₁) | b = y - mx
m=m — Slope: rise ÷ run = (y₂−y₁)/(x₂−x₁). Positive=rises, negative=falls, zero=horizontal, undefined=vertical.
b=b — Y-intercept: the y-value where the line crosses the x=0 axis. The line always passes through (0, b).
x,y=x, y — Any point on the line satisfying y=mx+b. x-intercept: set y=0 → x=−b/m. Y-intercept: set x=0 → y=b.
A,B,C=A, B, C — Coefficients in standard form Ax+By=C. Convert: m=−A/B, b=C/B. Requires B≠0 (else vertical line x=C/A).
Slope Intercept Form Calculator
y = mx + b · Find Slope, Intercepts, All Line Forms, Angle & Distance
Enter slope m and y-intercept b directly to build y=mx+b. Outputs all line forms, both intercepts, angle, parallel/perpendicular slopes, and distance from origin.
m
rise ÷ run
b
where line crosses y-axis
Slope Intercept Form Quick Reference
Slope-Intercept
y = mx + b m = slope, b = y-int
Find Slope m
m = (y₂−y₁) ───────── (x₂−x₁)
Find Y-Intercept
b = y₁ − m·x₁ set x=0 in y=mx+b
X-Intercept
set y=0: x = −b / m
Point-Slope Form
y − y₁ = m(x − x₁) converts → y=mx+b
Standard Form
Ax + By = C m = −A/B, b = C/B
Parallel Lines
same slope m different b values
Perpendicular
m_perp = −1/m m₁ × m₂ = −1
Angle θ
θ = arctan(m) m = tan(θ)
Origin Distance
d = |b| / √(1+m²) perpendicular from O
Parallel Distance
d = |b₂−b₁| / √(1+m²) between y=mx+b₁,b₂
Two Points
use m=(y₂−y₁)/(x₂−x₁) then b=y₁−m·x₁

How to Use the Slope Intercept Form Calculator

This calculator supports four input modes and instantly outputs every useful representation of the line:

  • Mode 1 — Slope + Y-Intercept (m, b): The most direct mode. Enter slope m and y-intercept b to build y=mx+b immediately. Outputs point-slope form, standard form Ax+By=C, general form, x-intercept, angle of inclination θ=arctan(m), parallel slope, perpendicular slope, and distance from the origin.
  • Mode 2 — Two Points: Enter (x₁,y₁) and (x₂,y₂). Computes m=(y₂−y₁)/(x₂−x₁) first, then b=y₁−mx₁, and derives all four line forms. Also calculates point distance d=√(Δx²+Δy²) and midpoint M.
  • Mode 3 — Point + Slope: Enter a point (x₁,y₁) and slope m. Computes b=y₁−mx₁ and builds all forms. Ideal when you know the slope and one coordinate but not the y-intercept directly.
  • Mode 4 — Standard Form (Ax+By=C): Enter integer coefficients A, B, C and convert to y=mx+b by solving for y: y=−(A/B)x+C/B, so m=−A/B and b=C/B. Also handles vertical lines (B=0) specially.

All outputs are click-to-copy. The interactive SVG graph visualizes the line with the slope triangle, both intercepts, and midpoint (when two points are given).

What is Slope Intercept Form?

Slope Intercept Form Calculator infographic showing coordinate grid with line y=2x+3, slope triangle labeled rise=2 run=1, y-intercept (0,3) in amber, x-intercept (-1.5,0) in teal, large formula y=mx+b in white with m and b annotated, worked example m=2 b=3 giving y=2x+3 x-intercept -1.5 angle 63.43°, on dark navy premium background

Slope intercept form is the equation of a straight line written as:

y = mx + b

where m is the slope (steepness and direction of the line) and b is the y-intercept (where the line crosses the y-axis). This is the most widely used and recognizable form of a linear equation because it makes both key geometric features immediately visible:

  • m = slope = rise/run: For every 1 unit you move right along the x-axis, the y-value changes by m. Positive m → line rises left to right. Negative m → line falls. Zero → horizontal. Undefined → vertical (cannot be expressed in this form).
  • b = y-intercept: The line always passes through the point (0, b). This is the starting point for graphing: plot (0, b), then apply the slope to find the next point.

Example: y = 3x − 5. Slope m = 3 means the line rises 3 units for every 1 unit rightward. Y-intercept b = −5 means the line crosses the y-axis at (0, −5). To graph: start at (0, −5), then move right 1 and up 3 to get (1, −2), then (2, 1), etc.

Slope intercept form is ideal for: graphing lines quickly, identifying slope and y-intercept by inspection, writing the equation of a line when you know m and b, and understanding the family of parallel lines (all with the same m but different b values).

Finding Slope and Y-Intercept from Various Inputs

Line Equation Forms and Conversions chart showing four columns: Slope-Intercept y=mx+b, Point-Slope y-y₁=m(x-x₁), Standard Form Ax+By=C, Two-Point Form, with conversion arrows, special slope table for m=0/±1/tan(30)/tan(60), parallel same slope and perpendicular m₁m₂=-1 rules, on dark navy background with teal borders and amber monospace text

You can arrive at y=mx+b from many starting points:

  • From two points (x₁,y₁) and (x₂,y₂): Step 1: Slope m = (y₂−y₁)/(x₂−x₁). Step 2: Y-intercept b = y₁ − m·x₁ (substitute either point). Step 3: Write y = mx + b. Example: (1, 2) and (3, 8): m = (8−2)/(3−1) = 3. b = 2 − 3(1) = −1. Equation: y = 3x − 1. Verify: 3(3)−1 = 8 ✓. Relationship to Point Slope Form: using (x₁,y₁), write y−y₁=m(x−x₁), then expand and solve for y to get slope-intercept form. Both forms represent the same line.
  • From a point and slope: Given point (x₁,y₁) and slope m: b = y₁ − m·x₁. Example: point (4, 7), slope 2: b = 7 − 8 = −1. Equation: y = 2x − 1. Verify: 2(4)−1 = 7 ✓.
  • From standard form Ax+By=C: Solve for y: By = −Ax + C → y = (−A/B)x + C/B. So m = −A/B and b = C/B. Example: 3x − 2y = 6 → y = (3/2)x − 3. Slope m = 3/2, b = −3. Verify at x=0: y = −3; check: 3(0)−2(−3) = 6 ✓.
  • From x-intercept and y-intercept: x-intercept = (a, 0) and y-intercept = (0, b). Slope m = (b − 0)/(0 − a) = −b/a. Equation: y = (−b/a)x + b = b(1 − x/a). The intercept form is x/a + y/b = 1, which converts to y = b − (b/a)x = −(b/a)x + b. Example: x-intercept (3, 0) and y-intercept (0, 6): m = −6/3 = −2. Equation: y = −2x + 6. Verify: at x=3: y = −6+6 = 0 ✓.

X-Intercept, Y-Intercept, and Graphing

Every non-horizontal line crosses both axes. Finding the intercepts is the fastest way to graph a line:

  • Y-intercept: Set x = 0: y = m(0) + b = b. The y-intercept is always (0, b) — directly readable from the equation. This is the primary advantage of slope-intercept form over all other forms.
  • X-intercept: Set y = 0: 0 = mx + b → x = −b/m (when m ≠ 0). Example: y = 4x − 8: x-intercept = 8/4 = 2, so (2, 0). For horizontal lines (m=0, y=b): if b≠0, the line never crosses the x-axis (no x-intercept); if b=0, the line IS the x-axis (infinite x-intercepts).
  • Graphing from slope-intercept form: (1) Plot y-intercept (0, b). (2) Use slope m = rise/run: from (0,b), move right by "run" units and up by "rise" units. If m = 3/2: right 2, up 3. If m is an integer like m=4: right 1, up 4. (3) Connect the points. (4) Extend in both directions. For m < 0: move right by run, down by |rise|. Example: y = −(2/3)x + 4. Plot (0, 4). Move right 3, down 2 → (3, 2). Move right 3, down 2 again → (6, 0). Connect and extend.
  • Two-point method vs slope-intercept: The two-point method for graphing (plot any two points and connect) gives the same line as the slope-intercept method. The y-intercept (0, b) is just a convenient first point because x=0 simplifies the calculation.

The Slope m: Interpretation and Special Cases

The slope m is the most important parameter of a line:

  • Positive slope (m > 0): Line rises from left to right. The larger |m|, the steeper the rise. m = 0.5: gentle slope (rising 1 unit per 2 units rightward). m = 10: very steep (rising 10 units per 1 unit). All parallel lines have the same slope. Parallel to y = 3x + 2: any line y = 3x + k for k ≠ 2.
  • Negative slope (m < 0): Line falls from left to right. m = −1: line falls at exactly 45° (makes 135° inclination angle). m = −0.1: nearly flat, very gentle decline.
  • Zero slope (m = 0): Horizontal line. Equation: y = b (constant). Example: y = 3 is the horizontal line passing through all points where y=3. No x-intercept (unless b=0). Perpendicular to every vertical line x=k.
  • Undefined slope: Vertical line x = k. Cannot be expressed as y=mx+b (no finite slope). Standard form: 1·x + 0·y = k. Perpendicular to every horizontal line y=b. The slope "formula" 0/0 or n/0 is undefined.
  • Slope = ±1: Line at exactly 45° (m=1) or 135° (m=−1). These are the angle bisectors of the coordinate axes. The identity function y=x has m=1, b=0.
  • Angle of inclination θ: θ = arctan(m) for m ≥ 0; θ = 180° + arctan(m) for m < 0 (since arctan returns −90° to 90°, but inclination is 0° to 180°). Key: m=tan(30°)=1/√3≈0.577, m=tan(45°)=1, m=tan(60°)=√3≈1.732. Use our Trigonometry Calculator to convert any angle to its slope.

Parallel Lines, Perpendicular Lines, and Distance

  • Parallel lines (same slope, different y-intercept): All lines y=mx+k for different values of k are parallel to y=mx+b, separated by a perpendicular distance of |k−b|/√(1+m²). Example: y=2x+3 and y=2x−7: distance = |3−(−7)|/√(1+4) = 10/√5 = 2√5 ≈ 4.472 units. The lines never intersect.
  • Perpendicular lines (slopes multiply to −1): If line L has slope m, the perpendicular slope is m_perp = −1/m. Example: Line y=3x+5 has slope 3. Perpendicular slope = −1/3. Line perpendicular to y=3x+5 through (6, 2): b = 2−(−1/3)(6) = 2+2 = 4. Equation: y = −x/3 + 4. Verify: 3 × (−1/3) = −1 ✓. For our Point Slope Form Calculator, you can write the perpendicular line using point-slope before converting to slope-intercept.
  • Distance from origin to line y=mx+b: The perpendicular distance from (0,0) to the line mx−y+b=0 is |b|/√(1+m²). Example: y=3x+4 → distance = 4/√10 ≈ 1.265 units. This is the shortest distance from the origin to any point on the line.
  • Intersection of two lines: y=m₁x+b₁ and y=m₂x+b₂ intersect at x=(b₂−b₁)/(m₁−m₂), y=m₁(b₂−b₁)/(m₁−m₂)+b₁. If m₁=m₂ (parallel): no intersection (unless b₁=b₂, i.e., same line). Example: y=2x+1 and y=−x+7: x=(7−1)/(2−(−1))=6/3=2. y=2(2)+1=5. Intersection: (2, 5). Check in second equation: −2+7=5 ✓.

Real-World Applications of Slope Intercept Form

  • Linear Cost Models: Total cost C = mx + b where m is the variable cost per unit and b is the fixed cost. Example: manufacturing cost $15/unit plus $2000 fixed = C = 15x + 2000. The y-intercept 2000 is the startup cost when x=0 units. The slope 15 is the marginal cost. Break-even: set C = Revenue = price×x; if price=$25/unit: 25x = 15x + 2000 → 10x = 2000 → x=200 units. See our Percentage Calculator for profit margin analysis.
  • Physics — Linear Motion: Position function x(t) = v₀t + x₀, where v₀ is initial velocity (slope) and x₀ is initial position (y-intercept). Velocity function v(t) = at + v₀ for constant acceleration a (slope) and initial velocity v₀ (y-intercept). Example: Car at rest (v₀=0) accelerates at 5 m/s²: v = 5t. At t=10s: v=50 m/s. The slope=5 m/s² is acceleration.Ohm's Law: V = IR is y=mx+b with b=0 (linear through origin, slope=resistance R).
  • Statistics — Linear Regression: Simple linear regression fits the line ŷ = b₁x + b₀ to minimize squared residuals. Here b₁ is slope (regression coefficient) and b₀ is y-intercept. The regression line always passes through (x̄, ȳ) — the means. Slope b₁ = r·(s_y/s_x) where r is the correlation coefficient and s_x, s_y are standard deviations. Every positive point on the regression line corresponds to a predicted y-value ŷ for a given x, computed directly from the slope-intercept equation.
  • Finance — Depreciation: Straight-line depreciation: Book value V = −(C−S)/n × t + C, where C is initial cost, S is salvage value, n is asset life, t is time. Y-intercept = initial cost C. Slope = −(C−S)/n (negative, depreciating). Example: Machine cost $50,000, salvage $5,000, 10-year life: V = −4500t + 50000. At t=5 years: V=−22500+50000=$27,500. Use our Pythagorean Theorem Calculator for the geometric interpretation of the depreciation slope as a right-triangle leg.
  • Temperature Conversion: F = (9/5)C + 32 is a perfect slope-intercept equation: slope m = 9/5 = 1.8 (°F per °C), y-intercept b = 32 (freezing point in °F). X-intercept: C = −32/1.8 = −17.78°C (where F=0°F). Also: C = (5/9)(F−32) = (5/9)F − 160/9 — another slope-intercept equation in F. The two lines are inverse functions of each other.
  • Engineering — Calibration Curves: Sensor output V = m·P + b (voltage vs. pressure). The slope m is the sensitivity (V/Pa) and b is the zero-offset. Calibration at two known pressures gives two data points; the slope-intercept equation lets you convert any measured voltage to pressure: P = (V−b)/m. Linearity check: plot multiple (P,V) pairs; deviations from the y=mx+b line indicate nonlinearity.
  • Point Slope Form Calculator — Point-slope form y−y₁=m(x−x₁) and slope-intercept form y=mx+b represent the same line — they're interconvertible by expanding and rearranging. Point-slope directly shows which point the line passes through, while slope-intercept directly shows the y-intercept b. When you know a point and slope but not b, use Point Slope Form first; this calculator then completes the conversion to y=mx+b. Both tools share the same underlying line geometry and output all four forms.
  • Slope Calculator — Computes m=(y₂−y₁)/(x₂−x₁) directly from two points, including the special cases: undefined slope (vertical line x=k), zero slope (horizontal y=b), and the angle of inclination θ=arctan(m). Once you have the slope from the Slope Calculator, enter m (plus one point or the y-intercept b) into the Slope Intercept Form Calculator to immediately get the full equation y=mx+b and all derived properties.
  • Midpoint Calculator — The midpoint M=((x₁+x₂)/2,(y₁+y₂)/2) of any two points on a line also lies on the line. Substituting M into y=mx+b verifies this. The perpendicular bisector of a segment — a key construction in geometry — is found by computing the midpoint (using the Midpoint Calculator), then writing a slope-intercept equation with slope m_perp=−1/m through that midpoint (using this calculator). Together, these two tools solve perpendicular bisector problems end-to-end.
  • Pythagorean Theorem Calculator — The distance between any two points on a line d=√((x₂−x₁)²+(y₂−y₁)²) is the Pythagorean theorem applied in 2D: the horizontal run (x₂−x₁) and vertical rise (y₂−y₁) are the legs, and d is the hypotenuse. The slope m=rise/run and the distance d are related: d=run×√(1+m²). Also, the distance from the origin to the line y=mx+b is |b|/√(1+m²) — again a Pythagorean expression. Use the Pythagorean Theorem Calculator to derive distances and then the Slope Intercept Calculator for the line equation.
  • Trigonometry Calculator — Slope m=tan(θ) where θ is the angle of inclination. Conversely, θ=arctan(m). This fundamental connection means: if you know the angle at which a line is inclined, the Trigonometry Calculator gives you tan(θ)=m, and the Slope Intercept Form Calculator builds the full equation y=mx+b. Perpendicular lines at 90°: tan(90°+θ)=−cot(θ)=−1/tan(θ)=−1/m, confirming the perpendicular slope formula m_perp=−1/m.
🧮 Math calculator