Math calculator

Cook's Distance Calculator

What moves the fit.

Moving the fit

Twenty-six observations with two near-identical points far out along x. Together, their Cook’s distances are 0.62290 and 0.25306 — both below the distributional cutoff of 0.7136, so the diagnostic reports nothing serious. Delete the second and the first jumps to 10.08012, a sixteenfold increase. Between them they move the slope from 1.76451 to 2.45769, a 39% change, and each one hides the other by making its deletion look harmless. Cook’s distance is a leave-one-out measure, and a pair of similar points is exactly what it cannot see.

26 rows · 2 parameters · largest distance at row 25

Cook's D 0.622901 — 3 flagged by 4/n, 0 by the F cutoff

The two conventions disagree on this data. The 4/n rule of thumb is 0.15385 and the median of F(2, 24) is 0.7136 — 4.64 times higher. Both are printed as "the" threshold in ordinary use, and they give different answers here.

Largest distance

0.62290

row 25

4/n rule of thumb

0.15385

flags 3 of 26

Median of F

0.7136

flags 0 of 26

Ratio of cutoffs

4.64×

they are not the same rule

Ranked by influence

The twelve most influential rows with the leverage and residual they are built from
RowPredictorsCook’s DLeverageStudentisedF percentileSource
2547.000.622900.410281.361845.52%leverage
2647.600.253060.431300.811122.15%leverage
831.800.221450.07052-2.718719.70%residual
2421.900.071200.048761.73526.85%
324.000.068130.040221.89856.57%
927.300.063590.04112-1.80086.15%
1526.100.043400.03877-1.50524.24%
1322.400.034890.046081.21363.42%
623.100.032920.04301-1.22263.23%
1225.000.032900.03865-1.29743.23%
2324.000.013800.04022-0.80551.37%
1119.400.012550.068150.57771.25%

The last column names which ingredient produced the distance. Cook’s D is the product of leverage and squared standardised residual, so a large value can come from either — and the remedy is completely different depending on which.

Every distance here is computed from a closed form rather than by refitting the model 26 times. The verification suite does perform those refits and requires the two to agree to better than 1e-9, which is the only way to know the closed form was transcribed correctly.

This is a leave-one-out measure. Two similar influential points support each other: deleting either one alone changes little, so both look harmless, while removing the pair moves the fit substantially. A quiet table is not proof that no small group of rows is driving the result.

Both cutoffs shown Closed form, checked by refit Its two ingredients Blind to pairs

What this tool shows

On the shipped preset two influential points give Cook’s distances of 0.62290 and 0.25306 — both below the cutoff, so nothing is flagged. Delete one and the other jumps to 10.08012. A sixteenfold increase, from a diagnostic that was reporting a clean dataset a moment earlier. Between them the pair moves the slope by 39%. Cook’s distance is a leave-one-out measure, and two similar points are exactly what it is built not to see.

  • Cook's distance for every row, from a closed form the suite checks against actual refits
  • Both cutoffs in circulation — 4/n and the median of F(p, n − p) — with how many rows each flags
  • The leverage and studentised residual behind each distance, so the source of the influence is visible
  • The F percentile each distance corresponds to, which is the reading the statistic was defined for
  • A preset where two influential points mask each other completely
  • Why a quiet table is not proof that no small group of rows is driving the result
Both cutoffs Checked against refits Leverage and residual Blind to pairs

Influence is a reason to look, never a reason to delete.

Updated 13 September 2026 · Works in any browser, no installation

Cook’s distance measures how far every fitted value moves when one observation is removed, scaled so the answer reads as a fraction of the confidence region for the coefficients. It is the product of leverage and squared standardised residual, which means a large value can come from a point being unusual in its predictors, unusual in its outcome, or both — and the three call for different responses. The page prints the ingredients for that reason.

At a glance

Formula shown
Dᵢ = (rᵢ²/p) · hᵢ/(1 − hᵢ), where rᵢ is the internally studentised residual, hᵢ the leverage and p the number of parameters. Equivalently it is the sum of squared changes in every fitted value when row i is deleted, divided by p·σ̂². Referring D to F(p, n − p) gives the reading it was defined for: a distance at the median of that distribution moves the coefficient vector to the edge of a 50% confidence region.
Scenario support
Checking whether a regression rests on a handful of observations, deciding which rows to verify against source records, comparing a fit before and after a suspect point, and reporting honestly how much of a conclusion depends on any one case.
Educational estimate
Planning support from the values you enter — not professional advice.

Two influential points hide each other completely

This is the failure the shipped preset exists to show, and it is not a subtle one. The diagnostic reports a clean dataset while two rows are quietly running the regression.

With both present: distances of 0.62290 and 0.25306. The distributional cutoff is 0.7136, so neither is flagged.

Remove the second and the first becomes 10.08012. Sixteen times larger, and far past any threshold anyone uses.

Between them they move the slope from 1.76451 to 2.45769 — a 39% change that no single-row diagnostic reports.

The mechanism is arithmetic, not bad luck. Deleting one leaves the other holding the line in the same place, so the fit barely moves and the deletion looks harmless. Any pair of similar high-leverage points does this, and so does any small cluster.

The two thresholds disagree by a factor of five

Both are printed in textbooks as the Cook’s distance cutoff. They are not close, and which one a piece of software uses is rarely stated.

4/n is a screening heuristic. On twenty-six rows it is 0.15385, and on the third preset it flags two rows that the other convention calls entirely ordinary.

The median of F(p, n − p) is the distributional reading. On the same data it is 0.7136 — 4.64 times higher.

4/n scales with the sample size and the distribution of the distances does not, so the rule flags roughly a fixed share of any dataset. On the fourth preset, which has no structural problem at all, it still returns two rows out of thirty.

