AIC and AICc Calculator

Model selection

AIC251.00
AICc (small-sample corrected)251.64
BIC264.03
Penalty 2k10.0
How this was calculated
  1. AIC: 2 x 5 - 2 x (-120.50) = 251.00.
  2. AICc adds (2k^2 + 2k) / (n - k - 1) = 0.64 for n = 100, giving 251.64.
  3. BIC penalises harder: 5 x ln(100) - 2 x (-120.50) = 264.03.
  4. Lower wins: AIC 251.00 and AICc 251.64 are the pair to report at this sample size.

Every parameter a model adds buys fit and risks overfit. The Akaike information criterion prices the trade: AIC = 2k - 2 ln L, twice the parameter count minus twice the maximised log-likelihood. Lower is better, and it is the difference between two models' AICs on the same data - never the absolute value - that carries the evidence. This page computes AIC for one fitted model, the small-sample correction AICc, and BIC for the same fit, so the two penalties can be compared side by side.

Model selection machinery surrounds it on this site - likelihood-ratio and Vuong tests for nested and non-nested pairs - but AIC is the criterion working scientists reach for first, because it asks only for the numbers every fitting routine already prints: the log-likelihood, the parameter count, and the sample size.

Worked examples

lnL -120.5, k 5, AIC 251.00

(-120.5 · 5 · 100)

AIC251.00
AICc (small-sample corrected)251.64
BIC264.03
Penalty 2k10.0

lnL -45.2, k 3, AIC 96.40

(-45.2 · 3 · 40)

AIC96.40
AICc (small-sample corrected)97.07
BIC101.47
Penalty 2k6.0

lnL -980.75, k 12, AIC 1985.50

(-980.75 · 12 · 500)

AIC1985.50
AICc (small-sample corrected)1986.14
BIC2036.08
Penalty 2k24.0

Fit, taxed by complexity

The -2 ln L term rewards fit; the 2k term taxes each parameter at a flat rate of 2 - the penalty 2k is printed with every result on this page. A parameter must therefore improve the log-likelihood by more than 1 unit to pay for itself: a gentler toll than BIC's log(n) per parameter, which is why AIC keeps slightly larger models.

The first example: log-likelihood -120.5 with k = 5 gives AIC = 10.0 + 241.0 = 251.00. With n = 100 observations the AICc correction adds 0.64, for 251.64, while BIC's harder penalty gives 264.03. None of these numbers means anything alone - they are coordinates for comparisons on the same data, not grades.

Only differences are interpretable, because the log-likelihood carries an arbitrary constant from the data's density. Two models on the same data share the constant; two on different data share nothing, and comparing their AICs is the classic beginner's error.

  • AIC = 2k - 2 ln L; lower is better
  • Penalty 2k: 10.0 at k = 5, 24.0 at k = 12
  • AICc adds (2k^2 + 2k)/(n - k - 1)
  • Only delta AIC on the same data is interpretable

Worked examples: three fitted models

Model one, above: AIC 251.00, AICc 251.64, BIC 264.03 at n = 100, k = 5. The correction is small because n/k is comfortable; it exists to grow teeth exactly when that ratio shrinks.

Model two: log-likelihood -45.2, k = 3, n = 40. AIC = 96.40, and the correction adds 0.67 - AICc 97.07 - because 40 observations supporting 3 parameters is the regime where the correction starts to matter; BIC gives 101.47. The brief's rule of thumb: at n = 40 and k = 3 the correction adds 0.67, and it grows quickly from there as n/k falls.

Model three: log-likelihood -980.75, k = 12, n = 500. AIC = 1985.50, AICc 1986.14 (the correction adds 0.64 again at this comfortable ratio), and BIC 2036.08 - a full 50 points above AIC, because log(500) taxes each of the 12 parameters at 6.2 instead of 2.

AICc: the small-sample correction

AIC's penalty is asymptotic; at small n the fitted log-likelihood is optimistically biased and the flat 2k undercharges. The correction term (2k^2 + 2k)/(n - k - 1) restores the charge: 0.64 in the first example (60/94), 0.67 in the second (24/36), and explosive as k approaches n - correctly refusing to grade models that nearly saturate the data.

Practice has converged on using AICc whenever n/k is below about 40, and by default in the ecological and evolutionary literature where it was popularised. Since AICc converges to AIC as n grows - the third example's 0.64 at n = 500 is already negligible - defaulting to it costs nothing at large samples.

The correction assumes a Gaussian linear-model derivation; for other families it is a well-tested approximation rather than an exact result - still the standard choice over uncorrected AIC at small samples.

Correction check: the AICc term is (2k^2 + 2k)/(n - k - 1). At k = 5, n = 100 it adds 0.64; watch it grow as n - k - 1 shrinks.

AIC versus BIC

BIC replaces the flat 2 with log(n) per parameter, so beyond n of about 8 it taxes complexity harder and selects smaller models. The three examples show the gap widening with n and k: 264.03 against 251.00 at n = 100, and 2036.08 against 1985.50 at n = 500, k = 12.

