Skip to content

Slope Intercept Form Calculator

Enter two points on a line to get its equation in slope-intercept form, y = mx + b: the slope m, the y-intercept b, and where the line crosses the x-axis.

Calculator Details

Equation of the line:y = 3x − 1See results ↓

Slope and line through two points, a line from a point and a slope, the other endpoint from a midpoint, or a quadratic equation

x-coordinate of the first point

y-coordinate of the first point

x-coordinate of the second point

y-coordinate of the second point

Your Results

Equation of the line: y = 3x − 1

Equation of the line

y = 3x − 1

Slope m = 3

Slope (m)

3

Graph

P₁P₂
Line y = 3x − 1. Axes cross at (0, 0); not to scale.

The slope is 3 and the line is y = 3x − 1; the points are 2√10 apart.

Compare scenarios

Save these inputs as a scenario, change them, and compare the results side by side.

Loading, available in a moment

Detailed Breakdown

Properties of the line y = 3x − 1
PropertyExactNote
Slope (m)3
y-intercept (b)−1
x-intercept1/3
Slope-intercept formy = 3x − 1y = mx + b
Point-slope formy − 2 = 3(x − 1)y − y₁ = m(x − x₁)
Standard form3x − y = 1Ax + By = C
Angle of inclination71.56505118°From the positive x-axis
Distance between points2√10≈ 6.32455532
Midpoint(2, 5)

How This Calculator Works

How the Line Is Found

Slope first, then the intercept from one known point, all in exact fractions:

m = (y₂ − y₁) ÷ (x₂ − x₁) = (8 − (2)) ÷ (3 − (1)) = 6 ÷ 2 = 3

b = y₁ − m·x₁ = 2 − (3)·(1) = −1

y = 3x − 1

d = √(Δx² + Δy²) = √((2)² + (6)²) = 2√10

Frequently Asked Questions

How do I graph a line from y = mx + b?

Plot the y-intercept (0, b), then use the slope as rise over run to find a second point. For y = 3x − 1, start at (0, −1), go 1 right and 3 up to (1, 2), and draw the line through both. A negative slope goes down as you move right.

How do I convert standard form to slope-intercept form?

Solve for y. From 3x − y = 1, subtract 3x from both sides to get −y = −3x + 1, then multiply by −1: y = 3x − 1. In general Ax + By = C becomes y = −(A/B)x + C/B.

What do m and b mean in a real problem?

m is the rate of change and b the starting value. A taxi charging a $4 base fare plus $2 a kilometre has cost = 2 × km + 4: m = 2 dollars per kilometre and b = 4 dollars before you move.

How do I find the x-intercept?

Set y = 0 and solve: 0 = 3x − 1 gives x = 1/3. That is where the line crosses the x-axis. A horizontal line (m = 0) other than y = 0 has no x-intercept.

Included: slope, intercepts, slope-intercept, point-slope and standard forms, distance, midpoint and angle for lines; the other endpoint of a segment from one end and the midpoint; discriminant, exact real or complex roots, vertex, vertex and factored forms and completing the square step by step for quadratics. Inputs are converted to exact fractions from their decimal digits.

Left out: cubic and higher-degree equations, systems of equations, inequalities and fraction input such as 1/3 (enter 0.3333 or scale the equation). The graph is a preview, not to scale.

Slope Intercept Form Calculator: y = mx + b

By FindMySum · Last reviewed

A slope intercept form calculator turns two points into the equation of the straight line through them, written as y = mx + b. That form is the most common way to write a line because it can be read and graphed directly: m is the slope, how steep the line is, and b is the y-intercept, where it crosses the y-axis.

Worked example

Find the line through (1, 2) and (3, 8).

  1. Slope: m = (8 − 2) ÷ (3 − 1) = 6 ÷ 2 = 3.
  2. Put one point and the slope into y = mx + b: 2 = 3 × 1 + b, so b = −1.
  3. The equation is y = 3x − 1.

Check with the other point: 3 × 3 − 1 = 8, as it should be. The line crosses the y-axis at (0, −1) and the x-axis at (1/3, 0), and in standard form it is 3x − y = 1.

When the numbers are not whole

The calculator keeps fractions exact. Through (1, 2) and (4, 6), the slope is 4/3 and b = 2/3, so the line is y = (4/3)x + 2/3 rather than y = 1.333x + 0.667, which would drift off the true line further out. If the two points have the same x-coordinate the line is vertical, x = constant, and has no slope-intercept form.

For a point and a slope instead of two points, use the point slope form calculator; for the distance and midpoint of the same two points, the distance formula calculator.

Sources

This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.

Spotted a wrong result or a bug? Report a problem

May we count your visits with Invoker Analytics? It keeps a random visitor number in your browser. Your calculator inputs are never sent. Privacy policy