Math calculator

KPSS Test Calculator

The opposite null.

The opposite null

A hundred and twenty steps of a random walk. KPSS gives 1.5371 against a 5% critical value of 0.463 and rejects stationarity decisively — the partial sums of the deviations grow without bound, which is exactly what the statistic measures. The Dickey-Fuller test on the same series gives −1.3475 against −2.8859 and does not reject the unit root. Both tests agree, and this is the comfortable case: difference the series before doing anything else with it.

120 observations · level stationarity · 4 Bartlett lags

Statistic 1.5371 against a 5% critical value of 0.463 — stationarity is rejected

Both tests agree the other way: the unit root stands and stationarity is rejected.

KPSS statistic

1.5371

5% cutoff 0.463

Dickey-Fuller

-1.3475

5% cutoff -2.8859

Combined verdict

unit root

from both nulls together

Long-run variance

141.7137

Bartlett kernel, 4 lags

The four possible outcomes

What each combination of the two tests means
Dickey-FullerKPSSReading
rejectsdoes not rejectstationary. Both agree: shocks die out.
does not rejectrejectsunit root — this series. Both agree: shocks persist. Difference the series.
does not rejectdoes not rejectuninformative. Neither null falls — the series is too short or too noisy to tell.
rejectsrejectsconflicting. Both nulls fall — suspect a break, fractional integration, or the wrong deterministic term.

The third row is the one a single test cannot produce. Running Dickey-Fuller alone and not rejecting looks identical whether the series has a unit root or the data simply cannot tell.

Critical values

KPSS critical values at three levels for the chosen null
LevelCritical valueRejected
1%0.739yes
5%0.463yes
10%0.347yes

The rejection region is the upper tail here, the opposite of Dickey-Fuller. And unlike Dickey-Fuller these values are fixed asymptotic constants rather than a function of the sample size, which is itself worth knowing: at short samples the test is conservative and rejects less often than its nominal rate.

The statistic is the scaled sum of squared partial sums of the residuals, divided by a long-run variance estimated with a Bartlett kernel. That lag choice matters: too few lags and serial correlation inflates the statistic, too many and it is smoothed away. The default here is the usual 4(n/100)^(1/4) rule.

A level shift makes this test reject stationarity on a series that is stationary within each segment, in the same way a break makes Dickey-Fuller fail to reject. The two tests do not cover for each other there — they fail together and in a way that looks like agreement.

Stationarity as the null Dickey-Fuller alongside All four outcomes named Shares the break blind spot

What this tool shows

On the third preset neither test rejects: Dickey-Fuller gives −1.7135 against −2.9303 and KPSS gives 0.4539 against 0.463. Forty-five observations of a persistent series simply cannot separate a unit root from stationarity, and that is the honest conclusion. A Dickey-Fuller test run alone would have reported a non-rejection, which reads as a unit root and is not one. KPSS reverses the null, so running both turns two outcomes into four — including “the data cannot tell”.

  • The KPSS statistic with its fixed asymptotic critical values, for level and trend stationarity
  • Dickey-Fuller on the same series, since the two nulls are opposite
  • All four combinations of the two verdicts, with the current one marked
  • The long-run variance estimate and the Bartlett lag length behind it
  • A preset where neither test rejects, and one where both are wrong together
  • Why a level shift defeats both tests in a way that looks like agreement
Stationarity as the null Dickey-Fuller alongside All four outcomes Shares the break blind spot

Two tests agreeing means nothing if they share a blind spot.

Updated 13 September 2026 · Works in any browser, no installation

KPSS tests the null that a series is stationary, which is the reverse of Dickey-Fuller. It accumulates the partial sums of the deviations from a fitted mean or trend: under stationarity those sums stay bounded, and under a unit root they wander without limit. Because the two tests put the burden of proof on opposite hypotheses, running both is the only way to distinguish a genuine finding from a series that is too short to be informative.

At a glance

