Math calculator

Leverage Calculator

How much pull.

Pull on the fit

Twenty-four observations, one predictor. The last row sits far out along x and exactly where the line predicts, so its studentised residual is 1.2551 — nothing an outlier screen would stop on. Its leverage is 0.696277, which is 8.355 times the average of 0.08333: almost seven tenths of that row’s fitted value is the row predicting itself. Delete it and the slope’s standard error goes from 0.08882 to 0.15576. One point in twenty-four is holding the reported precision of the slope down by nearly half, and it is doing that without being an outlier in any sense.

24 rows · 2 parameters · average leverage 0.08333

Largest leverage 0.696277 at row 24

That row supplies 69.63% of its own fitted value, 8.355 times the average. 1 row exceeds the 2p/n cutoff of 0.16667 and 1 exceeds 3p/n.

Largest leverage

0.69628

row 24

Average

0.08333

p/n = 2/24

Past 2p/n

1

cutoff 0.1667

Past 3p/n

1

cutoff 0.2500

The leverages sum to 2.000000, and with 2 estimated parameters they have to sum to exactly 2. That is the trace of the hat matrix and it holds for every design matrix there is, so it checks the design, the inverse and the projection in a single number — asserted on 120 generated designs.

Ranked by leverage

The twelve rows with the most pull on the fit, with their residuals for comparison
RowPredictorsLeverage× averageStudentised residualVerdict
2444.000.696288.3551.2551high pull, on the line
1212.700.157461.8890.6287ordinary
617.000.074930.899-0.2425ordinary
717.300.071030.8520.4606ordinary
1617.700.066210.795-2.1815ordinary
525.800.061480.7380.0775ordinary
2118.300.059800.7180.5148ordinary
1718.700.056060.6730.3007ordinary
925.100.054910.6591.8463ordinary
418.900.054350.6520.6583ordinary
1819.200.051990.6241.2648ordinary
124.700.051740.621-1.9745ordinary

The last two numeric columns answer different questions. Leverage asks how unusual the predictors are; the residual asks whether the outcome fits. A row can be extreme on one and unremarkable on the other, and the combination is what decides whether the fit actually moves.

Leverage is computed from the predictors alone. Replace every outcome in the box above with random numbers and every value in this table stays bit-identical, which means leverage can be worked out from a study design before a single measurement is taken — and that it is not, on its own, a statement that anything is wrong.

Design, not outcome Σh checks itself Residuals alongside High leverage is not a fault

What this tool shows

On the shipped preset one row of twenty-four has a leverage of 0.696277 — it supplies almost seven tenths of its own fitted value — and a studentised residual of 1.2551. An outlier screen sees nothing at all. Delete that row and the slope’s standard error goes from 0.08882 to 0.15576. One observation is holding the reported precision of the whole fit down by nearly half, and it does it by sitting exactly where the line predicts.

  • Leverage for every observation, with the 2p/n and 3p/n cutoffs and how many rows clear each
  • The studentised residual printed beside each leverage, because they answer different questions
  • Σh against the number of parameters — an identity that holds for every design matrix there is
  • The case where the standard cutoff exceeds 1 and so cannot fire at all
  • How much of its own fitted value the highest-leverage row is supplying
  • Why leverage can be computed from a study design before any outcome is measured
Design, not outcome Σh checks itself Residuals alongside Exact, from the hat matrix

High leverage is a property of the design, not a fault in the data.

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

Leverage is the weight an observation’s own outcome carries in its own fitted value — the diagonal of the hat matrix. A leverage of 0.7 means seven tenths of that point’s prediction is the point predicting itself, so the line has almost nothing else to go on there. It measures how unusual the predictors are, says nothing about whether the outcome fits, and is often the more useful of the two.

At a glance

Formula shown
H = X(XᵀX)⁻¹Xᵀ, and the leverage of row i is hᵢᵢ, the ith diagonal entry. In simple regression that reduces to h = 1/n + (x − x̄)²/Sxx, so leverage is 1/n at the mean of x and rises with the square of the distance from it. Every leverage lies between 1/n and 1 when an intercept is fitted, and they sum to exactly p, the number of estimated parameters — trace(H) = p for any X whatsoever.
Scenario support
Checking whether one observation is carrying a regression, screening a design before data collection, diagnosing an unstable coefficient, deciding whether to extend a predictor’s range, and working out why a standard error is smaller than the data seems to warrant.
Educational estimate
Planning support from the values you enter — not professional advice.

It does not contain the outcome at all

The hat matrix is built from X and only X, and the consequence is more useful than it sounds.

Replace every outcome with random numbers and every leverage is unchanged. Not approximately — bit-identical, which the verification suite asserts with an equality check on eighty generated designs.

So leverage can be computed before a single measurement is taken. If a planned study has one subject at an extreme dose, the leverage of that subject is already determined.

And it means leverage is not an outlier measure. It cannot be: it has never seen the outcome, so it cannot know whether anything is out of line.

Which is why the residual sits next to it in the table. Leverage asks how unusual the predictors are; Cook’s distance is what combines the two into a statement about the fit actually moving.

The point holding your standard error down

High leverage is usually described as a risk. On the shipped preset it is doing something more specific, and the direction surprises people.

Delete the high-leverage row and the slope’s standard error rises from 0.08882 to 0.15576. Losing one observation of twenty-four costs 75% more uncertainty.

