Time Series Decomposition Demo
Explore trend and seasonality in a simple time series decomposition demo. Paste your data, choose a seasonal period and model, and see separate trend, seasonal, and residual components with interactive charts.
Decompose a Time Series into Trend and Seasonality
Paste a simple time series, choose a seasonal period and model, and we'll show you separate trend, seasonal, and residual components with interactive charts. Great for learning time series concepts.
Getting Started:
- 1Enter your time series values (one per line or comma-separated)
- 2Choose the seasonal length (e.g., 12 for monthly data with yearly seasonality)
- 3Select additive or multiplicative model
- 4Click "Decompose Time Series" to see the breakdown
Pro tip: Try the demo presets to see how decomposition works with different patterns. This is a simple educational tool — not for forecasting or trading decisions.
Understanding Time Series Decomposition
What is Time Series Decomposition?
Time series decomposition is a technique that separates a time series into its underlying components: trend, seasonality, and residual (noise). This helps us understand the different patterns driving the data and is often a first step in time series analysis and forecasting.
Trend, Seasonality, and Residual Explained
Trend
The long-term direction of the series — upward, downward, or flat. It captures gradual changes over time, ignoring short-term fluctuations.
Seasonality
Regular, repeating patterns at fixed intervals. For example, higher retail sales in December, or more website traffic on weekdays. The pattern repeats every "season" (e.g., 12 months, 7 days).
Residual
What's left after removing trend and seasonality. Ideally, residuals are random noise with no pattern. Large or patterned residuals may indicate the model isn't capturing all structure.
Additive vs Multiplicative Models
Additive Model
y = Trend + Seasonal + Residual
Use when seasonal fluctuations are roughly constant in absolute terms, regardless of the series level. Example: a store sells 100 more units each December, whether baseline is 500 or 5000.
Multiplicative Model
y = Trend × Seasonal × Residual
Use when seasonal fluctuations scale with the series level. Example: a store sells 20% more each December — 100 extra units when baseline is 500, but 1000 extra when baseline is 5000.
Tip: Plot your data. If the seasonal swings grow larger as the series increases, use multiplicative. If they stay roughly the same size, use additive.
Choosing a Seasonal Period
| Data Frequency | Common Seasonal Length | Example |
|---|---|---|
| Daily | 7 | Weekly pattern (Mon-Sun) |
| Weekly | 52 | Yearly pattern |
| Monthly | 12 | Yearly pattern (Jan-Dec) |
| Quarterly | 4 | Yearly pattern (Q1-Q4) |
| Hourly | 24 or 168 | Daily or weekly pattern |
Limitations of Simple Decomposition
- •Edge effects: Trend cannot be computed at the beginning and end of the series.
- •Fixed seasonality: Assumes the seasonal pattern is constant over time.
- •Single seasonality: Cannot handle multiple overlapping seasonal patterns.
- •No outlier handling: Outliers can distort both trend and seasonal estimates.
- •Not for forecasting: Decomposition describes past data; it doesn't predict the future.
For production use, consider more robust methods like STL (Seasonal and Trend decomposition using Loess), X-13ARIMA-SEATS, or modern forecasting tools like Prophet.
Important Disclaimer
This tool is for educational and demonstration purposes only. It is NOT intended for trading, forecasting, or financial decisions. The decomposition uses simplified algorithms that may not capture all patterns in real-world data. Always consult domain experts and use proper statistical software for important analyses.
Frequently Asked Questions
Related Tools
Monte Carlo Simulator
Run repeated random simulations to estimate distributions of outcomes and probabilities.
Cohort Retention Table
Build cohort retention tables and visualize how retention evolves across customer cohorts over time.
Basic Churn & Retention Calculator
Calculate period-level churn rate, retention rate, and net growth from your customer counts.
CAC, LTV & LTV/CAC Calculator
Estimate customer acquisition cost, lifetime value, and unit economics for your business.
CLV Scenario Simulator
Model customer lifetime value under different churn, pricing, and retention scenarios.
Regression Calculator
Fit linear or polynomial regression models to your data and compute R-squared.
Subscription Cohort Revenue Decay
Visualize how subscription revenue decays across cohorts over time and project future revenue.
Franchise Location Profitability Model
Model profitability for franchise or branch locations with revenue and cost projections.
Explore More Data Science Tools
Build essential skills in data analysis, statistics, and operations research
Explore All Data Science & Operations Tools