Paste the data, get the tables, the seasonal decomposition plot and APA 7 wording in seconds. Analysis needs no sign-in; downloads need a free sign up, then log in.
Open the free seasonal decomposition plot calculator
What is a seasonal decomposition plot?
A seasonal decomposition plot splits one time series into three parts and draws each part in its own panel, stacked under the observed series:
- Trend: the slow, long-term direction after the repeating cycle is smoothed away.
- Seasonal component: a pattern that repeats every fixed period, such as 12 months, 4 quarters or 7 days.
- Residual (irregular) component: whatever remains once trend and season are removed.
In an additive model, observed = trend + seasonal + residual. In a multiplicative model, observed = trend × seasonal × residual. The classical method estimates the trend with a centered moving average whose length equals the period, averages the detrended values at each position of the cycle to get the seasonal component, and treats the remainder as the residual. Because the moving average needs data on both sides, half a period of trend values is missing at each end of the series.
When and why to use a seasonal decomposition plot
When
- Surveillance or clinical series (weekly cases, monthly admissions, emergency visits) that are expected to rise and fall with the seasons.
- Before judging an intervention, so that a real change in direction is not confused with a normal winter peak.
- When a seasonally adjusted series (observed minus seasonal component) is needed for reporting or modelling.
- To decide between an additive and a multiplicative structure before forecasting.
- To find outliers and unexplained structure in the residual panel.
Why
- A seasonal decomposition plot answers three questions at a glance: Is there a trend? Is there a stable seasonal pattern? Is anything left over that deserves attention?
- The strength measures FT and FS (Wang, Smith & Hyndman, 2006) turn those visual impressions into numbers between 0 and 1.
Typical biomedical examples
monthly malaria or influenza incidence, emergency department attendance, seasonal births or conceptions, asthma admissions and air pollution, blood donation counts.
How to interpret the results
Confirm the period first
The period is the number of observations per cycle: 12 for monthly data with a yearly cycle, 4 for quarterly, 7 for daily data with a weekly cycle, 52 for weekly data with a yearly cycle. A wrong period produces a meaningless seasonal panel. At least two full cycles are needed.
Trend panel
Read the direction and the rate of change. The trend line is shorter than the observed series because the ends cannot be estimated. Describe the slope in the units of the data per time step.
Seasonal panel
Classical decomposition forces the seasonal pattern to be identical in every cycle. Read the position of the peak, the position of the trough and the peak-to-trough range. If the real seasonal shape changes over the years, classical decomposition cannot show that, and a method such as STL is better.
Additive or multiplicative?
When seasonal swings stay about the same size as the level rises, choose additive. When the swings grow as the level grows, choose multiplicative (this requires strictly positive values, so counts with zeros are not suitable).
Residual panel
Residuals should look like random scatter around zero (additive) or around 1 (multiplicative). Runs above or below the line, waves or isolated spikes point to leftover structure or outliers. A Ljung–Box test on the residuals checks for remaining autocorrelation.
Strength of trend and seasonality
FT = max(0, 1 − Var(residual)/Var(trend + residual)) and FS = max(0, 1 − Var(residual)/Var(seasonal + residual)). Values near 1 mean the component dominates the series. StatFAS labels values below .30 weak, .30 to .60 moderate and above .60 strong; these labels are a rule of thumb, not a formal standard.
Description, not inference
A seasonal decomposition plot describes the data. No p-value tests whether seasonality exists; the only test reported is the Ljung–Box test on the residuals.
Common mistakes
- Using fewer than two full cycles.
- Applying a multiplicative model to data that contain zeros or negative values.
- Reading the trend as proof of a cause such as an intervention or policy.
- Leaving large outliers in the data: classical decomposition is not robust, so a spike leaks into the trend and the seasonal pattern.
- Calling every residual spike random noise without checking the calendar for an explanation.
- Using the wrong period or unequally spaced observations.
How to make a seasonal decomposition plot
The easy way: StatFAS.com
The free seasonal decomposition plot calculator at StatFAS.com handles the calculations, draws the figure to publication standard and writes the APA 7 results text. The seasonal decomposition plot calculator page walks through every step.
Paste the data, get the tables, the seasonal decomposition plot and APA 7 wording in seconds. Analysis needs no sign-in; downloads need a free sign up, then log in.
Open the free seasonal decomposition plot calculator
SPSS
- Define the cycle: Data > Define Date and Time, choose Years, months (or the matching option) and enter the first case.
- Choose Analyze > Forecasting > Seasonal Decomposition.
- Move the series into Variable(s).
- Under Model Type pick Multiplicative or Additive. Under Moving Average Weight pick “Endpoints weighted by .5” for even periods such as 12, otherwise “All points equal”.
- Keep Create variables: Add to file and press OK.
- SPSS adds four variables:
ERR(residual),SAS(seasonally adjusted series),SAF(seasonal factors) andSTC(smoothed trend-cycle). Draw each with Analyze > Forecasting > Sequence Charts; the four panels are not drawn together automatically. - For the residual check use Analyze > Forecasting > Autocorrelations on
ERRand read the Box–Ljung table.
R
x <- ts(values, start = c(2019, 1), frequency = 12) # one value per month
dec <- decompose(x, type = "additive") # use "multiplicative" when swings grow with the level
plot(dec) # four stacked panels
ok <- !is.na(dec$random)
r <- dec$random[ok]
Ft <- max(0, 1 - var(r) / var((dec$trend + dec$random)[ok]))
Fs <- max(0, 1 - var(r) / var((dec$seasonal + dec$random)[ok]))
c(trend_strength = Ft, seasonal_strength = Fs)
Box.test(r, lag = 10, type = "Ljung-Box") # residual autocorrelationPython
import pandas as pd
from statsmodels.tsa.seasonal import seasonal_decompose
from statsmodels.stats.diagnostic import acorr_ljungbox
y = pd.Series(values, index=pd.date_range("2019-01-01", periods=len(values), freq="MS"))
dec = seasonal_decompose(y, model="additive", period=12) # "multiplicative" for growing swings
dec.plot()
ok = dec.resid.notna()
r = dec.resid[ok]
Ft = max(0, 1 - r.var() / (dec.trend + dec.resid)[ok].var())
Fs = max(0, 1 - r.var() / (dec.seasonal + dec.resid)[ok].var())
print(Ft, Fs)
print(acorr_ljungbox(r, lags=[10]))How to report the results in APA 7
Example wording (simulated monthly clinic visits, 72 months): “A classical additive decomposition (period = 12) was applied to monthly clinic visits (N = 72). Seasonality was strong (FS = .98) and the trend was strong (FT = .94). Residual autocorrelation was not significant, Q(10) = 10.32, p = .413.” Report the model type, the period, N, both strength values, the peak and trough positions, and the Ljung–Box result.
Frequently asked questions
How many observations does a seasonal decomposition plot need?
At least two complete cycles, so 24 monthly values for a yearly pattern. More cycles give a more stable seasonal estimate.
Does the seasonal decomposition plot work for daily data?
Yes, when a repeating cycle exists. Use period 7 for a weekly cycle in daily data, and keep in mind that a yearly cycle in daily data needs a period of about 365 and several years of values.
Why is the trend line shorter than the data?
The centered moving average needs half a period of data before and after each point, so half a period of trend is lost at both ends.
Can missing values be handled?
No. Fill or interpolate gaps with a justified method before decomposition, or the cycle positions will be shifted.
Key takeaways
- A seasonal decomposition plot is only as good as the preparation: correct period, equal spacing, no gaps.
- Confirm the period first: The period is the number of observations per cycle: 12 for monthly data with a yearly cycle, 4 for quarterly, 7 for daily data with a weekly cycle, 52 for weekly data with a yearly cycle. A wrong period produces a meaningless seasonal panel. At least two full cycles are needed.
- Report numbers together with the figure, using APA 7 wording.
- StatFAS.com produces the figure, the tables and the APA 7 text from pasted data.
Related reading
ACF plot blog · Forecast plot blog · seasonal decomposition plot calculator