R² across five models — and the three ways one R² misleads.
Five models, five R² values, one comparison
The log-space R² reads 0.995; the curve achieves 0.931.
R² for the linear fit — y = -110.571429 + 42.738095x
0.597563
59.76% of the variation in y is accounted for by this curve. Residual standard error 92.79423 on 8 points.
Linear
0.59756
adj 0.53049
Quadratic
0.88503
adj 0.83905
Exponential
0.93075
adj 0.91920
Logarithmic
0.38519
adj 0.28273
Power
0.49517
adj 0.41103
Quadratic scores 0.88503 against linear’s 0.59756 — higher, as it must be. R² can never fall when a term is added, because the extra term can always be set to zero to recover the simpler fit. So “the quadratic has a higher R²” is not evidence of curvature; it is arithmetic. Adjusted R² is the number that can fall: 0.53049 linear against 0.83905 quadratic, so here the extra term earns its place.
What this tool shows
One R² is not interpretable; five are. Adding a term can never lower R², so a quadratic always beats a line. For an exponential fit the value most tools report is computed in log space — 0.995 where the curve achieves 0.931. And R² can be negative.
R² for linear, quadratic, exponential, logarithmic and power fits
Adjusted R², which can fall when R² cannot
The log-space R² gap on transformed fits
Residual standard error on the original scale
A warning when R² goes negative
Points excluded because a transform is undefined
Five models at once Log-space gap shown Adjusted R² beside it Original-scale error
A perfect parabola has a linear R² of exactly zero.
Updated 8 September 2026 · Works in any browser, no installation
R² is the share of the variation in y that a model accounts for. It is 1 − SSE/SST — the error the model leaves, relative to the error of just guessing the mean every time. Which is why it can go below zero, and why comparing two R² values across different models needs care.
At a glance
Formula shown
R² = 1 − SSE/SST, where SSE is the sum of squared residuals and SST the sum of squared deviations from ȳ. For simple linear regression with an intercept it equals the squared correlation, but the 1 − SSE/SST definition is the one that survives everywhere else — and it can be negative. Adjusted R² = 1 − (1 − R²)(n − 1)/(n − p − 1).
Scenario support
Comparing candidate models on the same data; reporting how well a regression fits; deciding whether an extra term earns its place; checking whether a curve fit is as good as its software claims.
Educational estimate
Planning support from the values you enter — not professional advice.
R² can never fall, so “higher R²” proves nothing
This is the property that makes R² useless for model selection when used on its own, and it follows from the definition rather than from anything about your data.
Adding a term to a model can never decrease its R². The larger model contains the smaller one as a special case — set the new coefficient to zero and you recover it exactly — so least squares can always do at least as well. It will do strictly better unless the new term is perfectly useless, and randomness guarantees it is not.
So a quadratic always beats a line, whether or not the curvature is real. Add enough terms and R² reaches exactly 1: with n points, a polynomial of degree n − 1 passes through every one of them. That model has learned the noise and will predict nothing.
Adjusted R² is the number that can fall. It applies a penalty of (n − 1)/(n − p − 1) for each parameter, so a term only raises it if it earns more than it costs. The tool shows both, and where the adjusted value drops while R² rises, the extra term is not paying for itself.
Adjusted R² can itself go negative, which is its way of saying the model is worse than useless once the parameter count is accounted for. That is informative rather than an error.
The general rule this points at: R² is a description of fit on the data you fitted, not a measure of a model’s quality. To compare models honestly, use the adjusted version, an information criterion, or — best — performance on data the model has not seen.
The R² you were shown for a curve fit was computed in log space
Exponential, power and logarithmic regressions have no closed-form least-squares solution on their own scale. So every spreadsheet and calculator fits them the same way: take logarithms until the relationship is straight, run ordinary least squares, transform back.
What almost none of them say is that the R² comes from the transformed regression. The fit minimises squared error in log space, so the R² describes how well a line fits the logged data — not how well the curve fits your actual values.
The gap is real and usually flattering. On the tool’s default dataset the exponential fit reports 0.995 in log space and achieves 0.931 on the original scale — 6.4 percentage points of fit that does not exist. On a power fit the gap can exceed 14 points. Measured across random exponential data, the log-space figure is the higher of the two about three times in four, and the average gap is clearly positive — so it is a systematic bias rather than a universal law, and the tool shows both numbers whenever they differ rather than asserting which is larger.
The underlying difference is what is being minimised. Least squares on logs minimises proportional error, so a 10% miss on a small value counts as much as a 10% miss on a large one. Least squares on the original scale minimises absolute error, so large values dominate. Neither is wrong — on data spanning orders of magnitude the proportional version is usually what you want — but they are different fits, and one of them is being reported with the other’s goodness-of-fit statistic.
Which to report depends on what the error costs. If a 10% error matters equally at every scale, keep the log fit and say so. If large absolute errors are what hurt, the log-space fit is not the right one and its R² is doubly misleading — wrong statistic on the wrong fit.
The logarithmic model is the exception: y = a + b⋅ln x is linear in ln x with no transform on y at all, so its R² is already on the original scale and there is no gap.
R² of zero does not mean no relationship
R² measures how well a specified model fits. A low value can mean there is no relationship, or that you fitted the wrong shape, and those need opposite responses.
Load the tool’s “A curve” preset. Seven points on a perfect parabola. The linear R² is exactly 0.000000 — a straight line accounts for none of the variation, so on that evidence x tells you nothing about y. The quadratic R² is exactly 1.000000. y is completely determined by x.
Two conclusions from identical data, and the linear one is the confident one. This is the same failure the correlation coefficient has, for the same reason: both measure fit to a straight line and neither can see any other shape.
The remedy is the residual plot, not a bigger R². Plot the residuals against x. If the model is right they scatter without pattern. Curvature in the residuals means a missing term; a funnel shape means the error variance changes with x. Both are invisible in R² and obvious in the plot.
Range restriction cuts the other way. R² depends on how much x varies in your sample. Fit the same true relationship on a narrower range of x and R² drops sharply, because SST shrinks while the noise does not. Two studies of the same phenomenon can report R² of 0.7 and 0.2 with neither being wrong — which is one reason R² values are not comparable across datasets.
It can be negative
The name says “R squared”, which suggests a number that cannot go below zero. The definition says otherwise, and the cases where it does are the ones that matter most.
R² = 1 − SSE/SST. When SSE exceeds SST — when the model’s errors are larger than simply predicting the mean of y every time — the ratio exceeds 1 and R² goes negative.
It cannot happen for an ordinary linear fit with an intercept, because that model contains the flat line at ȳ as a special case and least squares will never do worse. That special case is why the impossibility is usually taught as a general rule.
It happens readily in three situations. A regression forced through the origin, where the intercept is not available to absorb the mean. A curve fit whose parameters were chosen in log space, which is not optimising the quantity R² measures. And — most importantly — a model evaluated on data it was not fitted to.
That last case is where a negative R² is genuinely useful information. An out-of-sample R² below zero says the model performs worse than a constant prediction on new data, which is the clearest possible signal that it has fitted noise. A model with an in-sample R² of 0.95 and an out-of-sample R² of −0.3 is not a good model with a validation problem; it is not a model.
So a negative R² is not an error to be clamped away. Software that reports 0 instead is discarding the finding.
What to report instead
R² is a ratio with no units, which is why it travels well and why it says so little about whether a model is useful. Three alternatives carry more.
The residual standard error is in the data’s own units. “Predictions are typically within ±3.2 kg” is something a reader can weigh against what they need. “R² = 0.82” is not, because whether 0.82 is good depends entirely on the field and the spread of y. The tool reports it beside every fit.
Out-of-sample error is the only honest measure of prediction. Hold data back, or cross-validate. In-sample R² describes how well the model reproduces data it has already seen, and a model with enough parameters reproduces it perfectly while predicting nothing.
The residual plot answers questions no summary can. Curvature means a missing term; a funnel means the error variance changes with x; a lone point far from the rest means one observation is driving the fit. A high R² is compatible with all three.
And state the range of x. R² depends on how much x varies in your sample, so the same true relationship gives very different values on wide and narrow ranges. Two studies reporting 0.7 and 0.2 can be measuring the same effect with neither being wrong, which is the single strongest reason not to compare R² across datasets.
Sources and methodology
References for the definition and its failure modes.
Method. R² is computed as 1 − SSE/SST throughout, never as the squared correlation — the two agree only for a simple linear fit with an intercept, and the difference is precisely where the interesting cases live. For exponential and power models, the fit is obtained by linearising and the R² is then recomputed against the original y values, with the log-space figure shown separately so the gap is visible rather than silent. Points the transform cannot take are excluded and counted rather than dropped quietly. The suite asserts that quadratic R² never falls below linear R² across a thousand random datasets, that a perfect parabola gives a linear R² of exactly zero and a quadratic R² of exactly one, that the log-space and original-scale figures differ by 6.4 points on the default data, and that an out-of-sample evaluation produces a negative R² rather than a clamped zero. It also asserts that the log-space figure is the higher of the two in only 70–85% of random datasets — an assertion written specifically to stop this page claiming “always”, which an earlier draft did. That engine is verified on every change against 37 assertions. The count and the per-case breakdown are published on the formula verification page.
Related calculators
Where this goes next:
Linear RegressionThe least-squares line with r and r² — and the regression of x on y beside it, because those are two different lines rather than one line rearranged.
Correlation CoefficientReports Pearson, Spearman and Kendall together with the scatter plot, and ships Anscombe's quartet built in — four datasets with an identical r of 0.816 that Spearman tells apart.
CovarianceSample and population covariance with a unit multiplier that shows why the magnitude is unreadable — rescaling x multiplies the covariance while leaving the correlation untouched.
Standard ErrorStandard error of a mean or proportion, printed beside the standard deviation it gets confused with — the ratio is always √n, and at n = 50 that is a factor of seven.
VarianceSample and population variance from your data, with a live simulation that shows exactly how much the wrong divisor costs — 20% low at n = 5, closing as the sample grows.
p-valueA p-value from a t or z statistic, one- or two-tailed — with a panel that holds an effect fixed and grows the sample, so you can watch significance appear from nothing but n.
An educational tool. R² describes fit on the data it was computed from, is not comparable across datasets with different ranges of x, and never distinguishes a well-fitted model from an overfitted one — only out-of-sample performance does that.
Published an R-squared calculator that fits five models at once, because a single R-squared is not interpretable: adding a term can never lower it, so a quadratic always beats a line whether or not the curvature is real.
Recomputes R-squared for exponential and power fits against the original y values, and shows the log-space figure separately. Those fits are obtained by linearising, so the number almost every tool reports describes a regression on transformed data — 0.995 on the default dataset where the curve achieves 0.931.
The suite bounds how often that gap runs in the flattering direction at 70 to 85% and asserts it is not always, because an earlier draft of this page claimed 'always' and the measured rate is about three cases in four.
Reports negative R-squared rather than clamping it to zero, since an out-of-sample value below zero is the clearest signal that a model has fitted noise.
Add this calculator to your site
Responsive embed — and private: nothing your visitors type leaves their browser.