Formula shown
Fit a mean (level) or a straight line (trend), take the residuals eₜ, and form Sₜ = Σᵢ≤ₜ eᵢ. The statistic is ΣSₜ² / (n²·σ̂²ₗᵣ), where σ̂²ₗᵣ is a long-run variance estimated with a Bartlett kernel. Large values reject stationarity — the rejection region is the upper tail, the opposite of Dickey-Fuller. The 5% critical values are fixed constants: 0.463 for level and 0.146 for trend.
Scenario support
Confirming a Dickey-Fuller result rather than relying on a single non-rejection, deciding whether a series needs differencing, checking whether a short series is informative at all, and testing residuals from a regression for a spurious-relationship problem.
Educational estimate
Planning support from the values you enter — not professional advice.

Two tests, four outcomes

A single test gives a rejection or a non-rejection. Two tests with opposite nulls give a grid, and two of its four cells are informative in a way neither test alone can be.

ADF rejects and KPSS does not: stationary. Both tests agree, and the second preset shows it — −4.2609 and 0.1141.

ADF does not reject and KPSS does: a unit root. The first preset, at −1.3475 and 1.5371.

Neither rejects: the data cannot tell. The third preset, at −1.7135 and 0.4539. Usually a short series or a very persistent one.

Both reject: something neither models. A structural break, fractional integration, or a mis-specified deterministic term. Rare, and always worth investigating rather than averaging.

Why a non-rejection is not a finding

The whole reason this test exists is a logical asymmetry that gets forgotten the moment a p-value appears.

Failing to reject a null is not evidence for it. It means the data did not contradict it, which a small sample guarantees whatever the truth is.

Dickey-Fuller puts the unit root in the null, so a non-rejection there is routinely reported as “the series has a unit root”. It is not.

KPSS puts stationarity in the null instead, so its non-rejection has the mirror problem — and the two mirror problems do not overlap.

Which makes the pair informative where neither alone is. Two nulls, two chances to find contradiction, and an explicit cell for the case where neither is contradicted.

Both tests share one blind spot

The fourth preset is the case that should temper any confidence taken from agreement between the two.

A hundred and forty observations, stationary within each half, with one level shift at the midpoint. Strongly mean-reverting throughout.

KPSS gives 2.3430 and rejects stationarity. Dickey-Fuller gives −0.9540 and the unit root stands. Both point at a unit root.

There is not one. The identical noise with the shift removed gives a Dickey-Fuller statistic of −4.7202 — decisively stationary.

The shift looks like persistence to both tests, because neither models a break. Agreement between two tests with a shared blind spot is not corroboration, and plotting the series is the only defence.

The lag length is a real choice

The statistic divides by a long-run variance, and estimating that requires a bandwidth that moves the answer.

Too few lags and residual serial correlation inflates the statistic, so stationarity is rejected too often.

Too many and the variance estimate absorbs the signal, so the statistic shrinks and the test loses power.

The default here is the usual 4(n/100)^(1/4) rule, which gives 4 lags at a hundred observations and 5 at two hundred and fifty.

It is a convention, not a derivation, and a KPSS result that only holds at one bandwidth deserves the same scepticism as a Dickey-Fuller result that only holds at one lag order.

It is conservative at short samples

The critical values here are fixed asymptotic constants, unlike the Dickey-Fuller surface which corrects for sample size, and that has a consequence.

At a hundred observations the test rejects less often than its nominal rate. Measured across 150 generated white-noise series, it rejects stationarity well under five per cent of the time.

So a non-rejection at a short sample is weak, and doubly so given it is a non-rejection to begin with.

The direction is at least safe: a KPSS rejection on a short series is stronger evidence than the nominal level suggests, not weaker.

The pairing with Dickey-Fuller absorbs some of this, which is another argument for reading the two together rather than separately.

The regression this test exists to prevent

Stationarity testing is not a formality. Regressing one unit-root series on another produces significant results from nothing at all.

