Time Series Split Tool Calculator

Measure train, gap, and test spans across folds. Choose expanding or rolling windows with ease. Visualize every split clearly before benchmarking forecasting models today.

Calculator Inputs

Total ordered records in your time series.
Starting history used by the first fold.
Future observations evaluated in every fold.
Skipped observations between training and testing.
How far the split origin moves each fold.
Upper limit on generated folds.
Expanding grows history. Rolling keeps a moving window.
Used only when rolling mode is selected.
Controls display labels for split ranges.
Optional base date for daily, weekly, monthly, or quarterly labels.

Example Data Table

Example monthly series for a forecasting workflow. These values help explain how the split planner behaves.

Observation Month Sales Index Promo Flag
1Jan 2024102No
2Feb 2024107Yes
3Mar 2024111No
4Apr 2024115No
5May 2024121Yes
6Jun 2024125No
7Jul 2024129No
8Aug 2024136Yes

Formula Used

Fold train end: Train End(k) = Initial Train + (k × Step Size)

Fold test start: Test Start(k) = Train End(k) + Gap + 1

Fold test end: Test End(k) = Test Start(k) + Test Size - 1

Expanding train size: Train Size = Train End - 1 + 1, so the training window grows as each fold advances.

Rolling train size: Train Start = max(1, Train End - Rolling Window + 1), which keeps a fixed moving history when enough data exists.

Valid fold rule: a split is valid only when Test End ≤ Total Observations.

These rules help preserve time order, avoid leakage, and show how many realistic backtests fit inside the available series.

How to Use This Calculator

  1. Enter the full number of ordered observations in your series.
  2. Set the initial training size and the future test size.
  3. Add a gap if your workflow needs leakage protection.
  4. Choose expanding or rolling windows, then set the step size.
  5. Generate the folds and review the table, coverage summary, and chart before model benchmarking.

Frequently Asked Questions

1. What does this tool calculate?

It creates ordered train, gap, and test folds for time series validation. The tool shows valid split ranges, fold counts, coverage, and a visual split map for faster review.

2. Why is a gap useful?

A gap separates training and testing periods. This can reduce information leakage when lagged features, reporting delays, or operational latency might otherwise leak future signals into training.

3. What is the difference between expanding and rolling windows?

Expanding windows keep all earlier history and add new observations each fold. Rolling windows keep a moving historical window, which is useful when older data becomes less relevant over time.

4. Can test windows overlap?

Yes. Overlap happens when the step size is smaller than the test size. That setting may be intentional, but it makes nearby fold scores more correlated.

5. Does the calculator support dated labels?

Yes. You can choose daily, weekly, monthly, or quarterly labels and supply a start date. The tool then converts observation numbers into readable period labels.

6. How should I choose the test size?

Match the test size to your forecasting horizon or evaluation cycle. For example, monthly forecasts might use a 3-month or 6-month test block, depending on the business question.

7. What does unique test coverage mean?

It counts distinct observations that appear in at least one test block. This shows how much of the whole series is actually used for out-of-sample evaluation.

8. Why export CSV or PDF?

CSV makes it easy to reuse split plans in notebooks or review sheets. PDF is useful for stakeholder sign-off, documentation, and method notes in model governance records.

Related Calculators

Moving Average CalculatorSeasonal Decomposition ToolTrend Analysis CalculatorTime Series Forecast ToolPartial Autocorrelation ToolStationarity Test ToolADF Test CalculatorKPSS Test CalculatorHolt Linear TrendHolt Winters Tool

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.