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

Autocorrelation (ACF) Calculator

Results update as you type.

Your numbers

Understanding the autocorrelation (ACF) calculator — concept and principle

The autocorrelation function (ACF) measures how strongly a time series is correlated with a shifted copy of itself. The value at lag k answers: if this period is above average, how likely is the period k steps later to be above average too? Analysts use it to detect trends, seasonality and leftover structure in model residuals.

Autocorrelation at lags 1 to 4Comparing the series with copies shifted by 1 to 4 steps gives 0.487, 0.425, 0.160 and −0.159, all inside the ±0.62 bound.Slide the series against itselfxₜxₜ₊₁576898101110127689810111012mean 8.6 · lag 1: 21.64 ÷ 44.4 = 0.487+0.62−0.620.487lag 10.425lag 20.160lag 3−0.159lag 4all inside the 95% band 1.96 ÷ √10
Neighbouring values move together at lag 1, but with only 10 points no lag clears the ±0.62 bound.

How it is calculated

The calculator reports lags 1 to the "max lag" you choose. rₖ is unitless and lies between −1 and 1.

The principle

The ACF is a correlation coefficient computed between the series and its lagged self. Using the full-series variance in the denominator is the standard Box-Jenkins estimator; it slightly shrinks values at large lags. If the series were pure white noise, each rₖ would be approximately normal with mean 0 and standard deviation 1/√n, so values outside ±1.96/√n are unusual at the 5% level. A slowly decaying ACF suggests a trend; peaks at lags 12 or 4 suggest monthly or quarterly seasonality.

Worked example

  1. Series: 5, 7, 6, 8, 9, 8, 10, 11, 10, 12 (n = 10), max lag 4.
  2. Mean x̄ = 86 ÷ 10 = 8.6. Deviations: −3.6, −1.6, −2.6, −0.6, 0.4, −0.6, 1.4, 2.4, 1.4, 3.4.
  3. Denominator: sum of squared deviations = 44.4.
  4. Lag-products sums: lag 1 = 21.64, lag 2 = 18.88, lag 3 = 7.12, lag 4 = −7.04.
  5. ACF: lag 1: 0.4874 · lag 2: 0.4252 · lag 3: 0.1604 · lag 4: −0.1586.
  6. Bound: 1.96 ÷ √10 ≈ 0.6198064214.

How to read the result

Here no lag exceeds ±0.62, so with only 10 points none is individually significant, even though the series clearly rises. That illustrates how wide the bound is for short series. For a series with a trend, the ACF typically starts high and decays slowly; differencing (taking xₜ − xₜ₋₁) usually removes this. For model residuals, you want all lags inside the bound.

Common mistakes

Keep in mind: The ±1.96/√n bound assumes white noise and a reasonably long series. For short samples or for residuals of a fitted model it is only approximate; use a joint test such as Ljung-Box for an overall check.

Frequently asked questions

Why do software packages give slightly different ACF values?

Some divide each lag's sum by n − k instead of using the full-series formula, or use a different bound such as Bartlett's formula.

What is the difference between ACF and PACF?

The PACF at lag k is the correlation that remains after removing the influence of lags 1 to k − 1; it is used to choose the order of AR models.

Sources: G. E. P. Box, G. M. Jenkins, G. C. Reinsel and G. M. Ljung, Time Series Analysis: Forecasting and Control, 5th ed., Wiley, 2015 · R. J. Hyndman and G. Athanasopoulos, Forecasting: Principles and Practice, 3rd ed., OTexts, 2021, Section 2.8

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 →