ADF Test Calculator
Example data table
| t | yt |
|---|---|
| 1 | 102.3 |
| 2 | 101.8 |
| 3 | 102.6 |
| 4 | 103.1 |
| 5 | 102.7 |
| 6 | 103.4 |
| 7 | 103.0 |
| 8 | 103.6 |
| 9 | 104.2 |
| 10 | 103.9 |
| 11 | 104.4 |
| 12 | 104.1 |
Formula used
The calculator estimates the Augmented Dickey-Fuller regression:
- Null hypothesis (H₀): γ = 0 (unit root; non-stationary).
- Alternative (H₁): γ < 0 (stationary under selected terms).
- The ADF statistic is the t-statistic for γ. More negative values provide stronger evidence against H₀.
How to use this calculator
- Paste your time series values in the first box (one per line or comma-separated).
- Select deterministic terms: none, constant, or constant plus trend.
- Choose lag handling: auto (AIC/BIC) or manual p.
- Click Run ADF Test to see results above the form.
- Compare the test statistic with critical values to decide at your chosen significance.
- Use Download CSV or Download PDF to export results.
Why the ADF test matters in time-series work
Before modeling ARIMA, VAR, or regression with lags, you need to know whether shocks persist. The ADF test formalizes this by testing a unit root in the level of a series. If you reject the unit-root null, you can often use the series in levels; if you do not, differencing may be required to avoid spurious relationships and unstable forecasts.
Choosing deterministic terms for realistic baselines
The deterministic setting changes the benchmark distribution. Use “no constant” only for series that fluctuate around zero. Use a constant when the series has a nonzero mean, and add a linear trend when there is visible drift over time. In this calculator, the trend uses the time index, keeping the regression aligned with standard ADF specifications. Adding a trend is conservative and can reduce rejection rates.
Lag length and information criteria trade-offs
Augmentation lags soak up autocorrelation in εt so the γ t-statistic is reliable. Too few lags can leave serial correlation; too many lags reduce power by consuming degrees of freedom. AIC typically favors richer dynamics, while BIC penalizes complexity more strongly. With short samples, try smaller maximum lags and compare stability across nearby p values. As a sanity check, confirm residuals look roughly uncorrelated.
Reading the output: statistic, critical values, and decision
The reported ADF statistic is the t-statistic on γ in Δyt = … + γyt−1 + …. More negative values provide stronger evidence against a unit root. The table shows approximate critical values for 1%, 5%, and 10%. A decision is made by comparing the statistic to your chosen level, and the p-value range summarizes where it likely falls. If the statistic is above the 10% value, evidence is weak.
Operational tips for cleaner, repeatable checks
Check plots first: outliers and breaks can distort stationarity tests. Keep units consistent, and avoid mixing levels and growth rates in the same input. If results change sharply when you adjust p or add a trend, report both specifications and justify your choice. Export CSV/PDF to document assumptions, inputs, and outputs alongside your analysis. Pair this test with domain knowledge and structural-break diagnostics.
FAQs
1) What does the ADF null hypothesis mean?
H₀ states the series has a unit root, so the level is non-stationary under the chosen constant/trend terms. Rejecting H₀ suggests stationarity for that specification.
2) How many observations should I use?
The calculator requires at least 8 values, but more is better. Small samples reduce power and make critical-value decisions less stable, especially when you add lags or a trend.
3) Should I choose AIC or BIC for lags?
AIC often selects more lags to absorb autocorrelation, while BIC is stricter and tends to choose fewer. If conclusions change, try both and keep the smallest p that yields clean residuals.
4) Why does adding a trend change the decision?
Including a trend changes the regression and the critical values, because you are testing stationarity around a deterministic trend instead of a constant mean. It can make rejection harder when drift is present.
5) What if the test fails to reject H₀?
Consider differencing the series, testing a transformed measure like log returns, or checking for seasonal patterns. Also review breaks or outliers, because structural changes can mask stationarity.
6) Are the p-values exact here?
No. This tool reports an approximate p-value range from common critical-value cutoffs. For exact MacKinnon p-values and advanced diagnostics, confirm results in dedicated statistical software.