%3C/text%3E%3C/svg%3E">
💻
💻 Tech & IT

Durbin-Watson Statistic Calculator

Results update as you type.

Your numbers

Understanding the Durbin-Watson statistic calculator — concept and principle

The Durbin-Watson statistic d tests whether the residuals of a regression are correlated with the residual just before them (first-order autocorrelation). Use it after fitting a regression on data ordered in time, such as monthly sales or daily readings, because correlated errors make standard errors and p-values unreliable.

Durbin-Watson statistic from residual jumpsResiduals flip sign often; squared differences sum to 2.76 against 1.04 for squared residuals, so d = 2.65, on the negative-autocorrelation side.Do neighbouring residuals jump or stick?0.5−0.30.20.4−0.60.1−0.20.3jumps² sum2.76÷residuals² sum1.04positivenonenegative024d = 2.65
Residuals that keep flipping sign make big jumps, pushing d above 2 (lag-1 r ≈ −0.33).

How it is calculated

Enter the residuals (observed minus fitted values) in time order, separated by commas. At least three values are needed. d is unitless and lies between 0 and 4.

The principle

Expanding the numerator gives Σeₜ² + Σeₜ₋₁² − 2Σeₜeₜ₋₁. For a long series the first two sums are each about Σeₜ², so d ≈ 2 × (1 − r), where r is the lag-1 autocorrelation of the residuals. If neighbouring residuals are unrelated (r ≈ 0), d ≈ 2. If they tend to share a sign (r near +1), consecutive differences are small and d moves toward 0. If they alternate in sign (r near −1), differences are large and d moves toward 4. Durbin and Watson derived lower and upper critical bounds (dL, dU) that depend on the sample size and number of regressors.

Worked example

  1. Residuals: 0.5, −0.3, 0.2, 0.4, −0.6, 0.1, −0.2, 0.3 (n = 8).
  2. Differences squared: 0.64, 0.25, 0.04, 1.00, 0.49, 0.09, 0.25; sum = 2.76.
  3. Squares of residuals: 0.25, 0.09, 0.04, 0.16, 0.36, 0.01, 0.04, 0.09; sum = 1.04.
  4. d = 2.76 ÷ 1.04 ≈ 2.653846154.
  5. Lag-1 autocorrelation ≈ 1 − 2.653846 ÷ 2 ≈ −0.3269230769.

How to read the result

For a formal decision compare d with the tabulated dL and dU (for negative autocorrelation compare 4 − d). Between the bounds the test is inconclusive. With only 8 residuals, as here, the test has little power, so treat the value as a hint.

Common mistakes

Keep in mind: The test only checks lag-1 correlation and assumes a regression with an intercept. Seasonal or higher-order patterns need other checks, such as an ACF plot or the Ljung-Box test.

Frequently asked questions

Why is 1 − d/2 only approximate?

The end terms e₁² and eₙ² are counted once rather than twice, so the identity d = 2(1 − r) holds exactly only as n grows.

What do I do if autocorrelation is present?

Add missing time-related predictors or lags, model the errors (for example with an AR term), or use autocorrelation-robust (Newey-West) standard errors.

Sources: J. Durbin and G. S. Watson, "Testing for Serial Correlation in Least Squares Regression I and II", Biometrika 37 (1950) and 38 (1951) · J. M. Wooldridge, Introductory Econometrics: A Modern Approach, Cengage, Chapter 12

Checked 8 Nov 2026. Standard formulas and RFC/IEEE definitions, computed locally in your browser — nothing you type is sent anywhere.

💻 All tech & IT tools →🌍 Calculators by country →