Home / Tools / Stationarity Test Calculator

Stationarity Test Calculator

ARIMA and most time-series models assume your series is stationary: its mean, variance and autocorrelation do not drift over time. Paste a single column of numbers and this tool runs the ADF, KPSS and Phillips-Perron tests, gives one clear verdict, tells you how many times to difference the series, and draws its ACF and PACF. Everything runs in your browser.

Your time series
n = 0
Load an example:
Significance KPSS null PP stat Lag
-

Paste a series to begin

Series
ACF (autocorrelation)
PACF (partial autocorrelation)
ADF
-
KPSS
-
Phillips-Perron
-
Differencing
-
Length
-
observations

How this is computed
1
2
3
4
5
The same tests in R

  

No data leaves your browser Verified against R's adf.test(), kpss.test() and pp.test() Free, no sign-up

Reading ADF and KPSS together

One test is not enough: ADF and KPSS test opposite null hypotheses, so combining their verdicts tells you not just whether the series is stationary but why it is not.

ADF rejects, KPSS does not

The unit-root null is rejected and stationarity is not. The series is stationary as it is.

fit with d = 0
ADF does not reject, KPSS rejects

Evidence of a unit root and against stationarity. The series is non-stationary.

difference it (d = 1)
Both reject

Rejecting a unit root but also rejecting level stationarity usually means a deterministic trend. The series is trend-stationary.

detrend, or difference
Neither rejects

The tests disagree and neither is decisive, often with a short or noisy series. Treat the result as inconclusive.

get more data, inspect the plots

ADF, KPSS and Phillips-Perron: which does what

TestNull hypothesis (H0)A small p-value meansR function
Augmented Dickey-FullerThe series has a unit root (non-stationary)Reject H0, evidence of stationaritytseries::adf.test
Phillips-PerronThe series has a unit root (non-stationary)Reject H0, evidence of stationaritytseries::pp.test
KPSSThe series is stationaryReject H0, evidence of non-stationaritytseries::kpss.test

ADF absorbs autocorrelation by adding lagged differences to the regression; Phillips-Perron leaves the regression short and corrects the statistic with a Bartlett long-run variance instead. KPSS comes at the question from the other side, testing stationarity directly. This tool reports all three so a single borderline p-value never decides the outcome on its own.

From stationarity to an ARIMA order

Once you know the series is stationary (or how many differences d it takes to get there), the ACF and PACF suggest the autoregressive and moving-average orders: a PACF that cuts off after lag p and a decaying ACF point to AR(p); the mirror image points to MA(q). The plots above show both with the 1.96/√n significance bounds.

Why this tool does not rank ARIMA models by AICc. Choosing between candidate ARIMA(p,d,q) models means fitting each one by maximum-likelihood optimisation, an iterative search that is not bit-for-bit reproducible outside R's own arima(). Rather than print AICc numbers that would not match R, this calculator gives you the pieces auto.arima() decides from, the differencing order d and the ACF/PACF signals, and emits the auto.arima() call to run for the final fit.

Seasonal series? The seasonal differencing order (capital D) comes from a separate seasonal unit-root test rather than KPSS. Declare the period with ts(y, frequency = m) and let nsdiffs() and auto.arima() pick D for you; the ADF, KPSS and PP verdicts above still describe the non-seasonal behaviour.

Frequently asked questions

How do I test if a time series is stationary?

Run a unit-root test. ADF (and Phillips-Perron) start from a null of a unit root, so a small p-value rejects non-stationarity. KPSS starts from a null of stationarity, so a small p-value rejects it. This calculator runs all three and combines them into a single verdict, which is more reliable than trusting any one test near its threshold.

What is the difference between the ADF and KPSS tests?

They test opposite hypotheses. Because ADF rejecting means stationary while KPSS rejecting means non-stationary, the informative cases are when they agree (a clear verdict) or when ADF rejects and KPSS also rejects (a deterministic trend). Looking at the pair is the standard way to avoid a misleading single result.

How many times should I difference the series?

Use the smallest d that removes the unit root. This tool reports d the way forecast::ndiffs does: it differences the series and re-runs the KPSS test until it stops rejecting, capped at two. In practice d is almost always 0, 1 or 2.

What is the Phillips-Perron test?

It is a unit-root test in the ADF family, but it corrects for autocorrelation and heteroskedasticity non-parametrically (through a Bartlett long-run variance) instead of adding lagged difference terms. The tool offers both the Z(t) and Z(alpha) variants that tseries::pp.test computes.

Does this calculator match R?

Yes. Every statistic and p-value, the differencing order and the ACF and PACF values are verified against tseries::adf.test, tseries::kpss.test, tseries::pp.test, forecast::ndiffs and stats::acf/pacf to better than six decimal places across stationary, random-walk, trend, seasonal and short-series cases.

How many times should I difference a series for ARIMA?

Use the smallest number of differences that makes the series stationary. This calculator reports that value (d) the same way forecast::ndiffs does: it differences the series and re-runs the KPSS test until it stops rejecting, up to a maximum of two. Most series need d = 0 or d = 1.

Go deeper