Seasonal Time Series Generator
Seasonal decomposition always returns a trend and a season. Whether they are the right ones is a different question, and you cannot answer it on real data because the true parts are unknown. Here they are known: every point records the trend and seasonal component it was built from, so a decomposition can be scored rather than admired.
What this generator does
Each point is the sum of a linear trend, a sine wave at the period you set, and Gaussian noise. The trend and seasonal parts are stored per point rather than only the total, which is what makes a decomposition checkable.
How to use this tool
- Set the season length — 12 for monthly data with a yearly cycle.
- Choose a trend per step and how far the season swings.
- Add noise; above the seasonal swing the pattern gets genuinely hard to see.
- Copy the CSV, which includes the true parts alongside the value.
Understanding the controls
- Season length
- How many steps make a full cycle. The tool refuses fewer than two complete cycles, since a season cannot be identified from less than that.
- Trend per step
- How much the underlying level moves each step. Set it to zero for a purely seasonal series.
- Seasonal swing
- How far the season pushes the value either way from the trend.
- Noise
- Random variation on top. When this exceeds the seasonal swing the pattern becomes genuinely hard to detect, and the tool says so.
- Seed
- Any word reproduces the identical series, which is what a forecasting benchmark needs if two runs are to be comparable.
Common use cases
- Testing a seasonal decomposition against known components
- Producing forecasting input where the right answer is available
- Showing how much noise it takes to hide a real seasonal pattern
- Generating chart data with a deliberate, controlled shape
- Checking that a model needs at least two full cycles to find a season
How this generator works
The seasonal component is a sine wave, so it repeats exactly every period and each point's component is recomputed from its index rather than carried forward. The validity check confirms the seasonal part matches the period and that the trend across the series equals the stated slope times the number of steps.
Randomness and fairness
The noise is random and differs between runs; the trend and season do not. Seeded runs are reproducible and therefore explicitly not cryptographically secure; unseeded ones use the browser's cryptographically secure generator.
For how randomness is produced across the whole site, see how Generate Random works.
Limitations and good to know
- The season is a single clean sine wave. Real seasonality is usually several overlapping cycles of different lengths.
- The trend is strictly linear, with no changepoints, levelling off or reversals.
- There are no missing periods, outliers or calendar effects, all of which real series have.
- Series are not stored between visits; seed anything you need to reproduce.
Privacy and your data
The series is generated in your browser. No parameters, seeds or generated values are transmitted or retained.
Related generators
- Correlated Dataset GeneratorTwo numeric columns with a correlation you choose, plus optional blanks, duplicate rows and outliers — for testing charts, cleaning pipelines and statistics teaching.
- Moon Phase CalculatorThe phase and illuminated fraction for any date, with the illumination recomputed from the age and the next new and full moons counted out.
- Regression Dataset GeneratorData built from a slope and intercept you choose, with the line fitted back out of it so you can see how close estimation gets.
- Markov Chain SimulatorDefine states and transition probabilities, then simulate — with a long-run distribution quoted only when the chain genuinely has one.