The two criteria answer different questions - AIC targets prediction, BIC targets the true model under its assumptions - and reporting both, when they disagree about a comparison, is more informative than pledging to one. This page prints BIC beside AIC for exactly that reason.

Cross-validation estimates prediction error directly and makes fewer distributional assumptions, at computational cost; asymptotically it and AIC select alike (Stone's theorem). In small samples with a trusted likelihood, AICc is faster and stabler; with a dubious likelihood, cross-validation's honesty wins.

Delta AIC and evidence

Comparisons run on differences: compute AIC (or AICc) for each candidate model fitted to the same data and subtract the minimum. The rough Burnham-Anderson scale reads deltas of 0-2 as substantial support for both models, 4-7 as considerably less support for the higher, and beyond 10 as essentially none - the scale on which the examples' internal differences would be judged if they were rivals on one dataset, which, being separate illustrations, they are not.

Akaike weights convert a set of deltas into shares summing to 1 across the candidate set, and the evidence ratio between two models is the exponential of half their delta. Both are properties of the set as much as of the models: add a third candidate and every weight rescales.

What none of this licenses is dredging: comparing dozens of models and reporting the winner's delta as if it were the only comparison inflates confidence exactly as multiple testing does. The candidate set is part of the method and belongs in the report.

AIC in regression practice

For a Gaussian linear model the log-likelihood reduces to the residual sum of squares, and AIC becomes n ln(RSS/n) + 2k up to a constant - the form in which stepwise procedures historically consumed it. The examples' abstract log-likelihoods (-120.5, -45.2, -980.75) are what generalised models print directly; the regression form is the same criterion in work clothes.

Stepwise selection by AIC is defensible as a screening device and indefensible as an oracle: the selected model's delta against rivals understates the search that produced it. Modern practice prefers a small, theory-chosen candidate set - the setting the delta scale above assumes.

Penalised regression (ridge, lasso) replaces the discrete parameter count with an effective degrees of freedom, and AIC-style criteria adapt through that substitution - another sign the criterion's core idea, fit taxed by complexity, outlives any one formula.

What to write in the report

A complete AIC report names the criterion variant (AIC or AICc), the candidate set, each model's k, log-likelihood and delta, and the weights or evidence ratio for the headline comparison. The per-model numbers follow this page's format: AIC 251.00 with AICc 251.64 and BIC 264.03 at k = 5, n = 100 is a complete, checkable sentence.

Absolute AIC values may be tabulated for reproducibility but should never be interpreted in the text; the sentence 'AIC was 251' conveys nothing a reader can use, while 'AICc favoured the five-parameter model, 251.64 against its rivals' deltas' conveys everything.

When AIC and BIC disagree, say so and say why the chosen one matches the study's aim - prediction or identification. Reviewers accept either criterion defended; they reject either one used as a talisman.

Worked check: the arithmetic by hand

Each example audits in one line. Model one: 2k = 10.0 and -2 ln L = 241.0, summing to AIC 251.00; the AICc term is (2 x 25 + 2 x 5)/(100 - 5 - 1) = 60/94 = 0.64, giving 251.64. Model two: 6.0 + 90.4 = 96.40, correction 24/36 = 0.67, AICc 97.07. Model three: 24.0 + 1961.5 = 1985.50.

The BIC figures audit through log(n): 5 x ln(100) = 23.03, so 241.0 + 23.03 = 264.03; 12 x ln(500) = 74.58, so 1961.5 + 74.58 = 2036.08. Two penalties, two philosophies, all checkable on an envelope - the property that made these criteria ubiquitous.

Keep the trio as unit tests: three AICs, three corrections and three BICs cover every formula on the page.

One last discipline: same data, or no comparison

AIC compares models fitted to the same response on the same observations. Dropping rows with missing values in one model and not another silently changes the data - and with it the arbitrary constant in the log-likelihood that cancels only when the data are truly shared. It is the commonest real-world way this criterion is misused, and no penalty term can repair it.

The examples are three separate fits on three separate scales - log-likelihoods of -120.5, -45.2 and -980.75 - and their AICs (251.00, 96.40, 1985.50) must never be ranked against each other. They illustrate the arithmetic; a comparison set shares one dataset.

Fit on identical data, or do not compare at all.

FAQs

What is the AIC for log-likelihood -120.5 and k 5?

251.00.

What is the AICc at n 100?

251.64.

What do log-likelihood -45.2, k 3, n 40 give?

AIC 96.40, and AICc 97.07.

What is the BIC of the big model (k 12, n 500)?

2036.08 against AIC 1985.50.

What is the penalty at k 5?

2k = 10.0 points.

When does AICc bite?

When n/k is small: at n 40 and k 3 it adds 0.67.

Sources

Related calculators

R-Squared Calculator
Coefficient of determination from summary sums — r, R² and adjusted R² without entering raw data.
Linear Regression Calculator
The least-squares line through up to six points — slope, intercept, correlation r and R², with the equation ready to use.
Margin of Error Calculator
The margin of error of a survey result from sample size, proportion and confidence level — with the finite-population correction and the sample size a target margin needs.