Time Series Decomposer

Decompose time series into trend, seasonal, and residual components

Input Time Series Data

Help

What is Time Series Decomposition?

Time series decomposition separates a time series into three components:

  • Trend (T): Long-term progression of the series (increasing/decreasing pattern)
  • Seasonal (S): Repeating patterns at fixed intervals (daily, weekly, monthly, yearly)
  • Residual (R): Random fluctuations (noise) after removing trend and seasonality
Decomposition Types
  • Additive: Y = T + S + R
    Use when seasonal variations are roughly constant over time
    Residuals should be independent of trend/seasonal components
  • Multiplicative: Y = T × S × R
    Use when seasonal variations change proportionally with the level
    Often converted to additive via log transformation
Parameters
  • Seasonal Period: Number of observations in one seasonal cycle
    • Daily data with weekly pattern: 7
    • Monthly data with yearly pattern: 12
    • Hourly data with daily pattern: 24
  • Trend Window: Size of moving average window for trend extraction
    • Larger window = smoother trend
    • Smaller window = more responsive to changes
    • Typically set to seasonal period or slightly larger
    • Must be odd number
Interpreting Results
  • Trend: Shows overall direction (growth, decline, stability)
  • Seasonal: Reveals cyclical patterns (peak days, slow periods)
  • Residual: Should resemble white noise if decomposition is good
    • Random scatter around zero
    • No patterns or trends
    • Approximately normal distribution
Use Cases
  • Sales Forecasting: Separate trend from seasonal patterns
  • Anomaly Detection: Identify unusual values in residuals
  • Pattern Analysis: Understand cyclical behavior
  • Deseasonalization: Remove seasonal effects for clearer trends
  • Model Preparation: Understand components before forecasting
Data Requirements
  • Regularly spaced time series (no gaps)
  • At least 2 complete seasonal cycles recommended
  • More data = better seasonal pattern estimation
  • CSV format: timestamp, value
  • Timestamps can be dates or sequential integers