Home / Tools / ACF and PACF Calculator

ACF and PACF Calculator

A time series carries information about its own past, and the ACF and PACF are how you see it: one shows how strongly today relates to k days ago, the other shows how much of that link is direct rather than borrowed from the days in between. Paste a column of values, or time and value in two columns, and this calculator draws both correlograms with the significance bands, lists the number behind every lag, and reads the pattern for you: what suggests differencing, what suggests an AR or MA order, and where those classic rules stop being trustworthy.

I want to read the ACF and PACF of my series as it is

Your series

One value per line, oldest first. Two columns of time, value work too: the value column is picked up automatically, and a header row is skipped. A whole series pasted on one line, comma separated, is fine as well.

Try:

no data
Lags to show Blank uses R's default, floor(10 × log10(n)).
Band level Drawn at qnorm/√n, the way R draws it.
ACF how today relates to k steps ago
PACF the part of that link which is direct
How this is computed
The same thing in R

        
No data leaves your browser./ Verified against R's acf(), pacf(), diff() and Box.test(). /Free.

Reading a correlogram

Both plots answer the same underlying question, how much does the past tell you about the present, but they answer it differently, and the difference is the whole point of having two.

Suppose today depends on yesterday, and yesterday depended on the day before. Then today and the day before are correlated too, not because of any direct link but because both pass through yesterday. The ACF counts that borrowed correlation: at lag 2 it reports the full relationship, indirect paths included. The PACF strips the intermediate lags out and reports only what is left over, the direct link. That is why a pure AR(1) has an ACF that fades away over many lags while its PACF drops to nothing right after lag 1.

The classic Box-Jenkins rules fall out of that contrast:

What you seeWhat it suggestsThe catch
ACF decays slowly, stays high for many lags The series is not stationary. Difference it, then look again. This outranks any AR or MA reading. Order identification assumes stationarity, so anything you read off a trending series is meaningless.
PACF cuts off after lag p, ACF tails off AR(p) Only clean for a pure AR. Sampling noise alone puts about 5% of lags outside a 95% band, so a lone distant spike is usually a false alarm, not a term.
ACF cuts off after lag q, PACF tails off MA(q) Same caveat mirrored. And a near-cutoff, where lag q+1 sits just inside the band, is genuinely ambiguous.
Both tail off, neither cuts off Mixed ARMA(p,q) The rules cannot separate p from q here, and this is where most real series land. Shortlist a few orders and compare fitted models on AICc instead.
Spikes repeat every s lags A seasonal term of period s Needs a seasonal difference or a seasonal ARIMA term. A plain first difference will not remove it.
Nothing outside the band White noise: nothing left to model On residuals this is the goal. Confirm with a Ljung-Box test rather than by eye, since the band is per-lag, not family-wide.

What these plots cannot do

It is worth being blunt, because a lot of tutorials are not. The cutoff rules were built for a world of pure AR or pure MA processes, and they are decisive there. Real series are rarely pure. A mixed ARMA tails off in both plots, so the picture that is supposed to tell p from q simply does not, and no amount of squinting fixes it.

Three more limits worth carrying around. The band is a per-lag threshold: on 20 lags at 95%, one spike outside is the expected outcome for genuine white noise, not evidence. Estimates at high lags use only n - k pairs, so the far end of a correlogram is the noisiest part of it, exactly where people love to find patterns. And the plots describe linear dependence only: a series can have a flat ACF and still be perfectly predictable through a nonlinear relationship.

So use the correlogram for what it is genuinely good at. It tells you whether to difference, whether a season is present, whether anything is there at all, and which two or three orders are worth fitting. It does not pick your model. Fit the shortlist, compare on AICc, and check the residual ACF looks like noise. That last step is the one that actually validates the choice.

Common questions

What is the difference between ACF and PACF?

The ACF at lag k is the plain correlation between the series and itself shifted k steps. The PACF at lag k is what is left after the shorter lags in between have been regressed out. If today depends on yesterday and yesterday on the day before, then today and the day before are correlated at lag 2 through yesterday, and the ACF shows it. The PACF removes that borrowed correlation and shows only the direct link, which is why an AR(1) has a gradually decaying ACF but a PACF that cuts off sharply after lag 1.

Why does acf() include lag 0 but pacf() does not?

The autocorrelation at lag 0 is the correlation of the series with itself, unshifted, which is 1 by construction for any series with variation. R's acf() returns it, so the result has lag.max + 1 values and the plot opens with a spike at 1.0 carrying no information. A partial autocorrelation at lag 0 has nothing to partial out and is not defined, so pacf() returns lag.max values starting at lag 1. The practical consequence: the two vectors are different lengths, and aligning them by array index instead of by lag number silently puts the ACF one lag ahead of the PACF. The table on this page aligns by lag number and marks lag 0 explicitly. forecast::ggAcf() drops the lag-0 spike for the same reason.

What do the dashed lines on a correlogram mean?

They mark where a lag would fall if the series were white noise. R draws them at qnorm((1 + ci)/2)/sqrt(n), which is 1.959964/sqrt(n) at 95%; the familiar 1.96/sqrt(n) is that rounded. A spike outside is significant at that level. But it is a per-lag threshold, not a family-wide one, so roughly 5% of lags break it by chance even for real white noise: on 20 lags, expect about one false alarm. For a single verdict on the whole set, use the Ljung-Box p-value in the table.

How do I read the ARIMA order off the ACF and PACF?

Slow ACF decay means difference first. Once stationary, a PACF cutting off after lag p with an ACF tailing off suggests AR(p); an ACF cutting off after lag q with a PACF tailing off suggests MA(q); spikes repeating every s lags mean a seasonal term. The caveat is heavy enough to state plainly: these rules only resolve a pure AR or a pure MA. A mixed ARMA tails off in both plots and cannot be read by eye. Shortlist orders here, then fit and compare on AICc, and confirm the residual ACF is white noise.

Why does the significance band get wider after differencing?

The band is qnorm((1 + ci)/2)/sqrt(n), and n is the length of the series being plotted, not of what you pasted. A first difference costs one observation, a second costs two, a seasonal difference at lag 12 costs twelve. On 144 points a seasonal difference leaves 132, widening the 95% band from 0.163 to 0.171. Small there, but it matters on a short series, and it is a real reason not to difference more than the data needs.

How many lags should I look at?

R's default is floor(10 * log10(n)), capped at n - 1: 21 lags for 144 points, 14 for 30. That is a sensible starting point. Going further is mainly useful when you suspect a season and want to see the spike repeat at 2s and 3s. Going far out on a short series is a bad idea: each r_k is estimated from only n - k pairs, so the far end is noisiest exactly where you can least judge it.

My ACF is all NaN. What happened?

Your series is constant. Autocorrelation divides by the variance, and a flat series has none, so every lag is 0/0. R returns NaN there rather than a number, and this page refuses to display one too instead of quietly printing 0.

Go deeper