Which is why both are shown with their counts. The distances are the finding; a threshold that turns them into a yes or no is a convenience, and choosing between two conveniences that differ fivefold is a decision worth making explicitly.

Leverage and residual, and why the difference matters

Cook’s distance multiplies two things together, and the same value can come from very different situations that call for very different responses.

On the second preset the influential row has a studentised residual of 1.2551. It is not an outlier by any reading. Its leverage is 0.696277, and all the influence comes from there.

That is not a data problem, it is a design problem. The remedy is more observations in that region, not a decision about one row.

A large residual on ordinary leverage is the opposite case. There the row genuinely does not fit, and checking the record is the right next step.

The table names which ingredient produced each distance, which is the part a single summary number throws away — and DFBETAS goes one step further, naming which coefficient moves.

A closed form, checked against the refits it replaces

Deleting a row and refitting is the definition. Doing it n times is unnecessary, and the shortcut is where implementations go wrong.

Every deletion quantity has a closed form in the residual and the leverage. No refitting is needed, and the closed form is more accurate as well as faster.

The transcription is the risk. The formulas are compact and easy to get subtly wrong in a way that looks plausible on ordinary data.

So the suite does the refits. It deletes each row in turn, refits, computes the movement in every fitted value directly, and requires agreement with the closed form to better than 1e-9.

That runs across twelve generated datasets and every row within them, which is a far stronger check than a single worked example and catches the exact error a worked example would miss.

What the number actually means

Cook’s distance has an interpretation that is more useful than any threshold, and it is the reason the statistic is defined the way it is.

D is the squared distance the coefficient vector moves, in units of its own confidence region. Referring it to F(p, n − p) converts that into a percentile.

A distance at the 50th percentile moves the coefficients to the edge of a 50% confidence region. That is a genuine statement about how much the conclusion depends on one row.

The page prints that percentile for every row. It is not a p-value and should not be read as one — there is no null hypothesis here.

It is a magnitude, and the honest way to report influence is with the number itself: “removing this observation moves the coefficients past the 90th percentile of their own confidence region” says something a flag does not.

Influence is not a reason to delete

The most common misuse of this diagnostic is using it as a filter, and it invalidates everything downstream of it.

An observation is removed for a reason about the observation. A transcription error, an instrument fault, a subject who does not belong in the population.

Never for the effect it has on a coefficient. That is selecting data to produce an answer, and the standard errors afterwards are fiction.

The defensible move is to report both fits. With and without, and let the reader see the size of the dependence.

And if the result only holds one way, that is the result. A conclusion that depends on a single observation out of twenty-six is a finding about the study, not a nuisance to be cleaned away.

Reporting an influential observation

Four items, and the second is the one that lets a reader compare your finding against anyone else’s.

Give the distance, the sample size and the parameter count. A D of 0.5 means different things at n = 20 and n = 2,000.

Say which cutoff you used. 4/n and the F median differ by a factor of five, and “above the threshold” is not a reportable claim without naming which.

Give the leverage and the residual. They say whether the row is unusual in its predictors, its outcome, or both.

And check for pairs before concluding nothing is influential. Deleting the top two rows together and refitting takes a moment and catches the masking this page opens with.

Sources and methodology

References for the statistic and its interpretation.

Method. Every distance is computed from the closed form in the residual and the leverage rather than by refitting the model n times, and the verification suite performs those refits to check it: each row is deleted, the model refitted, the movement in every fitted value computed directly, and the two required to agree to better than 1e-9 across twelve generated datasets and every row within them. The least-squares core underneath is separately checked against this site’s other, independently written regression engine. The F median used as the distributional cutoff is found by bisection on the F distribution function rather than read from a table, so it is exact at every combination of p and n rather than only at tabulated ones. The suite also asserts the defining identity — D is leverage times squared standardised residual, on 100 generated sets — and that the reported percentile rises monotonically with the distance. That engine is verified on every change against 103 assertions. The count and the per-case breakdown are published on the formula verification page.

Related calculators

Where this goes next:

LeverageHat values for every observation with the 2p/n and 3p/n cutoffs, the studentised residuals alongside, and the Σh = p identity printed as a check.
Influence DiagnosticsDFFITS, DFBETAS and the covariance ratio in standard-error units beside Cook's distance, so a row that moves one coefficient rather than the whole fit is visible.
Multiple RegressionFits several predictors with a VIF on every term, and names the configuration people misread: a model significant at p = 0.0103 where neither predictor reaches 0.05, at a VIF of only 7.11.
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.
OutlierRuns four outlier rules together and says when each is failing — the 3-sigma rule cannot flag anything below n=11, two outliers hide each other, and the quartile convention alone can decide the answer.
VIFVariance inflation factors with Belsley-Kuh-Welsch condition indices and variance-decomposition proportions, so a near-dependency is named rather than only detected.

More in Math, or browse all calculators.

Educational use disclaimer

An educational tool. Cook’s distance deletes one observation at a time, so two or more similar influential points can mask each other entirely and produce a clean-looking table. It is a magnitude rather than a test — the F percentile it reports is not a p-value — and influence is a reason to examine an observation, never a reason to remove it.

How we calculate · Found an error? email us

Authorship & verification

Written and maintained by , a business operator who builds spreadsheet-based calculators.

What's changed (5 updates)

Published 13 September 2026

  1. Published Cook’s distance against both cutoffs in circulation, with the counts each returns.
  2. Shipped a preset where two influential points mask each other and one jumps 16-fold when the other is removed.
  3. Printed the leverage and studentised residual behind every distance.
  4. Added the F percentile each distance corresponds to, which is the reading the statistic was defined for.
  5. Computed the distances from a closed form checked against actual leave-one-out refits.

Add this calculator to your site

Responsive embed — and private: nothing your visitors type leaves their browser.