Linear Function Calculator
Find slope, intercepts, equation, and values for a linear function. This educational calculator shows the formula, result, and step-by-step interpretation.
Calculator
What this calculator teaches
Linear functions are the foundation for algebra, graphing, rates of change, and modeling.
Use the result as a learning aid. For classwork, still show the formula and intermediate reasoning so the final answer is not just a black-box number.
From Two Points to a Complete Linear Function
A nonvertical line is determined by two points with different x-coordinates. The slope m = (y2 − y1)/(x2 − x1) measures the change in y per unit change in x. Once m is known, substitute either original point into y = mx + b to obtain the y-intercept b = y1 − mx1.
The equation y = mx + b then answers several questions at once. Evaluating the function means substituting a requested x. The y-intercept occurs at x = 0, so its coordinate is (0,b). If m ≠ 0, the x-intercept occurs where y = 0, giving x = −b/m. A horizontal line has m = 0 and either has no x-intercept when b ≠ 0 or infinitely many when the equation is y = 0.
| Quantity | Formula | Interpretation |
|---|---|---|
| Slope | m = (y₂-y₁)/(x₂-x₁) | Output change per input unit |
| Intercept | b = y₁-mx₁ | Value of y when x = 0 |
| Function value | f(x)=mx+b | Output at a chosen input |
If x1 = x2, the two points define a vertical line x = constant rather than a function of the form y = mx + b. That is why this calculator requires different x-coordinates.
The same line can also be written in point-slope form, y−y1=m(x−x1). This form is especially convenient immediately after finding m because it uses a known point directly and reduces the chance of mixing coordinates while solving for b.
In applied problems, slope carries units. A slope of 2 dollars per item or -3 meters per second is more informative than the bare number because it states how the dependent variable changes with the independent variable.
Formula & Symbols
| Concept | Formula or rule |
|---|---|
| Slope | m = (y₂-y₁)/(x₂-x₁) |
| Line | y = mx + b |
Worked example
Common mistakes
Keep lists comma separated, matrices as rows separated by semicolons, and modular inputs as integers.
Some methods require positive probabilities, valid moduli, independent trials, or small educational input sizes.
When computing slope, keep the subtraction order consistent: if the numerator is y₂−y₁, the denominator must be x₂−x₁.
The intercept must be calculated from one of the known points on the line, not from an unrelated x value where you merely want to evaluate the function.
FAQ
Related calculators
These links will work after the calculators are registered in the final Math layout update.
Formula Explorer connections
Interpretation: This formula describes an algebraic relationship among variables, functions, equations, roots or sequences. Assumption: Respect the expression’s domain and excluded values. Check roots in the original equation because transformations can introduce extraneous solutions.