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,...
Formula used
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 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

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.
Related Calculators
- 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.