SARIMA stands for Seasonal Autoregressive Integrated Moving Average. It’s a statistical model used to forecast time series data that follows recurring seasonal patterns, like monthly sales figures, quarterly earnings, or annual flu case counts. SARIMA extends the widely used ARIMA model by adding a set of seasonal components, making it one of the most common tools for predicting future values when your data has both a trend and a predictable cycle.
How SARIMA Differs From ARIMA
A standard ARIMA model handles trends and short-term patterns in data, but it assumes no repeating seasonal cycle. That works fine for some datasets, but much of the real world is seasonal: electricity demand spikes every summer, retail sales climb every December, and disease outbreaks follow annual weather patterns. ARIMA alone can’t capture those recurring swings.
SARIMA solves this by layering seasonal autoregressive, seasonal differencing, and seasonal moving average terms on top of the standard ARIMA structure. These seasonal terms work the same way as their non-seasonal counterparts, but they operate at the seasonal frequency. So instead of looking at how last month’s value influences this month, the seasonal terms look at how the value from the same month last year influences this month. The result is a model that can account for both the short-term momentum in your data and the predictable yearly (or quarterly, or weekly) rhythm.
The Seven Parameters
SARIMA is defined by seven parameters, written as SARIMA(p, d, q)(P, D, Q, s). The first three handle non-seasonal behavior, the next four handle seasonal behavior.
p is the number of recent past values the model uses to predict the next value. If p equals 2, the model looks at the previous two data points. d is the number of times the data needs to be differenced (subtracting each value from the one before it) to remove trends and make the data stable over time. q is the number of past forecast errors the model factors in, which helps it correct for short-term shocks.
P, D, and Q mirror those same three concepts but at the seasonal level. Instead of looking at the immediately previous data points, the seasonal terms look back by whole seasons. D, for example, removes seasonal patterns by subtracting the value from the same season in the prior year. For monthly data, that means subtracting January 2023’s value from January 2024’s value. s tells the model how many periods make up one full season: 12 for monthly data, 4 for quarterly data, 52 for weekly data with an annual cycle.
A practical example: the model SARIMA(1, 0, 2)(1, 1, 1)12 was found to be the most accurate for predicting monthly scrub typhus cases in China. That notation means one autoregressive term, no non-seasonal differencing, two moving average terms, plus one seasonal autoregressive term, one round of seasonal differencing, one seasonal moving average term, and a 12-month seasonal cycle.
Why Stationarity Matters
SARIMA requires the data to be “stationary” before modeling, meaning the data’s average level and variability don’t change over time. Real-world data almost never starts that way. A company’s revenue might trend upward for years, or a city’s temperature readings might swing predictably by season. Both of those patterns violate stationarity.
Differencing is the tool that fixes this. Non-seasonal differencing (the d parameter) removes trends by computing the change between consecutive values. Seasonal differencing (the D parameter) removes the seasonal pattern by subtracting the value from the same point in the previous cycle. Sometimes you need both: one round of seasonal differencing to strip out the annual rhythm, plus one round of non-seasonal differencing to remove whatever trend remains. A useful rule of thumb is to never use more than one order of seasonal differencing or more than two orders of total differencing combined. Over-differencing introduces its own problems and can make the model less accurate.
Choosing the Right Model
With seven parameters to set, finding the best SARIMA model for a given dataset isn’t trivial. The standard approach is to fit multiple candidate models with different parameter combinations and compare them using information criteria. The Akaike Information Criterion (AIC) is the most common: it balances how well the model fits the data against how many parameters it uses, penalizing unnecessary complexity. You pick the model with the lowest AIC value. The Bayesian Information Criterion (BIC) works similarly but applies a heavier penalty for extra parameters, favoring simpler models.
After selecting a model, you validate it by checking whether the residuals (the differences between the model’s predictions and the actual data) look like random noise. If the residuals still contain patterns, the model hasn’t captured everything in the data. An autocorrelation plot of the residuals should show no significant spikes. The Ljung-Box test formalizes this check: it tests whether the residual autocorrelations are collectively zero. A p-value above 0.05 generally indicates the residuals are random enough and the model fits adequately.
Where SARIMA Is Used
SARIMA shows up across fields wherever data has a reliable seasonal rhythm. In public health, it’s used to forecast disease outbreaks. Researchers have applied it to predict cases of infectious diseases using years of surveillance data, giving health departments early warning to allocate medical resources before outbreaks peak. In economics and business, SARIMA forecasts quarterly GDP, monthly retail sales, and energy demand. In environmental science, it models seasonal air pollution levels and water usage patterns.
The model works best when the seasonal pattern is strong, consistent, and roughly the same size from year to year. Export volumes with regular seasonal cycles, for instance, are a natural fit. When the seasonal pattern shifts unpredictably or the relationships in the data are nonlinear, SARIMA tends to underperform.
Limitations to Keep in Mind
SARIMA assumes a linear relationship between past and future values. That’s its biggest structural limitation. It captures trends and seasonal cycles well, but it cannot model nonlinear dynamics, where the relationship between variables changes in complex ways depending on their magnitude or context. Deep learning models like LSTMs and GRUs can learn those nonlinear patterns, which is why they sometimes outperform SARIMA on datasets with irregular or complex behavior.
Parameter selection is another practical challenge. Correctly determining the seven parameters requires both statistical expertise and time, especially when you’re testing many combinations. Automated search tools (like Python’s pmdarima library) help, but they don’t eliminate the need to understand what the model is doing. Blindly accepting the lowest AIC result without checking residuals or understanding the data’s structure can lead to poor forecasts.
SARIMA also struggles with long-term forecasting. Its predictions become increasingly uncertain the further out you go, because the model relies on its own forecasted values to generate subsequent ones. For short to medium-term forecasts within a few seasonal cycles, it remains one of the most reliable and interpretable tools available.
How to Implement SARIMA
In Python, SARIMA is implemented through the SARIMAX function in the statsmodels library. The “X” in SARIMAX stands for exogenous variables, meaning the function can also incorporate outside predictors (like temperature data when forecasting energy use), though you can ignore that feature and use it as a pure SARIMA model. R offers similar functionality through the forecast package and its auto.arima function, which automates parameter selection.
The typical workflow starts with plotting the data to visually identify trends and seasonality, then testing for stationarity, applying differencing as needed, searching over candidate parameter combinations using AIC, fitting the best model, checking residuals, and finally generating forecasts. The entire process can be done in a few dozen lines of code, which is part of why SARIMA remains so widely used despite the availability of more complex alternatives.

