Autocorrelation Calculator

Paste a numeric series and a lag to compute its autocorrelation.

How it is calculated

The tool reads the series (numbers separated by commas, spaces or semicolons), finds the mean x̄, and computes rk = Σ (xt − x̄)(xt−k − x̄) ÷ Σ (xt − x̄)². The numerator sums over the pairs where both values exist (t = k+1 … n); the denominator sums over all n points. Because the denominator always uses the full series, the value is the usual biased sample estimator and shrinks as the lag grows.

The lag must be a whole number from 1 to n−1; a blank lag defaults to 1. A decimal lag, a lag of 0 or one that is too large gives no result. So does a series with fewer than two values, a constant series (zero variance), or any entry that is not a number: nothing is silently dropped.

Worked example

Series 3, 5, 4, 6, 5, 7, 6, 8 with lag 2. Mean = 44 ÷ 8 = 5.5. Deviations: −2.5, −0.5, −1.5, 0.5, −0.5, 1.5, 0.5, 2.5. Denominator = 6.25 + 0.25 + 2.25 + 0.25 + 0.25 + 2.25 + 0.25 + 6.25 = 18. Numerator, pairing each value with the one two steps earlier: 3.75 − 0.25 + 0.75 + 0.75 − 0.25 + 3.75 = 8.5. Autocorrelation = 8.5 ÷ 18 = 0.4722.

Try this example →

Common mistakes

  • Writing decimals with a comma (2,5) inside the series. The comma is a separator there, so 2,5 is read as the two numbers 2 and 5. Use a point for decimals.
  • Leaving a typo such as “abc” in the list. The whole input is rejected and no result appears, so look for the stray token instead of assuming the lag is wrong.
  • Expecting a steadily rising series to give a value near 1. With the biased denominator, six evenly rising values give only 0.5 at lag 1, and short series always look weaker at long lags.
  • Using a lag equal to or larger than the number of values, a decimal lag, or a lag of 0. None of these gives a result, because there are no pairs left or the lag is not a whole step.
  • Reading a high value on a trending series as a repeating cycle. A trend alone produces high autocorrelation, so remove the trend first if you are looking for seasonality.

About this calculator

Autocorrelation measures how correlated a time series is with a delayed copy of itself, at a chosen lag k — computed as the covariance between the series and its k-step-shifted version, normalized by the series' own variance. A high autocorrelation at lag 1 means consecutive values tend to move together (momentum), while a strong autocorrelation at a longer lag can reveal seasonality or a repeating cycle in the data.

This calculator takes a numeric series and a lag value, then computes the sample autocorrelation at that lag. Data scientists and econometricians identifying ARIMA model orders through the Box-Jenkins method, signal processing engineers checking for periodicity, and analysts screening time series for hidden patterns use it as a fundamental diagnostic step before building any forecasting model, since it reveals the dependence structure the model needs to capture.

Was this helpful?

You can pick up to 3 reactions.

Be the first to comment.

Popular calculators

All Calculators