Multiple Regression Calculator
Fit Y = b₀ + b₁X₁ + b₂X₂ + … with any number of predictors. Per-coefficient significance, R² and Adjusted R², overall F-test, plus a residuals plot and standardised-coefficient chart.
| # | Y | X1 | X2 | |
|---|---|---|---|---|
| 1 | ||||
| 2 | ||||
| 3 | ||||
| 4 | ||||
| 5 | ||||
| 6 |
Multiple regression explained, step by step
Each concept has a plain-English definition, the formula this calculator uses, a small diagram and a worked example — all in one card so the maths lines up with the visual.
1. The multiple-regression model
Multiple regression extends the y = m·x + b line to two or more predictors. Instead of a line through a scatter it fits a flat plane (2 predictors) or a hyperplane (more), choosing the intercept b₀ and slopes b₁ … bₖ that make the plane sit as close as possible to all data points at once.
2. Least-squares fit via matrices
The best-fit coefficients minimise the sum of squared residuals Σ(y − ŷ)². For multiple predictors the compact closed form uses matrix algebra — the calculator builds X, computes XᵀX and Xᵀy, and solves for the coefficient vector b.
3. R² vs Adjusted R² — the important one
R² is the fraction of Y's variance the model explains. It has one bad property: adding any new predictor — even random noise — can only push R² up, never down. Adjusted R² pays a penalty for each extra predictor, so it actually falls if a variable isn't earning its keep.
4. Interpreting a coefficient — 'partial effect'
Each bⱼ is the expected change in Y for a one-unit rise in Xⱼ with every other predictor held constant. That 'holding constant' clause matters — b₁ = 2 doesn't mean 'X₁ up 1 ⇒ Y up 2' in the raw data; it means that after removing what X₂, X₃, … already explain, X₁ still moves Y by 2 per unit.
5. Overall F-test & per-coefficient p-values
The F-test asks a single yes/no question: does the whole model explain more than nothing? Per-coefficient t-statistics and p-values then ask, for each Xⱼ, whether it adds anything beyond the others. A tiny F p-value with no individual significant t is the classic sign of multicollinearity.
Features of this calculator
- Any number of predictors — dynamic Add predictor / Add row controls (not capped at 2)
- Full coefficient table: estimate, standard error, t-statistic and two-tailed p-value for every b
- Both R² and Adjusted R², plus the overall F-test with p-value
- Standardised-coefficient bar chart to compare each predictor's relative contribution on a common scale
- Residuals-vs-predicted diagnostic plot to visually check model fit quality
- Detects perfect multicollinearity (singular XᵀX) and reports it plainly
- Show / hide step-by-step working for R², Adjusted R² and the F-test
Frequently asked questions
+How many predictors can I add?
Any number, as long as n > k + 1 (so residual degrees of freedom n − k − 1 ≥ 1).
+Should I look at R² or Adjusted R²?
Report both, decide with Adjusted R². Plain R² only ever rises when you add predictors — including useless ones — so it can't fairly compare models of different sizes.
+What does the p-value on each coefficient mean?
The two-tailed p-value for the null hypothesis that the coefficient's true value is zero, holding the other predictors constant.
+Why can the F-test be significant while no individual coefficient is?
Classic multicollinearity — the predictors collectively explain a lot, but each is redundant given the others, so standard errors inflate and no single t-stat is significant.
+How is the F-statistic computed?
F = (R²/k) / ((1 − R²)/(n − k − 1)) on (k, n − k − 1) degrees of freedom.
+What if I only have one predictor?
Use the Simple Linear Regression Calculator; it also plots the fitted line against the scatter.