Autocorrelation Calculator

Enter your time series data as a sequence of values and select a lag to compute the autocorrelation coefficient for that delay. The Autocorrelation Calculator applies the Pearson correlation formula between your original series and its lagged copy, returning the autocorrelation coefficient, sample mean, and standard deviation — plus a bar chart of autocorrelations across multiple lags so you can spot repeating patterns or seasonality.

Enter numeric values in time order, separated by commas, spaces, or new lines.

The calculator will compute autocorrelation for all lags from 1 up to this value.

The specific lag period for the primary autocorrelation coefficient shown above.

Results

Autocorrelation Coefficient (at selected lag)

--

Interpretation

--

Series Mean

--

Series Std Deviation

--

Number of Observations

--

Autocorrelation Function (ACF) by Lag

Results Table

Frequently Asked Questions

What is autocorrelation?

Autocorrelation, also known as serial correlation, measures the correlation of a time series with a delayed (lagged) copy of itself. It quantifies how similar observations are to each other as a function of the time gap between them. A high positive autocorrelation at lag 1 means consecutive values tend to move in the same direction.

How is the autocorrelation coefficient calculated?

The autocorrelation coefficient at lag k is computed using the Pearson correlation formula between the original series and the same series shifted by k time periods. Values range from -1 to +1, where +1 is perfect positive correlation, -1 is perfect negative correlation, and 0 indicates no linear relationship.

What does a positive vs. negative autocorrelation mean?

A positive autocorrelation means that high values tend to be followed by high values and low values by low values — the series has momentum or persistence. A negative autocorrelation means high values tend to be followed by low values, indicating mean-reverting or alternating behavior.

What is a lag in the context of autocorrelation?

A lag is the number of time periods by which the series is shifted before computing the correlation with itself. Lag 1 compares each observation with the immediately preceding one; lag 2 compares each observation with the one two periods earlier, and so on.

How many data points do I need for reliable autocorrelation?

As a general rule, you should have at least 30–50 observations for meaningful autocorrelation estimates. For a lag of k, only n−k pairs are available, so analysis with large lags on short series becomes unreliable. Keep your maximum lag below roughly n/4 for stable results.

What is the Autocorrelation Function (ACF)?

The ACF is the collection of autocorrelation coefficients computed at multiple lag values (lag 1, 2, 3, …). Plotting the ACF as a bar chart helps visually identify patterns — a slowly decaying ACF suggests a trend or non-stationarity, while sharp cut-offs or periodic spikes can indicate seasonality or an MA process.

What is the difference between autocorrelation and partial autocorrelation (PACF)?

Autocorrelation at lag k captures the total linear relationship between a series and its k-period lag, including indirect effects through intermediate lags. Partial autocorrelation (PACF) measures only the direct relationship at lag k after removing the contributions of shorter lags. Both are used together when fitting ARIMA models.

Can autocorrelation be used to detect seasonality?

Yes. If a time series has seasonality with period s (e.g. monthly data with annual seasonality at s=12), the ACF will show pronounced spikes at lags that are multiples of s. Identifying these spikes is one of the primary uses of autocorrelation analysis in time series decomposition.

More Statistics Tools