That is what leverage buys. A point far out along x is enormously informative about a slope, because the slope is estimated from spread in x and that point supplies most of it.

The risk is the flip side of the same fact. If that point is wrong, the slope is wrong, and nothing else in the data is positioned to say so.

So the right response is not deletion. It is to check that one observation especially carefully, and to say in the write-up how much of the result rests on it.

The leverages must sum to the number of parameters

The page prints Σh beside p because the identity is exact, universal, and a complete check on the arithmetic.

trace(H) = p, for any design matrix at all. Two parameters and twenty-four rows: the leverages sum to 2.000000.

No distributional assumption is involved. It comes from H being a projection onto a p-dimensional space, and holds for data that breaks every regression assumption there is.

It checks three things at once: the design matrix, the inversion of XᵀX and the quadratic form. Break any one and the sum stops matching.

The suite asserts it on 120 generated designs from one to five predictors and six to fifty rows, alongside the bounds that every leverage lies between 1/n and 1 whenever an intercept is fitted.

When the 2p/n rule cannot fire

The usual cutoff is twice the average leverage, and the third preset is there because it has a failure mode nobody mentions.

Eleven observations and six parameters gives an average leverage of 0.54545. Twice that is 1.09091.

A leverage cannot exceed 1. So the rule flags nothing, on any data, ever — and reports a clean result for a design where one row has a leverage of 0.93399.

Whenever p is more than half of n the cutoff is vacuous, and it degrades smoothly rather than suddenly: at p/n = 0.4 the rule can only fire for leverages above 0.8.

Read the average and the maximum instead. A maximum many times the average is the finding; a threshold derived from that same average cannot see it.

What raises leverage, and what to do about it

Leverage is a property of where the predictors sit, so the fixes are design decisions rather than data cleaning.

Distance from the centre of the predictors raises it, as the square — twice as far out is four times the excess leverage in simple regression.

An unusual combination raises it even when each value is ordinary, which is the multivariate case and the same idea as a Mahalanobis distance on the predictor columns.

Adding parameters raises everybody’s, because the average is p/n. A polynomial term or an interaction pushes the whole distribution up.

Collecting more data in the sparse region is the real fix. A lone point at an extreme dose has high leverage because it is alone; a second observation near it halves the problem and doubles what the study can say about that region.

Leverage is the extrapolation warning

There is a second use for the same number that has nothing to do with diagnosing existing data.

The leverage of a hypothetical new point says how far outside the data it is. Feed in the predictor values you want a prediction for and the hat value tells you whether the model has seen anything like it.

A leverage above the training maximum means extrapolation, whatever the individual predictors look like — it catches unusual combinations that a per-variable range check passes.

Prediction intervals widen by exactly √(1 + h). So the number is not a flag, it is the quantitative size of the extra uncertainty.

Which makes leverage the honest way to refuse a prediction. Not “the model is uncertain” but “this input has a leverage of 1.4, well past anything the fit was built on”.

Reporting a high-leverage observation

Four items, and the second is what stops a reader treating high leverage as a euphemism for bad data.

Give the leverage, the average p/n and their ratio. A leverage of 0.3 is alarming on 200 rows and ordinary on 12.

Give the residual too. High leverage with a small residual is a point supporting the fit; high leverage with a large one is a point defining it.

Say what happens when it is removed. Both to the coefficient and to its standard error — the second often moves more, and is more often left out.

And do not remove it for being influential. An observation is dropped for a reason about the observation — a recording error, a subject who does not belong in the population — never for the effect it has on a coefficient.

Sources and methodology

References for the hat matrix and its diagnostics.

Method. The hat values come from XᵀX inverted by Gauss-Jordan elimination with partial pivoting, and the least-squares core underneath them is checked against this site’s other, independently written regression engine — coefficients and standard errors agree to better than 1e-9 across forty generated datasets, which is a stronger check than a worked example because it varies the sample size, the predictor count and the noise. On top of that the suite asserts the identity the page prints: the leverages must sum to exactly the number of estimated parameters, on 120 generated designs, because trace(H) = p holds for every design matrix whatsoever. It separately asserts that replacing every outcome with unrelated noise leaves each leverage bit-identical — an equality check, not a tolerance, on eighty designs — and that simple regression reproduces the textbook closed form 1/n + (x − x̄)²/Sxx. 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:

Cook's DistanceCook's distance for every row against both cutoffs in circulation, with the leverage and studentised residual it is built from and the F percentile it corresponds to.
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.
Mahalanobis DistanceMultivariate outlier distance with the chi-square cutoff, each row's largest z-score beside it, and a count of the points only the joint screen finds.
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.
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. High leverage is a property of where the predictors sit, not a defect in the data, and an observation should never be removed for being influential — only for a reason about the observation itself. The conventional 2p/n cutoff is vacuous whenever the parameter count exceeds half the sample size, since it then exceeds the maximum possible leverage.

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 hat values for every observation with the 2p/n and 3p/n cutoffs.
  2. Printed the studentised residual beside each leverage, since the two screens disagree.
  3. Shipped a preset where the highest-leverage row supplies 69.63% of its own fitted value on a studentised residual of 1.2551.
  4. Added a preset where the conventional cutoff exceeds 1 and so cannot fire at all.
  5. Printed the sum of leverages against the parameter count, which trace(H) = p fixes exactly.

Add this calculator to your site

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