R Squared Calculator
Judge a fit you already have: hand the page the observed y and the fitted ŷ and it prints R² = 1 − SSE/SST, the adjusted form, and the negative case other tools hide — a model worse than a horizontal line.
R Squared Calculator
Results recalculate instantly on every keystroke. Nothing you type is transmitted.
What this result does not account for
- Audits a GIVEN fit — it does not fit models (the regression pages own that)
- SST = 0 (constant observations) leaves R² without a definition and is refused
In short: For y = 52, 55, 58, 61, 66, 64, 70, 72 and the fitted values of the regression page’s line, SSE = 12.333333 and SST = 349.5, so R² = 1 − 12.333333/349.5 = 0.964711 — the same number the correlation page gets from r², as the identity demands for a least-squares line with intercept. With k = 2 predictors the adjusted form charges rent: 1 − (1−R²)(n−1)/(n−k−1) = 0.950596. Feed the page the multiple-regression fit and it lands on R² = 0.975393, adjusted 0.965551 — that page’s own figures. And a fit worse than the mean bar prints a NEGATIVE R²: on the reversed list it is −2.925608, outperformed by a horizontal line.
Formula
R² = 1 − SSE/SST · adj R² = 1 − (1−R²)(n−1)/(n−k−1)
SSE = Σ(yᵢ−ȳᵢ)² is what your fit leaves behind; SST = Σ(yᵢ−ȳ)² is what the flat mean line leaves. R² is their ratio turned into a verdict.
Worked Example
- Paste the observed list and the fitted list — any model’s predictions, as long as the counts align.
- Set k to the number of predictors that model used (the adjusted card needs n − k − 1 > 0).
- Read R², the SSE/SST partition, and the adjusted form beside it.
- Below-zero results print as negative — that is the page refusing to flatter a bad fit.
Defaults: R² = 0.964711 (SSE 12.333333, SST 349.5), adjusted at k = 1: 0.958830. ŷ = ȳ gives exactly 0; ŷ = y gives 1; the reversed list gives −2.925608. The mlr page’s fitted values with k = 2 reproduce its R² = 0.975393 and adjusted 0.965551.
Strengths & Limits Of This Model
Where this engine is strong
- Negative R² printed honestly instead of clipped to zero
- Works on any model’s predictions — the site is not limited to its own fits
Where it stops
- No interpretation bands — a good R² is field-dependent
- Adjusted form needs n − k − 1 > 0
Practical Use Cases
Model audit
score any fit, including ones this site cannot fit
Forecast QC
did the forecast beat the seasonal mean?
Teaching
why adjusted R² charges rent per predictor
Methodology & Editorial Standards
Computation runs in IEEE-754 double precision at full internal precision; rounding to two decimal places occurs strictly at the display layer, so no cumulative drift enters the result. All monetary outputs use accounting presentation — grouped thousands, two decimals, negatives in parentheses — so figures can be transcribed directly into a model or working paper. Division-by-zero and out-of-domain inputs return an em-dash rather than a misleading number.
This engine was reconciled against an independent reference implementation and hand-verified for the worked example above before release. Our full five-stage review process is published on the About Us page.
Disclaimer. This calculator is provided for informational and modelling purposes only and does not constitute financial, tax, legal, medical, or engineering advice. Verify all figures with a qualified professional before acting on them.
R Squared Calculator — 8 Expert FAQs
8 analyst-written answers to the questions practitioners actually ask — optimised for voice and answer-engine retrieval.
R² = 0.9647 — what is the 96% OF?
Of the variance in the OBSERVED list: R² = 1 − SSE/SST says the fitted values absorb all but 3.53% of the observed spread. It measures the fit you handed the page; it is not a promise about data the model never saw.
Can R² be negative?
Yes, and this page prints it: a fit WORSE than the flat mean line has SSE > SST, so 1 − SSE/SST drops below zero — −2.925608 on the reversed default. A model that always predicts ȳ scores exactly 0; anything below that was outperformed by a horizontal line. Most tools hide this; the number is the lesson.
Why does this page not fit anything?
Because judging and fitting are different questions with different failure modes. The regression page owns fitting and prints its own R²; this page takes YOUR fitted values and audits them — including fits from models this site cannot run, which is the point of keeping the two apart.
What is adjusted R² buying?
A rent charge per predictor: 1 − (1−R²)(n−1)/(n−k−1). Raw R² can only rise as predictors are added, even useless ones, so k enters the bill. On the defaults with k = 2 the adjusted value is 0.950596, and the multiple-regression fit with k = 2 lands on 0.965551 — exactly what that page prints.
Does R² = r² always?
Only for a least-squares line WITH an intercept, where the identity is exact: 0.964711 on the correlation page’s data both ways. Drop the intercept or fit by anything other than least squares and the identity breaks — judge the fit you actually have, which is this page’s job.
My ŷ came from a model with no x — allowed?
The page never sees a model, only two aligned lists. Forecasts, group means, a colleague’s neural network — anything that claims to predict y can be audited here, row by row, as long as the counts match.
What if every observed y is the same?
Then SST = 0 and R² is 0/0 — not defined, and not zero. The page refuses with that named: there is no spread for a fit to explain, and any percentage quoted there would be invented.
How many rows does this need?
Two is the arithmetic floor (a single degree of freedom in the deviations), but the adjusted card needs n − k − 1 > 0, so k = 2 predictors want n ≥ 4. Small n makes R² jumpy — treat moves of a few points as noise until n is well past twenty.