linear regression on a calculator

Linear Regression Calculator

Paste your data points below to compute a least-squares line in the form y = mx + b.

Use commas, spaces, or line breaks.
Must have the same number of values as X.
Enter your dataset, then click Calculate Regression.

What linear regression does (in plain language)

Linear regression is a way to summarize the relationship between two numeric variables with one straight line. If your data points roughly move upward together, regression gives you a line with a positive slope. If they move in opposite directions, the slope is negative.

On almost every scientific or graphing calculator, regression is listed under STAT, REG, or a similar statistics menu. The calculator computes the best-fitting line that minimizes total squared error. This is why you may also hear it called the least-squares regression line.

The model: y = mx + b

The output line has two key parameters:

  • m (slope): how much y changes when x increases by 1 unit.
  • b (intercept): the predicted value of y when x = 0.

If your calculator reports something like y = 4.2x + 47, it means every 1-unit increase in x is associated with an average increase of 4.2 in y.

How to do linear regression on a graphing calculator

TI-83 / TI-84 style steps

  • Press STAT and choose Edit.
  • Enter x-values in L1 and y-values in L2.
  • Press STAT, move to CALC, then choose LinReg(ax+b).
  • Use L1, L2 as inputs and optionally store the equation in Y1.
  • Press ENTER to see slope, intercept, and sometimes r/r² (depending on settings).

Casio graphing calculator workflow

  • Open STAT mode.
  • Select paired-variable data entry (usually x and y columns).
  • Input all points row by row.
  • Open the regression menu and choose Linear.
  • Read off coefficients a and b where the model is often written as y = a + bx.

If your calculator does not have a regression menu

You can still compute regression manually from summary totals: n, Σx, Σy, Σxy, and Σx². Then use:

  • m = (nΣxy - (Σx)(Σy)) / (nΣx² - (Σx)²)
  • b = (Σy - mΣx) / n

It is slower, but this is exactly what many calculators are doing internally.

How to interpret regression output

  • Slope (m): direction and strength of average change.
  • Intercept (b): baseline estimate at x = 0 (only meaningful if x = 0 is realistic).
  • r (correlation): linear association from -1 to 1.
  • r² (coefficient of determination): fraction of y-variance explained by the line.

Example: an r² of 0.92 means the linear model explains about 92% of the variation in y. That is usually very strong, though residual checks still matter.

Common mistakes to avoid

  • Entering x and y lists with different lengths.
  • Mixing units (for example, months in one row and years in another).
  • Assuming correlation proves causation.
  • Extrapolating too far outside observed x-values.
  • Ignoring outliers that can strongly shift slope and intercept.

Quick worked example

Suppose x = hours studied and y = exam score. A regression line of y = 4.114x + 47.333 says each extra hour studied is associated with about 4.1 additional points. If x = 7, predicted y is roughly 76.1.

Use the interactive calculator above to test that exact dataset, inspect residuals, and see how changing one data point changes the fitted line.

Final thought

Knowing how to run linear regression on a calculator is a high-leverage skill for statistics, economics, psychology, engineering, and data science classes. Once you can compute the line quickly, you can spend your energy on what matters: interpreting results and making better decisions from data.

🔗 Related Calculators