Every residual, with the leverage that decides how much it was allowed to be.
Residuals, leverage and influence
A genuine linear relationship with ordinary scatter — the only one of the four the line describes.
y = 3.0001 + 0.5001x · R² = 0.6665 · s = 1.2366
No point exceeds the usual thresholds
Which is a statement about these thresholds, not a guarantee the model is right — check the plot for structure.
Residual sum
0
exactly zero with an intercept (computed: -1.8e-14)
Residual std error
1.236603
√(SSE/9)
Largest |standardised|
1.7779
below the usual flag
Leverage cutoff
0.3636
4/n · mean leverage is 0.1818
This is the plot that separates the four Anscombe datasets, which every summary statistic fails to. A structureless band around zero is what a correct model looks like; a curve, a fan or an isolated point is the model telling you something a single number cannot.
Per-point residual, leverage, standardised and studentised residual, and Cook’s distance
x
y
Fitted
Residual
Leverage
Std. resid.
Studentised
Cook's D
10.00
8.04
8.001
0.039
0.1000
0.033
0.031
0.0001
8.00
6.95
7.001
-0.051
0.1000
-0.043
-0.041
0.0001
13.00
7.58
9.501
-1.921
0.2364
-1.778
-2.081
0.4892
9.00
8.81
7.501
1.309
0.0909
1.110
1.127
0.0616
11.00
8.33
8.501
-0.171
0.1273
-0.148
-0.140
0.0016
14.00
9.96
10.001
-0.041
0.3182
-0.041
-0.038
0.0004
6.00
7.24
6.001
1.239
0.1727
1.102
1.117
0.1268
4.00
4.26
5.000
-0.740
0.3182
-0.725
-0.705
0.1227
12.00
10.84
9.001
1.839
0.1727
1.635
1.838
0.2790
7.00
4.82
6.501
-1.681
0.1273
-1.455
-1.568
0.1543
5.00
5.68
5.501
0.179
0.2364
0.166
0.157
0.0043
The leverages sum to exactly 2, always — here 2.000000. That is the parameter count of a straight line, and it holds for every dataset: the influence available is fixed, so one point taking more of it means the others take less. It is the cleanest way to see that leverage is a property of the design rather than of the measurements, and the tool asserts it across 400 random datasets on every build.
A standardised residual is not the residual over s. It is the residual over s·√(1 − h), because a point with high leverage drags the line toward itself and so has a genuinely smaller residual variance. Dividing every residual by the same s understates exactly the points that most deserve attention — and the studentised column goes one step further, leaving the point out of the variance estimate so an extreme value cannot inflate the yardstick it is measured against.
What this tool shows
Residual rules miss the worst case by construction. Anscombe’s fourth dataset is decided entirely by one observation — and has the smallest maximum standardised residual of the four, at 1.5687. The point responsible has leverage exactly 1 and a residual of exactly 0, because the line is forced through it.
Residual, fitted value and standardised residual for every point
Studentised residuals, with the point excluded from its own yardstick
Leverage, and the 4/n cutoff — plus the fact that leverages always sum to 2
Cook’s distance, checked against a full delete-and-refit
Residual-against-fitted plot, the thing a summary statistic cannot replace
All four Anscombe datasets as presets, and one with a widening spread
Leverage beside every residual Anscombe built in Cook's D by deletion Studentised too
Leverage 1.0000, residual 0.0000 — invisible to every residual rule.
Updated 12 September 2026 · Works in any browser, no installation
A residual is what the model got wrong at one point: y minus the fitted value. Their pattern is the only part of a regression that can tell you the shape is wrong, which is why it survives where R² and the correlation do not — and why leverage has to be read alongside them.
At a glance
Formula shown
The residual is eᵢ = yᵢ − ŷᵢ, and with an intercept they sum to exactly zero. Leverage is hᵢ = 1/n + (xᵢ − x̄)²/Σ(x − x̄)², the diagonal of the hat matrix, and the leverages always sum to 2 for a straight line. The standardised residual is eᵢ/(s√(1 − hᵢ)) — divided by its own standard deviation, which varies by leverage. Cook’s distance is how far every fitted value moves when the point is deleted.
Scenario support
Checking whether a fitted line is the right shape, finding the observations that are deciding a slope, distinguishing an outlier in y from an extreme value in x, diagnosing non-constant variance before quoting a standard error, and deciding whether a high R² is describing the data or a single point.
Educational estimate
Planning support from the values you enter — not professional advice.
Four datasets, one regression summary
Anscombe published the quartet in 1973 to make a point that had to keep being made. All four presets here are his data, unaltered.
They agree on every number a regression report prints. Mean x is exactly 9 in all four and the sample variance of x is exactly 11. Mean y agrees to 7.50, the variance of y to 4.1, the correlation to 0.82, the slope to 0.500, the intercept to 3.00 and R² to 0.67. The residual standard error agrees to 1.24.
They describe four completely different situations. The first is a genuine linear relationship with ordinary scatter. The second is an exact parabola. The third is ten collinear points plus one outlier. The fourth has every x equal to 8 except one.
The agreement is close but not perfect, and the usual claim overstates it. “Identical to three decimal places” is repeated everywhere; measured, the four R² values span 0.000465 and the fourth correlation rounds to 0.817 rather than 0.816. Two decimal places is what actually holds, and the verification suite asserts the spread rather than a digit string.
The residual plot separates them immediately. Load each preset in turn: the first gives a structureless band, the second a clean parabola, the third a single point far from a tight line, the fourth a vertical stack and one isolated point sitting exactly on zero.
Which is the whole argument for plotting. No summary statistic distinguishes these four. One glance at the residuals distinguishes all of them, and it takes about a second.
The most broken dataset scores cleanest
The quartet is usually left there. There is a further result in it that is more uncomfortable, and it is about the diagnostics themselves rather than about R².
Anscombe IV has the smallest maximum standardised residual of the four. 1.5687, against 1.7779, 1.8607 and 2.9999 for the others. The usual rule — flag anything beyond two standard deviations — passes it clean, and flags the third dataset.
It also has the smallest finite Cook’s distance. 0.1367, against 0.4892, 0.8079 and 1.3928. On the standard influence diagnostic it looks like the best-behaved of the four.
It is the one where a single observation decides everything. Ten points sit at x = 8 and one sits at x = 19. That single point determines the entire slope; delete it and every remaining x is identical, so no line exists at all. The tool demonstrates this: remove it and the calculator returns nothing, because there is nothing to return.
The reason the diagnostics miss it is exact rather than approximate. Its leverage is 1.0000, which forces the fitted value to equal the observed value, which makes the residual 0.0000. Standardising divides by √(1 − h) and dividing by zero leaves the standardised residual and Cook’s distance undefined — not large, not small, undefined. Software that reports them as blank or as zero turns an alarm into a clean bill of health.
So leverage is not an advanced extra. It is the diagnostic that catches what residuals structurally cannot, it costs one line of arithmetic, and this tool prints it in the main table rather than behind a toggle for exactly that reason.
Why a residual is divided by s√(1 − h)
“More than two standard deviations” is the usual rule, and the question it skips is: two standard deviations of what?
Residuals do not all have the same variance. The variance of residual i is σ²(1 − hᵢ), so a point with high leverage has a genuinely smaller expected residual — not because it fits better, but because the line was pulled toward it.
Dividing every residual by the same s therefore understates the wrong points. It makes the observations with the most influence look the most obedient, which is the reverse of what a diagnostic should do.
The standardised residual corrects it exactly. eᵢ/(s√(1 − hᵢ)) has unit variance for every point, so a threshold of 2 means the same thing everywhere along the x axis.
The studentised residual goes one step further. It leaves point i out of the variance estimate, so a single extreme value cannot inflate the yardstick it is being measured against. That matters most on small samples, where one bad point can raise s enough to hide itself, and it is why the tool reports both columns rather than choosing.
The two agree until they matter. On well-behaved data the standardised and studentised columns are nearly identical. Where they diverge, the studentised one is larger and the point is masking itself — which is the case the whole construction exists for.
Leverage is decided before you look at y
This is the property that makes leverage a different kind of diagnostic from everything else on the page, and it is routinely missed.
hᵢ = 1/n + (xᵢ − x̄)²/Σ(x − x̄)² contains no y at all. It is a property of where you took your measurements, fixed the moment the design is chosen and unchanged by whatever those measurements turn out to be.
So a high-leverage point is not an outlier. It is a point with more say. It might fit the trend perfectly and still be the reason the trend has the slope it has.
The leverages always sum to exactly 2. Two being the number of parameters in a straight line. The total influence available is fixed, so one point taking more means every other point takes less — which is the cleanest way to see why a single extreme x is so consequential. The suite checks the sum across 400 random datasets.
Mean leverage is therefore always 2/n, and the usual flags are two or three times that. This tool uses 4/n, which is the more common convention in the influence literature and is the same as twice the mean.
The practical consequence is about design, not analysis. If you get to choose where to measure, spreading x reduces the standard error of the slope — but concentrating all the spread in one or two extreme points buys precision that rests entirely on those points being right. Balanced designs keep maximum leverage low on purpose.
What each residual pattern is telling you
A residual plot has a small vocabulary, and each pattern points at a specific defect with a specific fix.
A curve means the shape is wrong. Anscombe II is the pure case: the residuals trace a clean parabola — negative at both ends and positive across the middle, in the order −−+++++++−− — while the linear R² of 0.666 describes a relationship that is very nearly exactly quadratic. A quadratic fit there scores 0.999999.
A fan means the variance is not constant. The widening-spread preset fits well by R² and violates the assumption every standard error and p-value depends on. The coefficients stay unbiased; the confidence intervals become wrong, usually too narrow at the high end. A log transform of y or weighted least squares is the response.
A run of same-signed residuals means something is missing. Consecutive positives followed by consecutive negatives on time-ordered data is autocorrelation, and it inflates significance badly — effectively you have fewer independent observations than rows.
One point far from a tight band is an outlier in y. Anscombe III, where ten points are exactly collinear and one is not. Worth investigating as a data error, and worth reporting either way.
A vertical stack with one point off to the side is Anscombe IV, and it is the pattern the numbers will not tell you about. The residual plot shows it instantly, which is the argument for looking.
A structureless band is what correct looks like. Not a small band — the width is the residual standard error and can be large on genuinely noisy data — but a band with no shape, no trend and no fan.
Cook’s distance, and why influence is not permission to delete
Cook’s distance answers the question the other diagnostics circle: if this point were not here, how different would the answer be?
It is defined by deletion. Drop point i, refit, and measure how far every fitted value moved, scaled by the residual variance. The algebraic shortcut avoids n refits, and the verification suite checks the shortcut against an actual delete-and-refit at every point, so the number is the definition rather than an approximation of it.
It combines the two things that make a point matter. An unusual y, through the standardised residual, and an unusual x, through leverage. A point can have a huge residual and almost no influence if it sits at the centre of the x range, and almost no residual and total influence if it does not.
The threshold of 1 is a convention. So is 4/n, which flags more. Neither is a test, and neither has a null distribution behind it — they are prompts to look at the observation, and that is all they claim to be.
High influence is not evidence that a point is wrong. It is evidence that your conclusion depends on it. The honest responses are to check the record, to report the fit with and without it, or to collect more data near that x. Deleting an inconvenient point because a diagnostic flagged it is the diagnostic being used backwards.
And a clean Cook’s distance proves less than it appears to. Anscombe IV’s largest finite value is 0.1367, comfortably below every threshold, on a dataset that one observation controls completely. Influence measures answer “what changes if I remove this point”, and when removing the point destroys the model entirely they have nothing to compare against.
Sources and methodology
References for the diagnostics and for the dataset that motivates them.
Method. Leverage is the hat matrix diagonal, and the suite recomputes it from (X′X)⁻¹ built independently rather than from the same expression the engine uses. Cook’s distance is checked against its definition by deleting each point in turn, refitting, and measuring how far every fitted value moved — agreement below 10⁻⁹ at every point. Standardised residuals divide by s√(1 − h) and studentised residuals exclude the point from its own variance estimate, both left undefined rather than clamped where leverage reaches 1. The Anscombe values are the published ones, and the suite pins what actually agrees: mean x of exactly 9 and variance of exactly 11 in all four, slopes within 0.0004, R² within 0.0005 — two decimal places rather than the three usually claimed — and the fourth dataset’s maximum standardised residual of 1.5687 being the smallest of the four. That engine is verified on every change against 188 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.
Coefficient of DeterminationR-squared across five models at once with adjusted R-squared beside it, because adding a term can never lower it and the value most tools report for a curve fit was computed in log space.
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.
Quadratic RegressionFits y = a + bx + cx² and prints the vertex, which is the optimum a dose-response curve is fitted to find — plus whether that turning point falls inside your data or is being assumed by the shape.
Sum of SquaresComputes Σx² and Σ(x − x̄)² side by side, because the term means both and they differ by 94.7 times on the built-in preset — plus SST, SSR and SSE with the intercept condition the textbook identity depends on.
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.
An educational tool. Leverage, standardised residuals and Cook’s distance use conventional thresholds rather than hypothesis tests; none of them is a rule for removing data, and a point with leverage 1 is undefined on every residual-based measure rather than clean.
Published a residual calculator carrying all four of Anscombe's datasets as presets. They agree on mean x of exactly 9, variance of x of exactly 11, a slope of 0.500, an intercept of 3.00, an R-squared of 0.67 and a correlation of 0.82 — and describe four completely different relationships that only the residuals separate.
Reports the result that goes past the usual telling: Anscombe IV, where one observation decides the entire slope, has the SMALLEST maximum standardised residual of the four at 1.5687 and the smallest finite Cook's distance at 0.1367. Every 'flag beyond two standard deviations' rule passes the most broken dataset cleanest.
The reason is exact. That point's leverage is 1.0000, which forces its residual to 0.0000, and both standardised residual and Cook's distance divide by 1 minus leverage — so they are undefined rather than small. The tool says undefined instead of blank or zero, and prints leverage in the main table rather than behind a toggle.
Standardised residuals divide by s times the square root of 1 minus leverage rather than by s, because residual variance genuinely falls with leverage; studentised residuals exclude the point from its own variance estimate. Cook's distance is verified against a full delete-and-refit at every point rather than only against the algebraic shortcut.
Add this calculator to your site
Responsive embed — and private: nothing your visitors type leaves their browser.