calcmintly← Back to all tools

Math

Linear Equation Calculator

Solve ax + b = 0 for x — plus the slope, intercepts, and equation of a line in slope-intercept form.

Your equation

Results update as you type. All calculations run locally in your browser.

Solution: x

—

Line: —x-intercept: —y-intercept: —

—

Formula

For ax + b = 0 with a ≠ 0: x = −b ÷ a. For a line in slope-intercept form y = mx + c: the slope is m (rise over run), the y-intercept is c (the value at x = 0), and the x-intercept is −c ÷ m (the x value where y = 0, when m ≠ 0). If a = 0, the equation ax + b = 0 has no solution unless b is also 0, in which case every x is a solution.

Worked example

3x + 6 = 0: x = −6 ÷ 3 = −2. Check: 3 × (−2) + 6 = 0. For the line y = 2x + 3: the slope is 2 (y rises 2 for each 1 step in x), the y-intercept is 3, and the x-intercept is −3 ÷ 2 = −1.50. The line crosses the y-axis at (0, 3) and the x-axis at (−1.50, 0).

Scope and limitations

This page solves single linear equations in one variable and describes straight lines. It does not solve quadratics (see the quadratic equation calculator), systems of equations (see the system of equations calculator), or inequalities — though the x-intercept of y = mx + c does tell you where the sign of mx + c changes. Inputs are plain numbers; fractions must be entered as decimals, and very large or tiny coefficients may lose precision in display, though the underlying arithmetic is standard double precision.

FAQ

What if a = 0?

Then the equation is b = 0, which does not involve x. If b is also 0, every value of x satisfies it (the equation is an identity). If b is not 0, no value of x satisfies it. The page says which case applies instead of dividing by zero.

What does the slope actually mean?

Rise over run: how much y changes when x increases by 1. A slope of 2 means y climbs 2 per x step; a slope of −0.5 means y falls half a unit per x step. A slope of 0 is a horizontal line.

How do I read the x-intercept?

It is where the line crosses the x-axis, i.e. where y = 0. For y = 2x + 3, solving 2x + 3 = 0 gives x = −1.50 — the same calculation as the equation solver, which is no coincidence: intercepts are just solutions of the equation.

Can I enter fractions?

Enter them as decimals (1/2 as 0.5). The page shows results to two decimals; repeating decimals such as 1/3 display as 0.33, so for exact fractional work keep the fraction form alongside.

What is the difference between slope-intercept and standard form?

Slope-intercept form y = mx + c exposes the slope and y-intercept directly. Standard form Ax + By = C is the same line rearranged: m = −A ÷ B and c = C ÷ B (when B ≠ 0). This page works in slope-intercept form.

Why does the check matter?

Substituting the solution back catches sign errors, the most common mistake in linear equations. For 3x + 6 = 0, x = −2 checks out because 3(−2) + 6 = 0; x = 2 would give 12, not 0.

Related tools

Results are estimates only and do not constitute professional advice.