This calculator fits a straight trend line to paired data for forecasting, calibration, and checking how one variable changes with another.
The interactive regression calculator loads right here. If it hasn't appeared, refresh the page.
Enter matching x and y observations, then use the fitted equation to estimate y for a chosen x value. Keep predictions near the observed x range, because a line becomes less trustworthy when sent wandering beyond the data.
The fitted line is predicted y = a + b × x, where b = sum[(x - mean x) × (y - mean y)] / sum[(x - mean x)²] and a = mean y - b × mean x.
For advertising spend x of 2, 4, 6, and 8 thousand dollars and sales y of 20, 25, 29, and 34 thousand dollars, the fitted line is predicted y = 15.5 + 2.3x. At x = 5, predicted sales are 27 thousand dollars.
The slope is the predicted change in y for each one-unit increase in x. Its meaning depends on the units, so a slope of 2.3 might mean $2,300 more sales per additional $1,000 spent.
You can calculate the prediction, but it may be unreliable. Extrapolation assumes the same linear pattern continues where you have no observations.
More from DoesWhat: free calculators · emoji meanings · quick answers · the DoesWhat blog