Adjusted R², F-Statistic, Akaike (AIC) & Bayesian (BIC) Regression Model Calculator

Penalize R² for excess predictors via Adjusted R², overall F-test, AIC, and BIC.

Adjusted R-Squared (Adj R²) 0.71 Adj R²
Overall Model F-Statistic F(4, 115) 73.929 F-stat
Akaike Information Criterion (AIC) -31.381 AIC
Bayesian Information Criterion (BIC) -17.443 BIC
Inputs
Try:
R²
Multiple coefficient of determination R² (0 to 0.999).
n
Total observations n in the regression.
predictors k
Number of independent explanatory variables k.
RSS
Residual Sum of Squares (RSS / SSE) for AIC/BIC.
Results & Graph
Adjusted R-Squared (Adj R²)
0.71 Adj R²
Overall Model F-Statistic F(4, 115)
73.929 F-stat
Akaike Information Criterion (AIC)
-31.381 AIC
Bayesian Information Criterion (BIC)
-17.443 BIC

Adjusted R-Squared (Adj R²)

Graph 1 • How the inputs feed Adjusted R², F-Stat & AIC/BIC
Adjusted R², F-Statistic, Akaike (AIC) & Bayesian (BIC) Regression Model Calculator • Custom Domain Schematic (Econometrics & Regression) unadjustsampleSiAdjusted R², F-Stat & Unadjusted R Squared: 0.720 R² • Sample Size N: 120 n ADJUSTED R-SQUARED (ADJ R² 0.71 Adj R² • Overall Model F-Statis: 73.929 F-stat • Akaike Information Cri: -31.381 AIC Eq: Adj_R² = 1 − [ (1 − R²)(n − 1) /
Graph 2 • Adjusted R-Squared (Adj R²) as Unadjusted R Squared changes (40% to 160% of current)
0 Adj R² 0.625 Adj R² 1.25 Adj R² 0.263 0.288R² 0.412 0.432R² 0.561 0.576R² 0.710 0.720R² 0.859 0.864R² 0.994 1.01R² 1.14 1.15R²
Graph 3 • Unadjusted R Squared and Sample Size N together Compares Adjusted R-Squared (Adj R²) when Sample Size N is shifted +25% (solid) vs. −25% (dashed).
0 Adj R² 0.550 Adj R² 1.10 Adj R² --- Sample Size N @ 75% 0.490 -30% 0.601 -15% 0.712 +0% 0.823 +15% 0.934 +30%
Summary: With R² = 0.72, n = 120, and k = 4 predictors, Adjusted R² is 0.7103, overall F(4, 115) = 73.93, AIC = -31.38, and BIC = -17.44.
Summary: With R² = 0.72, n = 120, and k = 4 predictors, Adjusted R² is 0.7103, overall F(4, 115) = 73.93, AIC = -31.38, and BIC = -17.44.
Interactive chart & math engine powered by CalculatorGraph

Formula: Adjusted R², F-Stat & AIC/BIC Formula

AdjR² = 1 − [ (1 − R²)n − 1n − k − 1 ]
F = R² / k1 − R²n − k − 1
Adj_R² = 1 − [ (1 − R²)(n − 1) / (n − k − 1) ]; F = [ R² / k ] / [ (1 − R²) / (n − k − 1) ]
  • unadjustedRSquared: Unadjusted R Squared (R²)
  • sampleSizeN: Sample Size N (n)
  • predictorCountK: Predictor Count K (predictors k)
  • residualSumOfSquaresRss: Residual Sum Of Squares (RSS)

Frequently Asked Questions

Why did AIC and BIC not change when I lowered R²?

They are calculated from RSS, not R². The engine treats the two as separate inputs and never derives one from the other. If you change R², also enter the RSS from the same model fit. Otherwise AIC and BIC still describe the old residuals while adjusted R² and F describe the new one.

Why does my statistics package report a different AIC?

Most packages use the full Gaussian log-likelihood, which adds constant terms and often counts the error variance as a parameter. This page uses n ln(RSS/n) plus 2 times (k plus 1). The difference is a fixed offset for a given n, so differences between models agree, but absolute values do not.

Does the predictor count include the intercept?

No. Enter only the predictors. The engine adds one for the intercept when computing AIC and BIC, and uses k directly in the adjusted R² and F formulas, which already account for the intercept through the n minus k minus 1 term. Entering the intercept as a predictor would overstate the penalty everywhere.

Can adjusted R² be negative?

Yes. When R² is low and predictors are many relative to observations, the adjustment can push it below zero. An R² of 0.1 with 6 predictors on 20 observations gives minus 0.315. That means the model does worse than its predictor count would achieve by chance, which is a sign to simplify.

Which should I trust when AIC and BIC point different ways?

It depends on the goal. AIC favours models that predict well and tolerates small extra terms. BIC favours the most compact adequate model and becomes stricter as n grows. For forecasting, AIC is often preferred; for explaining which variables matter, BIC is more conservative. Reporting both is common.

How big a difference in AIC counts as meaningful?

A widely used guideline treats differences below about 2 as weak evidence, so the models are roughly equally supported. Larger gaps give progressively stronger support to the lower value. These are conventions rather than strict tests, and they only apply to models fitted to the same data.

Can I compare a model of y with a model of log y using AIC?

Not with this calculator. RSS on the log scale and RSS on the original scale are in different units, so their AIC values are not comparable. A valid comparison needs a likelihood adjustment for the transformation, which this page does not perform. Compare only models that share the same response variable.

How do I get RSS if my output only shows R²?

Multiply 1 minus R² by the total sum of squares of the response, which is the sum of squared deviations of y from its mean. Many outputs also show the residual standard error; squaring it and multiplying by n minus k minus 1 gives RSS. Make sure it comes from the same fit as R².

Why is the F-statistic so large with the default inputs?

An R² of 0.72 with 115 residual degrees of freedom is strong evidence that the predictors jointly matter. The F of 73.929 compares 0.18 of explained variance per predictor with about 0.00243 unexplained per residual degree of freedom. Large samples make even moderate R² values highly significant.

What happens if I enter an R² of 1 or above?

The page shows a message asking for an R² from 0 up to but not including 1, and no results. An R² above 1 is impossible for an ordinary least-squares fit with an intercept, and an R² of exactly 1 means zero residual variance, where the F-statistic is undefined. Check your source output if you see such a value.

Does adding a useless predictor always lower adjusted R²?

Not always. Adjusted R² rises when the new predictor's t-statistic is above 1 in absolute value and falls when it is below. A predictor with almost no effect usually lowers it. With k raised from 4 to 8 and R² unchanged at 0.72, the page shows adjusted R² falling to 0.70.

Should I use the same sample size for every model I compare?

Yes. AIC and BIC are only comparable when every model is fitted to exactly the same observations. If one model drops rows because a predictor has missing values, its n and RSS shrink and its AIC improves for reasons that have nothing to do with fit. Fit all candidates on the common complete rows before entering them here.

Is a higher adjusted R² the same as a lower AIC?

They often agree but they are not the same test. Adjusted R² applies a mild penalty that keeps any predictor with a t-statistic above 1, while AIC is somewhat stricter and BIC stricter still. In the fifth-predictor example on this page, AIC preferred the larger model while BIC did not, and adjusted R² moved only slightly.

From R² of 0.72 to an adjusted 0.7103

The default describes a regression fitted to 120 observations with 4 predictors, an R² of 0.72 and a residual sum of squares of 85. Those four numbers are all the calculator needs.

Adjusted R² takes the unexplained share, 1 minus 0.72 or 0.28, and scales it up by (n minus 1) divided by (n minus k minus 1). Here that is one less than 120, divided by 115, about 1.035. The unexplained share grows to roughly 0.290, and adjusted R² is 1 minus that, 0.7103. The answer line rounds it to 0.71.

A drop from 0.72 to 0.71 is small, and that is the expected result for this shape of data. With 120 rows and only 4 predictors, there are plenty of degrees of freedom left over, so the penalty for each predictor is mild. The same R² with a much smaller sample would be penalised far harder.

The supporting lines report an overall F-statistic of 73.929 on 4 and 115 degrees of freedom, an AIC of minus 31.381 and a BIC of minus 17.443. The F-statistic and adjusted R² come from R². AIC and BIC come from RSS. That split is the single most important thing to understand about this page.

Two inputs that the engine never cross-checks

R² and RSS are entered separately, and no part of the calculation links them. Adjusted R² and F use only R², n and k. AIC and BIC use only RSS, n and k.

The presets move both inputs together, which is how real models behave. The weaker fit has R² of 0.43 and RSS of 172: adjusted R² falls to 0.41, F to 21.689, and AIC and BIC rise to 53.2 and 67.138. The stronger fit has R² of 0.86 and RSS of 42: adjusted R² is 0.855, F is 176.607, and AIC and BIC fall to minus 115.979 and minus 102.041. If you change only R² yourself, say to 0.43 with RSS left at 85, AIC and BIC stay at minus 31.381 and minus 17.443, because the engine does not derive one input from the other.

The relationship is RSS = (1 minus R²) × total sum of squares. If your software reports both, copy both from the same fit and the outputs will be consistent. If you only have R², you need the total sum of squares of the response to work out RSS; guessing a value will produce AIC and BIC that describe a different model.

When comparing two models, update both inputs every time. Changing only R² for the second model will leave its AIC unchanged and make the comparison meaningless.

Which version of AIC and BIC this page uses

The engine uses the least-squares form: AIC is n times the natural log of RSS over n, plus 2 times (k plus 1), and BIC replaces the 2 with the natural log of n. The parameter count is k plus 1, meaning the predictors plus an intercept.

Checking the default by hand: RSS over n is 85 over 120, about 0.708, and its log is about minus 0.345. Multiplied by 120 that is about minus 41.38. Adding 2 times 5 gives minus 31.381 for AIC. Adding 5 times ln 120, about 23.94, gives minus 17.443 for BIC.

Statistical packages usually report the full Gaussian log-likelihood version, which adds constant terms involving n and ln 2π, and many also count the error variance as an extra parameter. Their AIC values will therefore differ from this page by a fixed amount for a given n.

That offset does not matter for model choice, because it is the same for every model fitted to the same data. What matters is the difference in AIC or BIC between models. Compare figures from this calculator with each other, not with numbers printed by R, Stata or Python.

Adding a fifth predictor: AIC and BIC disagree

Suppose a fifth predictor brings RSS down from 85 to 83. Enter k as 5 and RSS as 83, leaving R² at 0.72 for the moment.

AIC improves from minus 31.381 to minus 32.238. The reduction in RSS is worth slightly more than the 2-point penalty for one extra parameter. BIC, though, worsens from minus 17.443 to minus 15.513, because its penalty for that parameter is ln 120, nearly 4.8 points, and the fit gain does not cover it.

That disagreement is normal. AIC aims at predictive accuracy and is happy to keep a predictor that helps a little. BIC aims at identifying the simplest adequate model and demands stronger evidence as n grows. Once n is 8 or more, ln n exceeds 2, so BIC always charges more per parameter than AIC.

For the same comparison you should also raise R² to the new model's value. A fifth predictor with R² of 0.73 and RSS of 82 gives adjusted R² of 0.718, AIC of minus 33.693 and BIC of minus 16.968. AIC prefers the bigger model clearly, and BIC still narrowly prefers the original.

Negative AIC is not better than positive AIC by itself

The default AIC is negative only because RSS over n is less than 1. The sign carries no meaning on its own.

Set n to 30 with the other defaults and AIC becomes 41.244, BIC 48.25. Nothing about the model's quality has changed in a way the sign can tell you; the scale of the residuals relative to n has. Similarly, multiplying your response by 10, say switching from metres to decimetres, would multiply RSS by 100 and shift every AIC upward by the same amount.

So the only valid use is relative. Lower is better when comparing models fitted to the same response values on the same observations. Comparing AIC across different datasets, different sample sizes, or a model of y against a model of log y is not meaningful.

A common rule of thumb treats differences under about 2 as weak evidence either way. In the fifth-predictor example the AIC difference is under 1, so the two models are close. The BIC difference is nearly 2 the other way. Neither gives a strong case for the extra term.

Where the F-statistic of 73.929 comes from

The overall F-test asks whether the predictors together explain more than you would expect by chance. It compares explained variance per predictor with unexplained variance per residual degree of freedom.

With the defaults, that is 0.72 divided by 4, which is 0.18, over 0.28 divided by 115, which is about 0.00243. The ratio is 73.929. For an F distribution with 4 and 115 degrees of freedom that is an extremely large value, so the model as a whole is clearly significant.

The page does not report a p-value. You would look that up from F with the degrees of freedom shown in the label. The label updates as you change n and k, so it always shows the right pair.

A large F does not mean every predictor is useful, and it does not protect against overfitting. A model with eight predictors and the same R² still has an F of 35.679 at n of 120, comfortably significant, while its adjusted R² falls to 0.70 and BIC rises to 1.707. Significance and parsimony answer different questions.

Small samples punish extra predictors hard

The adjustment depends on the ratio of observations to predictors, and it gets severe as that ratio falls.

With n of 30 and the default R² of 0.72 and 4 predictors, adjusted R² drops to 0.675 and F to 16.071 on 4 and 25 degrees of freedom. The same fit quality is worth noticeably less when it rests on fewer rows.

Push further. An R² of 0.1 from 6 predictors on 20 observations gives an adjusted R² of minus 0.315 and an F of 0.241. A negative adjusted R² means the model explains less than its predictor count would explain by chance. That is a useful warning, not an error: the predictors are not earning their place.

The engine checks its inputs rather than adjusting them. R² must be from 0 up to but not including 1, n and k must be whole numbers with n at least k plus 2, and RSS must be above zero. Anything outside those bounds produces a message instead of a result, so a typo cannot slip through as a plausible-looking answer.

What these statistics cannot tell you

Adjusted R², AIC and BIC all assume the model form is reasonable and the residuals behave. None of them detects a curved relationship fitted with a straight line, heteroscedastic errors, influential outliers or autocorrelation in time-series data. Residual plots and diagnostic tests do that.

They also say nothing about causation, and nothing about whether a predictor was chosen after looking at the data. Selecting among many candidate models and reporting the best AIC tends to overstate how well the chosen model will predict new data. Cross-validation on held-out observations is a more honest check when you have enough rows.

Finally, k on this page counts predictors in the usual sense, columns in the design matrix besides the intercept. A categorical variable with four levels uses three columns, and an interaction term uses its own column. Counting them correctly matters, because every one feeds the penalty in all four outputs.

Use the page as a quick screen. If adjusted R² barely moves and AIC and BIC split, the extra predictor is a judgement call, and subject knowledge about whether it belongs should carry more weight than a fraction of a point in either criterion.