Course contentsShow
← Data Science
Lesson 797 of 2,14520. Time Series ModelsFree lesson

Seasonal Differencing

Applying seasonal differencing to remove seasonal trends and achieve stationarity in SARIMA models.

Seasonal Differencing

What you'll learn: How to remove seasonal patterns from time series data by subtracting values from previous seasonal periods.


When your time series has repeating patterns at fixed intervals—like monthly sales that spike every December or weekly website traffic that drops every weekend—you need a way to remove these seasonal cycles. That's where seasonal differencing comes in.

The Core Idea

Seasonal differencing works by subtracting each observation from the observation one full seasonal cycle ago. If your data has monthly seasonality (period = 12), you subtract January's value from the next January, February from the next February, and so on.

Think of it like this: instead of asking "what's the value today?", you ask "how much has this value changed compared to the same time last season?" This eliminates the seasonal pattern and helps achieve stationarity.

The Formula

For seasonal period s, seasonal differencing creates a new series:

Y'_t = Y_t - Y_(t-s)

Where s is your seasonal period (12 for monthly data with yearly seasonality, 7 for daily data with weekly patterns, etc.).

Why It Matters for SARIMA

In SARIMA models, seasonal differencing is controlled by the D parameter. While regular differencing (controlled by d) removes trends, seasonal differencing (D) specifically targets those repeating seasonal patterns. You might need both: regular differencing to handle trend and seasonal differencing to handle seasonality.

After seasonal differencing, you should see your ACF plot show reduced spikes at seasonal lags (12, 24, 36... for monthly data), indicating the seasonal component has been successfully removed.

Key Takeaway: Seasonal differencing removes repeating seasonal patterns by comparing each observation to its value from one full season ago, helping achieve stationarity in SARIMA models before forecasting.