Two independent random walks regressed on each other give a significant slope most of the time. The t statistic diverges with the sample size rather than settling down.

R² can be high and the residuals will be non-stationary, which is the tell — and running a Durbin-Watson test on those residuals will show it.

The remedy is to difference, or to test for cointegration if there is reason to think the two series share a long-run relationship.

Which is why the differencing decision comes before the model, not after it disappoints — and why an ARIMA model makes the differencing order an explicit parameter rather than a preprocessing step.

Reporting a stationarity conclusion

Four items, and the first is the one that turns two p-values into an actual conclusion.

Report both tests, not one. Which of the four cells you are in is the finding, and one test cannot locate it.

Give the specification for both. Level or trend for KPSS, and the deterministic terms for Dickey-Fuller — they have to match or the pair is incoherent.

Give the bandwidth and the lag order. Both are conventions and both move the statistic.

And say whether you looked for a break. The two tests agree on a unit root when there is a level shift and no unit root, which is the one situation where agreement is worth least.

Sources and methodology

References for the test and the pairing.

Method. The statistic is the scaled sum of squared partial sums of the residuals from a fitted mean or trend, divided by a long-run variance estimated with a Bartlett kernel at the conventional 4(n/100)^(1/4) bandwidth, which the page reports rather than hides. Critical values are the fixed asymptotic constants from the 1992 paper: 0.739, 0.463 and 0.347 for level stationarity and 0.216, 0.146 and 0.119 for trend. Dickey-Fuller is computed on every input so the four-way verdict can be reported, since the whole argument for this test is that a single null cannot distinguish a finding from an uninformative sample. The verification suite checks the two tests against each other at both extremes across 150 generated series: KPSS must reject stationarity on a random walk most of the time and hold its size on white noise, while Dickey-Fuller must do the reverse. It also asserts that the statistic is never negative and its long-run variance always positive, on 80 further series. That engine is verified on every change against 115 assertions. The count and the per-case breakdown are published on the formula verification page.

Related calculators

Where this goes next:

Augmented Dickey-FullerThe unit root test with MacKinnon critical values, the statistic at every lag order, the ordinary t cutoff shown for contrast, and KPSS computed alongside.
ARIMAARIMA(p, d, q) with coefficients and standard errors, residual Ljung-Box, a Dickey-Fuller result on the raw series, and over-differencing detected and named.
Durbin-WatsonThe Durbin-Watson statistic with dL and dU computed by Imhof inversion rather than tabled, so the bounds exist at any n and k.
AutocorrelationACF and PACF at every lag with Bartlett bands that widen rather than a flat line, plus the shapes that identify a model.
Seasonal DecompositionTrend, seasonal indices and remainder, additive or multiplicative, with the index sum printed against the value it must take and both models compared on the same data.
Ljung-Box TestThe Ljung-Box portmanteau test with Box-Pierce beside it, the degrees-of-freedom correction for fitted models and a lag-by-lag table.

More in Math, or browse all calculators.

Educational use disclaimer

An educational tool. KPSS critical values are fixed asymptotic constants, so at short samples the test is conservative and rejects less often than its nominal rate. A level shift makes this test reject stationarity and makes Dickey-Fuller fail to reject a unit root on the same stationary series — the two fail together in a way that resembles agreement, and only plotting the series catches it.

How we calculate · Found an error? email us

Authorship & verification

Written and maintained by , a business operator who builds spreadsheet-based calculators.

What's changed (5 updates)

Published 13 September 2026

  1. Published the stationarity-null test with its fixed asymptotic critical values.
  2. Named all four combinations of the KPSS and Dickey-Fuller verdicts.
  3. Shipped a preset where neither test rejects, which one test cannot report.
  4. Added a preset where a level shift makes both tests wrong together.
  5. Reported the long-run variance and the Bartlett lag length behind it.

Add this calculator to your site

Responsive embed — and private: nothing your visitors type leaves their browser.