Stationarity Test Tool Calculator

Test your series quickly with robust stationarity checks. Choose lags, trends, and confidence levels easily. Export clean summaries for models, audits, and reports today.

Calculator
Enter a time series or upload a CSV, then compute.
Used to compare against critical values.
Changes regression and critical values.
Pick lag p that stabilizes residuals.
Upper bound for AIC/BIC search.
Used only if lag selection is fixed.
Choose what “stationary” means for KPSS.
Controls Newey–West variance smoothing.
Used only in manual mode.
Paste numbers separated by commas, spaces, or new lines.
If uploaded, it replaces the pasted values.
Example data table
A short sample series you can paste using the button above.
IndexValueNote
1 101.2 Early
2 101.9 Early
3 102.4 Early
4 102.1 Mid
5 102.7 Mid
6 103.3 Mid
7 103.0 Mid
8 103.8 Mid
9 104.1 Late
10 104.0 Late
11 104.6 Late
12 105.2 Late
Formula used
This tool implements standard regression forms and compares against commonly used critical values.
Augmented Dickey–Fuller (ADF)
The ADF test evaluates whether the lagged level term indicates a unit root.
Δyt = a + b·t + γ·yt−1 + Σi=1..p δi·Δyt−i + εt
The test statistic is the t-value for γ. If it is more negative than the selected critical value, the unit root is rejected.

KPSS
KPSS checks whether the cumulative residual process grows too large under stationarity.
η = ( Σ St2 ) / ( n2 · σ̂2 ),   St = Σ ei
Residuals are computed after removing a level (or level+trend). The long-run variance uses Bartlett-weighted Newey–West smoothing.
How to use this calculator
  1. Paste your values in order, or upload a CSV with one numeric column.
  2. Pick a significance level, then choose ADF deterministic terms.
  3. Select lag handling for ADF (AIC, BIC, or fixed).
  4. Choose KPSS type and long-run lag handling (auto or manual).
  5. Press Submit to view results above the form.
  6. Use the CSV or PDF buttons to export inputs, settings, and outcomes.

Why Stationarity Matters

Stationary series keep their average level, spread, and dependence structure broadly stable over time. Many forecasting and inference methods assume this stability, because changing variance or drifting means can inflate confidence and create misleading significance. A quick stationarity screen helps decide whether to difference, detrend, transform, or model with explicit trends and seasonality. In practice, even mild nonstationarity can distort correlation and regression coefficients.

What ADF Reports

The Augmented Dickey–Fuller test evaluates a unit‑root null. This tool estimates a regression on first differences and inspects the t‑statistic on the lagged level term. More negative values provide stronger evidence against a unit root. At 5%, compare the statistic to the critical value shown. Reporting multiple lags with information criteria helps reduce autocorrelation in residuals and improves reliability.

What KPSS Adds

KPSS complements ADF by flipping the null: it starts from stationarity and asks whether cumulative residuals grow too large. The statistic uses a long‑run variance estimate, so the chosen Newey–West lag matters when residuals are serially correlated. Auto lag rules scale with sample size, while manual lags help when you know the data’s frequency. When ADF rejects a unit root and KPSS fails to reject stationarity, the series is typically stable enough for many models.

Lag and Trend Choices

Deterministic settings change interpretation. A constant targets level stationarity, while a constant plus trend targets trend stationarity. If your domain implies drift, including a trend prevents false rejections driven by deterministic growth. Lag selection balances fit and parsimony: AIC often selects larger lags; BIC is stricter. Over‑lagging can waste degrees of freedom, especially with short samples. Under‑lagging can leave residual autocorrelation and bias the test statistic.

Practical Workflow for Modeling

Start by plotting the series and reviewing diagnostics such as ACF(1), variance, and a simple trend slope. If tests indicate nonstationarity, try log transforms for scale effects, first differences for stochastic trends, or seasonal differences for periodic patterns. Re‑test after each change. For financial returns, stationarity is common; for prices, differencing is often required. Document settings and outcomes with exports, so modeling decisions remain transparent during audits, handoffs, and updates.

FAQs

What does “stationary” mean for a time series?

A stationary series has stable mean and variance over time, and its autocorrelation depends mainly on lag, not calendar time. Small deviations can exist, but large drifts or changing volatility usually violate stationarity.

Why run both ADF and KPSS together?

ADF tests a unit‑root null, while KPSS tests a stationarity null. Using both reduces one‑sided ambiguity: agreement strengthens the conclusion, and disagreement flags borderline behavior, structural breaks, or inadequate lag choices.

How many data points should I use?

More is better. For reliable lagged regressions, aim for at least 30–50 observations, especially when allowing several lags. With very short samples, results can be unstable and overly sensitive to trend options.

How do I choose ADF lags?

Start with AIC for a more flexible fit or BIC for a simpler model. If residual autocorrelation remains, increase the maximum lag. If degrees of freedom are tight, use fewer lags or a fixed lag based on domain knowledge.

What should I do if the series is nonstationary?

Common fixes include differencing, log transforms for scale changes, removing deterministic trends, and seasonal differencing for periodic patterns. After adjustments, rerun the tests and validate with plots and residual checks.

Do these tests detect structural breaks?

Not directly. Breaks can cause misleading outcomes, such as rejecting stationarity even when segments are stable. If you suspect regime changes, consider break tests, rolling diagnostics, or modeling approaches that allow time‑varying parameters.

Related Calculators

Moving Average CalculatorTime Series Forecast ToolHolt Winters ToolSeasonal Index CalculatorDifferencing CalculatorAnomaly Detection ToolFourier Transform ToolSpectral Density ToolForecast Accuracy ToolChange Point Detector

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.