Multiple Regression Calculator

StatisticsLast updated: August 22, 2026

Multiple linear regression explains one dependent variable with several predictors at once: ŷ = b₀ + b₁x₁ + … + b_k x_k. Each coefficient gives the average change in the dependent variable produced by a one-unit increase in that predictor while all the other predictors are held constant. This "holding the others constant" reading is what separates multiple regression from simple regression.

This calculator solves the least-squares problem with a numerically stable QR decomposition; it reports a standard error, t, p, and a confidence interval for every coefficient, tests the model as a whole with an F test, and gives R², adjusted R², and the residual standard error. It also computes VIF for multicollinearity and the Durbin-Watson statistic for independence of the residuals, and draws a residual plot and a normal Q-Q plot so you can check the assumptions.

Observed values of the variable you want to explain.
Write one predictor per line. A "Name:" prefix at the start of a line is used as the variable name; without it the variables are called X1, X2, and so on. Each line must hold as many values as Y.
Sets the false-positive risk. In the social sciences 5% is the usual choice.
The probability that the interval covers the true parameter.

Multiple Linear Regression Formulas

Model:             ŷ = b₀ + b₁x₁ + b₂x₂ + … + b_k x_k
OLS solution:      b = (XᵀX)⁻¹Xᵀy   (solved numerically by QR here)
Sums of squares:   SST = SSR + SSE ,  SSE = Σ(yᵢ − ŷᵢ)²
Determination:     R² = 1 − SSE / SST
Adjusted:          R²_adj = 1 − (1 − R²)·(n − 1)/(n − k − 1)
Residual std err:  RSE = √[ SSE / (n − k − 1) ]
Model test:        F = (SSR/k) / (SSE/(n − k − 1)) ,  df = k , n − k − 1
Coefficient test:  t_j = b_j / SE(b_j) ,  df = n − k − 1
Confidence int.:   b_j ± t_(1−α/2) · SE(b_j)
Standardized:      β_j = b_j · s_xⱼ / s_y
Multicollinearity: VIF_j = 1 / (1 − R²_j)
Autocorrelation:   d = Σ(eₜ − eₜ₋₁)² / Σeₜ²

The solution is built with a Householder QR decomposition rather than the normal equations, which preserves numerical stability when the predictors are measured on very different scales. Assumptions: linearity, independent errors, constant error variance, normally distributed errors, and no perfect multicollinearity.

How to Calculate

  1. Paste the values of the dependent variable (Y) into the top field.
  2. In the predictor field, write one variable per line; if you start a line with a name such as "Ads:", that name is used in the tables. Each line must hold as many values as Y.
  3. Choose the significance level and the confidence level; the coefficient confidence intervals follow the level you pick.
  4. Look at the model as a whole first: if the F test is not significant, there is no point in interpreting the individual coefficients.
  5. Read the b, standard error, β, t, p, confidence interval, and VIF columns of the coefficient table together; for variables with a VIF above 10 the coefficient is not trustworthy.
  6. Inspect the residual plot and the Q-Q plot; if you see a pattern, you need a variable transformation or a different model.

Worked Examples

Effect of advertising and price on sales

For 12 months of data the model comes out as ŷ = 31.855 + 2.801·Reklam (advertising) − 0.521·Fiyat (price). With R² = 0.9979 and F(2, 9) = 2,153.707 (p < 0.001) the model is significant as a whole; the advertising coefficient is significant at p < 0.001 with t = 48.175, while the price coefficient is not (p = 0.346). The VIF values are 1.81, so there is no multicollinearity problem, and Durbin-Watson is 2.296.

Regression equation: ŷ = 31.855 + 2.801·Reklam − 0.521·Fiyat · R² (coefficient of determination): 0.9979 (99.8%) · Adjusted R²: 0.9975

One predictor: the same result as simple regression

A model with study hours as the only predictor gives ŷ = 50.033 + 2.096 × study hours; with R² = 0.4057, adjusted R² = 0.3463, and F(1, 10) = 6.828 (p = 0.026) the slope is significant. The 95% confidence interval for the coefficient is 0.309 – 3.884; these values match simple linear regression exactly, and with one predictor the VIF is 1 by definition.

Regression equation: ŷ = 50.033 + 2.096·Çalışma saati · R² (coefficient of determination): 0.4057 (40.6%) · Adjusted R²: 0.3463

A collinear model (VIF warning)

When two predictors measure the same quantity in different units, the VIF jumps to 41,812.57 and the multicollinearity warning appears. The model looks flawless with R² = 0.9982 and F(2, 7) = 1,985.428 (p < 0.001), yet the individual coefficients turn insignificant at p = 0.480 and p = 0.675: collinear variables mask each other's contribution.

Regression equation: ŷ = -77.029 + 1.596·Boy − 2.381·BoyInc · R² (coefficient of determination): 0.9982 (99.8%) · Adjusted R²: 0.9977

Frequently Asked Questions

Should I report R² or adjusted R²?
R² never decreases when a predictor is added to the model; even a purely random variable nudges it upward. Adjusted R² penalizes the number of predictors, so it is the right measure when comparing models with different numbers of variables, and it can fall when a useless variable is added. When describing a single model, report both.
How large does VIF have to be before multicollinearity is a problem?
By the common rule of thumb, a VIF below 5 is fine, 5–10 deserves attention, and above 10 counts as serious multicollinearity (equivalently, tolerance = 1/VIF below 0.10). A high VIF does not distort the coefficients themselves, it inflates their standard errors: the model still predicts well, but you cannot tell which variable is doing the work. Possible fixes are dropping one of the variables, combining the two into a single composite measure, or using ridge regression.
The model F test is significant but no coefficient is — why?
This is the classic sign of multicollinearity: together the predictors explain Y well, but because they repeat one another no single unique contribution can be isolated. Check the VIF column. The same picture can appear with very small samples, since each extra predictor spends a degree of freedom and the power of the tests drops quickly.
How many observations do I need?
The mathematical minimum is n > k + 1, but results at that boundary are unusable. Common rules of thumb are 10–20 observations per predictor, or n ≥ 50 + 8k. The smaller the sample, the wider the gap between R² and adjusted R²; that gap is a practical indicator of the risk of overfitting.
How do I interpret the Durbin-Watson value?
The d statistic runs from 0 to 4: values near 2 indicate no first-order autocorrelation in the residuals, clearly below 2 indicates positive autocorrelation, and above 2 negative autocorrelation. This tool uses rough cutoffs (1.5 and 2.5); a formal decision needs the d_L / d_U tables for your n and k, and between those tables lies an inconclusive region. If the observations are not in time order, d should not be interpreted at all.
How do I add categorical variables to the model?
A categorical variable cannot be entered as a raw number; it has to be dummy coded. For a two-category variable a single line coded 0/1 is enough. Three categories need two dummy lines; the reference category gets 0 on every dummy and the coefficients are read relative to that reference. If you add a dummy for every category, the design matrix becomes singular and the model cannot be solved.
Do the results match SPSS and R?
Yes. The coefficients, standard errors, t and p values, R², adjusted R², F, and VIF match the output of SPSS Regression → Linear and of R's lm() and car::vif(). Because the solution uses a QR decomposition, it follows numerically the same route as R's lm(); differences are at the rounding level only.