Objective
minβ ||Xβ − y||₂²Choose coefficients that minimize the sum of squared residuals.
Each row is one observation. Enter finite integers, decimals, or scientific notation; the final column is the response y.
| Row | Observed y | Fitted ŷ | Residual |
|---|---|---|---|
| — | — | — | — |
minβ ||Xβ − y||₂²Choose coefficients that minimize the sum of squared residuals.
XᵀXβ = XᵀyA full-rank solution satisfies these equations, but the calculator does not invert XᵀX directly.
β = X⁺y = VΣ⁺UᵀyThe pseudoinverse gives the unique least-squares vector at full rank and the minimum-norm solution otherwise.
σ₁ · max(n,p) · 64ε are treated as zero. Enter at least as many observations as design columns (predictors plus an optional intercept), and rescale predictors when the reported condition number is very large.y last.Each coefficient estimates the change in the fitted response associated with a one-unit increase in its predictor while the other predictor columns stay fixed. The intercept is the fitted response when all predictors equal zero.
SSE is the sum of squared residuals. RMSE is √(SSE/n) and uses the same units as the response. R² compares SSE with variation around the response mean; it is undefined when every observed response is equal and may be negative for a model fitted without an intercept.
A rank smaller than the number of design columns means some columns are linearly dependent. A large condition number signals sensitivity: small input changes can produce large coefficient changes even when fitted values look stable.
It minimizes Σ(yᵢ − ŷᵢ)², the sum of squared vertical residuals between observed and fitted responses.
Usually yes. The option adds a column of ones automatically. Turn it off for a regression deliberately constrained through the origin or when your predictor matrix already contains the constant column you want.
SVD solves the least-squares problem without explicitly inverting XᵀX, whose condition number is the square of the design matrix’s condition number. It also exposes numerical rank and supports a pseudoinverse solution.
At least one design column can be reproduced from the others, so individual coefficients are not uniquely identifiable. The displayed vector is the Moore–Penrose minimum-norm solution; fitted values are still uniquely determined.
Yes. A no-intercept regression can fit worse than the response mean, producing a negative centered R². With an intercept and ordinary finite data, R² is normally between zero and one apart from small rounding effects.
No. The page performs numerical least-squares fitting only. It does not calculate confidence intervals, p-values, causal effects, or validate assumptions such as independence, constant variance, and an appropriate model form.
Yes. The page calculates locally and does not transmit or save your predictor or response values.
Last reviewed: August 5, 2026 by the Starlight Tools editorial team.
This is a numerical and educational calculator, not statistical or domain-specific advice. It reports descriptive fit measures from the supplied matrix. Conclusions still depend on data quality, sampling, model choice, and regression assumptions.