📈 KPSS Test Calculator
Free online KPSS stationarity test — Kwiatkowski-Phillips-Schmidt-Shin test for time series analysis. Get KPSS statistic, p-value, critical values, and publication-ready charts instantly.
Comma-separated or one value per line. Values should be in time order.
Enter values manually in time order (row 1 = first observation):
| Time Point | Value |
|---|
🔢 Technical Notes & Formulas Used
KPSS Statistic: η = (1/T²) × Σₜ₌₁ᵀ Sₜ² / σ̂²_long
η = KPSS test statistic
T = number of observations
Sₜ = partial sum of residuals: Sₜ = Σᵢ₌₁ᵗ êᵢ
êᵢ = residuals from regression of Yₜ on 1 (level) or on 1 and t (trend)
σ̂²_long = long-run variance estimator (see below)
Long-Run Variance (Newey-West): σ̂²_long = γ₀ + 2 Σⱼ₌₁ˡ w(j,l) × γⱼ
γⱼ = sample autocovariance at lag j: γⱼ = (1/T) × Σₜ₌ⱼ₊₁ᵀ êₜ × êₜ₋ⱼ
w(j,l) = Bartlett kernel weight = 1 − j/(l+1)
l = bandwidth (lag truncation parameter)
Rectangular kernel: w(j,l) = 1 for j ≤ l
Newey-West Bandwidth: l = floor(3 × sqrt(T) / 13)
T = number of observations
floor() = round down to nearest integer
This is the default automatic bandwidth selector for the KPSS test
Level Regression: Yₜ = μ + εₜ (regression on constant only)
Residuals êₜ = Yₜ − Ȳ (deviations from mean)
Trend Regression: Yₜ = μ + βt + εₜ (regression on constant and time trend)
Residuals êₜ = Yₜ − μ̂ − β̂t (deviations from fitted trend line)
OLS estimates μ̂ and β̂ are computed before the test statistic
PACF at lag k: φₖₖ = Corr(Yₜ, Yₜ₋ₖ | Yₜ₋₁, ..., Yₜ₋ₖ₊₁)
Significance bound: ±1.96/√T at 5% level
Critical Values (asymptotic, from Kwiatkowski et al. 1992):
Level (mu): α=0.10 → 0.347; α=0.05 → 0.463; α=0.01 → 0.739
Trend (tau): α=0.10 → 0.119; α=0.05 → 0.146; α=0.01 → 0.216
P-values are interpolated from tabled critical values.
📖 How to Use This KPSS Test Calculator — Step-by-Step Guide
Enter Your Time Series Data
Paste your values in the text box, separated by commas or line breaks (e.g., 52, 48, 55, 61, 47 …). Values must be in time order — earliest first. You can also upload a CSV/Excel file or type values manually. Try the built-in sample datasets to explore the tool before using your own data.
Select Hypothesis Type
Choose Level Stationarity (mu) if you expect your series to fluctuate around a constant mean. Choose Trend Stationarity (tau) if your series has a clear upward or downward slope. For most economic data, start with Level; add Trend if a visual inspection shows drift.
Set Significance Level and Bandwidth
The default α = 0.05 is standard for most research. The Auto bandwidth uses the Newey-West rule (l = floor(3√T/13)), which is the accepted default in most software. For long datasets (n > 100), you may want to try a larger manual bandwidth.
Run the Analysis
Click ▶ Run KPSS Stationarity Test. The tool computes the KPSS η statistic, long-run variance, compares against asymptotic critical values, and generates four diagnostic plots — all instantly in your browser.
Read the Summary Cards
The six cards display: KPSS Statistic, p-value, Critical Value (at chosen α), Bandwidth, Sample Size (n), and Stationary Decision. Green cards indicate "Fail to Reject" (stationarity supported); amber/red cards indicate "Reject" (non-stationarity detected).
Interpret the Full Results Table
The results table shows the KPSS statistic alongside critical values at 10%, 5%, and 1% significance levels. Compare your statistic to all three thresholds — this tells you at which significance level your conclusion changes. A statistic below all three critical values strongly supports stationarity.
Examine the Four Visualizations
Plot 1 (Time Series) shows the raw data with the fitted mean or trend line. Plot 2 (KPSS vs Critical Values) shows your statistic as a bar against the three reference lines — a quick visual decision rule. Plot 3 (CUSUM) shows the partial sum process; explosive growth suggests non-stationarity. Plot 4 (PACF) reveals autocorrelation structure remaining in the residuals.
Check Assumptions
Review the assumption check panel. Key requirements: data must be in time order, values must be numeric, and the series should not contain structural breaks. If a break is suspected, consider sub-period testing or the KPSS-with-breaks extension (Carrion-i-Silvestre et al., 2005).
Read the Detailed Interpretation
The Interpretation section provides five paragraphs explaining what the result means in plain language — covering the p-value, effect magnitude, practical significance, bandwidth choice, and limitations. These paragraphs update automatically for every run.
Export Results
Download Doc saves a plain-text report with all statistics for your records. Download PDF opens the browser print dialog — select "Save as PDF" for a clean A4 report. Copy Summary copies the key result sentence to clipboard for quick pasting into papers or slides.
🎯 When to Use the KPSS Test
The KPSS test is a free online hypothesis test designed to determine whether a time series is stationary. Unlike the ADF test, KPSS assumes stationarity under the null hypothesis. This makes it complementary to ADF — use them together for a robust stationarity assessment in any quantitative research workflow.
✅ Use the KPSS test when:
🌍 Real-World Examples
1. Ecology / Wildlife Research: A wildlife biologist testing whether monthly tiger sighting counts in the Nilgiris are stationary before fitting a Poisson time-series model. KPSS confirms the count series fluctuates around a stable mean rather than drifting upward.
2. Economics / Finance: An analyst testing whether monthly consumer price index (CPI) returns are stationary before estimating a GARCH volatility model. KPSS (level) fails to reject stationarity for returns even when ADF rejects a unit root in price levels.
3. Hydrology: A river scientist testing whether annual streamflow in a catchment is trend-stationary or has a stochastic trend. KPSS (trend) rejection indicates the flow series may be driven by a stochastic trend (e.g., climate change signal).
4. Public Health: An epidemiologist checking whether weekly dengue fever case counts are stationary before applying a Prophet or ARIMA model for outbreak forecasting. KPSS confirms whether differencing is required before modeling.
🔀 Decision Guide: ADF + KPSS Combined
ADF Fails to Reject + KPSS Fails to Reject → Strong evidence for stationarity
ADF Rejects + KPSS Fails to Reject → Stationary (consistent)
ADF Fails to Reject + KPSS Rejects → Non-stationary (consistent)
ADF Rejects + KPSS Rejects → Ambiguous — possible structural break or fractional integration. Investigate further.
❓ Frequently Asked Questions
Q1. What is the KPSS test and when should I use it?
The KPSS (Kwiatkowski-Phillips-Schmidt-Shin) test is a statistical test that checks whether a time series is stationary. Its null hypothesis is stationarity — the opposite of the ADF test. Use it when you want to confirm your series is stable over time or when ADF results are unclear. It is widely used in econometrics, ecology, hydrology, and climate research before fitting time-series models like ARIMA or VAR.
Q2. What is the null hypothesis of the KPSS test?
The null hypothesis is that the time series is stationary (either level-stationary or trend-stationary, depending on your choice). If the KPSS statistic is larger than the critical value at your chosen significance level, you reject the null and conclude the series is non-stationary. If the statistic is below the critical value, you fail to reject the null — meaning the data are consistent with stationarity.
Q3. What is the difference between KPSS and ADF tests?
The ADF (Augmented Dickey-Fuller) test has a null hypothesis of non-stationarity (unit root), while the KPSS test has a null of stationarity. Both tests are complementary. Using both reduces the risk of a wrong conclusion. If ADF fails to reject its null (evidence of a unit root) AND KPSS rejects its null (evidence against stationarity), the series is likely non-stationary. If both tests fail to reject their respective nulls, stationarity is strongly supported.
Q4. How do I interpret the KPSS statistic?
The KPSS statistic (η) measures how much the partial sum of residuals grows relative to the long-run variance. A large η means the cumulative sums grow a lot — evidence of non-stationarity. Compare η to the critical values at 10%, 5%, and 1% significance. If η exceeds the critical value at your chosen α, reject the null of stationarity. If η is below the critical value, the series is consistent with stationarity.
Q5. What is the difference between level and trend stationarity?
Level stationarity (mu) tests whether the series fluctuates around a fixed constant mean. Trend stationarity (tau) tests whether the series fluctuates around a deterministic linear trend. If your data shows a clear upward or downward slope over time, choose "trend." If it appears to bounce around a flat mean, choose "level." Choosing incorrectly can lead to misleading results — always inspect your time series plot first.
Q6. How is bandwidth (lag) chosen in the KPSS test?
Bandwidth controls how many lagged autocovariances are used to estimate long-run variance. The most widely used rule is the Newey-West formula: l = floor(3 × √T / 13), where T is your sample size. This tool uses that rule by default when "Auto" is selected. Larger bandwidths are more robust to long-range dependence but increase variance in the long-run variance estimate. A too-small bandwidth can lead to under-rejection (falsely supporting stationarity).
Q7. What does it mean if both ADF and KPSS reject their nulls?
This is called a "contradictory result." It can happen when the series has structural breaks (a sudden shift in level or trend), when the series is fractionally integrated (between I(0) and I(1)), or when sample size is small and both tests have low power. In this case, inspect your series visually for structural breaks, consider a KPSS test with structural breaks (e.g., using the breakpoint test), or consult a time-series specialist.
Q8. Can I use the KPSS test on seasonal data?
The standard KPSS test does not account for seasonality. If your data shows seasonal patterns (e.g., monthly temperature peaks each summer), you should deseasonalise the data first (using seasonal decomposition or differencing) before running the KPSS test. Failing to remove seasonality may cause the test to incorrectly reject stationarity because seasonal variation looks like a stochastic trend.
Q9. What sample size do I need for the KPSS test?
The KPSS test uses asymptotic critical values, which are only accurate for large samples. A minimum of 20–30 observations is recommended for reliable results. For very small samples (n < 15), the critical values may not apply well, and results should be treated with caution. For large samples (n > 100), consider using a larger bandwidth to capture more long-range dependence in the long-run variance estimator.
Q10. How do I report KPSS test results in APA format?
Report the hypothesis type, KPSS statistic with bandwidth in parentheses, and your conclusion. Example: "A KPSS test for level stationarity indicated that the monthly temperature anomaly series was stationary, η(l = 3) = 0.312, p > .05." Always state the bandwidth used, the hypothesis type (level or trend), the significance level, and whether the null was rejected. Include this detail in your Methods section so readers can replicate the analysis.
📚 References
The following references support the statistical methods used in this KPSS test calculator tool, covering stationarity testing, p-value interpretation, hypothesis testing in time series, and best practices for quantitative analysis.
- Kwiatkowski, D., Phillips, P. C. B., Schmidt, P., & Shin, Y. (1992). Testing the null hypothesis of stationarity against the alternative of a unit root: How sure are we that economic time series have a unit root? Journal of Econometrics, 54(1–3), 159–178. https://doi.org/10.1016/0304-4076(92)90104-Y
- Dickey, D. A., & Fuller, W. A. (1979). Distribution of the estimators for autoregressive time series with a unit root. Journal of the American Statistical Association, 74(366), 427–431. https://doi.org/10.1080/01621459.1979.10482531
- Newey, W. K., & West, K. D. (1987). A simple, positive semi-definite, heteroscedasticity and autocorrelation consistent covariance matrix. Econometrica, 55(3), 703–708. https://doi.org/10.2307/1913610
- Hamilton, J. D. (1994). Time series analysis. Princeton University Press.
- Enders, W. (2014). Applied econometric time series (4th ed.). Wiley.
- Hobijn, B., Franses, P. H., & Ooms, M. (2004). Generalizations of the KPSS-test for stationarity. Statistica Neerlandica, 58(4), 483–502. https://doi.org/10.1111/j.1467-9574.2004.00272.x
- Carrion-i-Silvestre, J. L., Barrio-Castro, T., & Lopez-Bazo, E. (2005). Breaking the panels: An application to the GDP per capita. Econometrics Journal, 8(2), 159–175. https://doi.org/10.1111/j.1368-423X.2005.00158.x
- Zivot, E., & Andrews, D. W. K. (1992). Further evidence on the great crash, the oil-price shock, and the unit-root hypothesis. Journal of Business & Economic Statistics, 10(3), 251–270. https://doi.org/10.1080/07350015.1992.10509904
- Box, G. E. P., Jenkins, G. M., Reinsel, G. C., & Ljung, G. M. (2015). Time series analysis: Forecasting and control (5th ed.). Wiley.
- Pfaff, B. (2008). Analysis of integrated and cointegrated time series with R. Springer-Verlag. https://doi.org/10.1007/978-0-387-75967-8
- Tsay, R. S. (2014). An introduction to analysis of financial data with R. Wiley.
- American Psychological Association. (2020). Publication manual of the American Psychological Association (7th ed.). APA. https://doi.org/10.1037/0000165-000
- R Core Team. (2024). R: A language and environment for statistical computing. R Foundation for Statistical Computing. https://www.R-project.org/
- NIST/SEMATECH. (2013). e-Handbook of statistical methods. National Institute of Standards and Technology. https://www.itl.nist.gov/div898/handbook/
- Virtanen, P., Gommers, R., Oliphant, T. E., et al. (2020). SciPy 1.0: Fundamental algorithms for scientific computing in Python. Nature Methods, 17, 261–272. https://doi.org/10.1038/s41592-020-0772-5










