Short answer
The SPI formula and calculation method accumulates precipitation over a selected time scale, fits a probability distribution to historical accumulated precipitation for the same calendar period, converts the current precipitation amount to a cumulative probability, and transforms that probability to a standard normal value. Negative SPI values indicate drier-than-normal conditions, while positive values indicate wetter-than-normal conditions.
Overview of the SPI workflow
The Standardized Precipitation Index is designed to describe how unusual a precipitation amount is compared with the historical climate of the same location. It is not simply the difference between current rainfall and the long-term mean. Instead, SPI uses probability theory to account for the fact that precipitation is usually skewed, bounded at zero, and highly variable from month to month.
The basic idea is simple: first, determine how much precipitation accumulated over a time scale such as 1, 3, 6, 12, or 24 months. Then compare that amount with the historical distribution of accumulated precipitation for the same calendar period. Finally, convert the probability of that amount into a standardized z-score. This standardized value is the SPI.
Because SPI is standardized, values from different regions can be compared more easily. An SPI of -1.5 indicates a dry condition that is unusually low relative to the local historical climate, whether the station is in a humid region or a semi-arid region.
Step 1: Prepare precipitation data
The first requirement is a consistent precipitation record. Many SPI studies use monthly precipitation totals. Daily data can also be used, but they are usually aggregated to monthly totals before SPI is calculated. The data should be checked for missing values, unit consistency, duplicate records, and unrealistic values.
A long baseline period is preferred because SPI depends on historical probability estimation. When possible, 30 or more years of data are useful for stable fitting. Shorter records can be used, but the interpretation should be more cautious because the tails of the distribution are less certain.
Before fitting distributions, the analyst should decide how to handle missing months. In many workflows, SPI is not calculated for an accumulation window if one or more months inside the window are missing. Filling missing precipitation may be appropriate in some studies, but it should be documented because it can influence drought severity and duration.
Step 2: Select the accumulation time scale
SPI can be calculated for different accumulation periods. SPI-1 uses one month of precipitation. SPI-3 uses the sum of the current month and the previous two months. SPI-12 uses twelve months of accumulated precipitation. The selected time scale should match the drought process being studied.
| SPI time scale | Input precipitation | Typical interpretation | Example use |
|---|---|---|---|
| SPI-1 | Current monthly precipitation | Short-term meteorological anomaly | Recent dryness, flash drought screening |
| SPI-3 | Three-month accumulated precipitation | Seasonal moisture condition | Crop season monitoring, pasture conditions |
| SPI-6 | Six-month accumulated precipitation | Medium-term water deficit | Growing-season assessment, reservoir inflow signals |
| SPI-12 | Twelve-month accumulated precipitation | Annual-scale drought condition | Water supply, drought persistence, regional comparison |
| SPI-24 | Twenty-four-month accumulated precipitation | Multi-year anomaly | Hydrological drought and long-term planning |
Short time scales respond quickly to rainfall changes, while long time scales are smoother and better represent persistent drought. A location may show drought at SPI-3 but normal conditions at SPI-12, or the reverse. This is not an error. It means short-term and long-term moisture conditions are different.
Step 3: Group values by calendar period
Precipitation has strong seasonality. A dry month in summer may have a different meaning than the same precipitation amount in winter. To handle seasonality, SPI is usually fitted separately for each calendar month or period. For example, January SPI-3 values are compared with historical January SPI-3 accumulated precipitation values, not with all months combined.
This step is essential because it prevents wet-season and dry-season precipitation from being mixed incorrectly. It also makes SPI comparable through time because every value is interpreted relative to the normal precipitation distribution for the same part of the year.
Step 4: Fit a probability distribution
Precipitation is not normally distributed. It is often right-skewed, especially at short time scales, and it cannot be less than zero. For this reason, SPI calculation fits a probability distribution to historical accumulated precipitation. The gamma distribution is widely used because it is flexible for positive, skewed precipitation data.
Other distributions or empirical methods may also be used depending on the dataset, climate, record length, and software implementation. In arid regions or short records, zero precipitation values and poor distribution fitting can become important. A robust SPI workflow should include checks for distribution quality and fallback options when fitting is unreliable.
Step 5: Convert precipitation to cumulative probability
After fitting the distribution, the observed accumulated precipitation value is converted to a cumulative probability. This probability describes how common or rare that precipitation amount is in the historical distribution. A low probability means the precipitation is unusually low; a high probability means it is unusually wet.
For example, if the accumulated precipitation corresponds to the 10th percentile of the historical distribution, it means only about 10% of historical values were equal to or lower than that amount. That does not yet give the SPI value, but it provides the probability needed for the standard normal transformation.
Step 6: Transform probability to a standard normal value
The final step is to transform the cumulative probability into a standard normal z-score. This z-score is the SPI. The transformation makes the index have a mean near zero and a standard deviation near one when calculated over the baseline period.
In practical terms, SPI values near zero represent normal precipitation conditions. Negative values indicate below-normal accumulated precipitation. Positive values indicate above-normal accumulated precipitation. The farther the value is from zero, the more unusual the condition is.
| SPI value | Common category | General interpretation |
|---|---|---|
| 2.0 or greater | Extremely wet | Very unusual wet condition |
| 1.5 to 1.99 | Very wet | Strong wet anomaly |
| 1.0 to 1.49 | Moderately wet | Above-normal precipitation |
| -0.99 to 0.99 | Near normal | Normal or mild anomaly |
| -1.0 to -1.49 | Moderate drought | Clear dry anomaly |
| -1.5 to -1.99 | Severe drought | Strong dry anomaly |
| -2.0 or less | Extreme drought | Very unusual dry condition |
Simple calculation example
Imagine a station where we want to calculate SPI-3 for June. First, the precipitation totals for April, May, and June are summed for every year in the baseline period. These historical June SPI-3 accumulation values form the distribution. Then the current April-May-June total is compared with that distribution.
If the current three-month total is much lower than most historical April-May-June totals, the cumulative probability will be low and the final SPI will be negative. If the total is close to the historical median, SPI will be near zero. If it is unusually high, SPI will be positive.
The same process is repeated for every month and every selected time scale. This produces an SPI time series that can be plotted, summarized, and used to detect drought events.
Common calculation issues
Several issues can influence SPI results. Missing data can break accumulation windows. Short records can make extreme drought estimates unstable. Very dry climates can produce many zero precipitation values, especially at SPI-1. Seasonal climates require careful calendar grouping. Different software tools may also use slightly different fitting methods or zero-precipitation corrections.
For scientific reporting, it is important to document the precipitation dataset, baseline period, accumulation time scale, distribution method, missing data treatment, and drought category thresholds. Without these details, it can be difficult to reproduce SPI results or compare them with another study.
How DMAP-AI calculates and uses SPI
DMAP-AI uses SPI as a core drought index because it is widely recognized, transparent, and suitable for multi-time-scale drought assessment. A user selects a location, data source, analysis period, and SPI time scale. DMAP-AI then processes the precipitation data, calculates SPI, identifies drought events, and generates charts and tables that can be interpreted by the user or by the AI interpretation module.
In addition to the SPI line chart, DMAP-AI can summarize drought events by duration, minimum SPI, and magnitude. These event metrics help move beyond a simple visual interpretation and provide structured information for comparing drought episodes. For AI-assisted analysis, these structured values are especially useful because they reduce the risk of vague or unsupported interpretation.
Frequently asked questions
Is SPI calculated from rainfall or precipitation?
SPI is calculated from precipitation. Depending on the climate and dataset, this may include rainfall and snowfall water equivalent. The important point is that the input should represent total precipitation consistently.
Can SPI use daily data?
Yes, but daily data are commonly aggregated to monthly totals before traditional SPI calculation. Some specialized applications use shorter accumulation windows, but the method and interpretation should be documented carefully.
Why is SPI standardized?
Standardization allows drought conditions to be compared across regions with different average precipitation. It also gives the index a familiar interpretation using negative and positive deviations from normal.
Does SPI include temperature?
No. SPI is precipitation-based. If temperature and atmospheric water demand are important for the research question, SPEI or evapotranspiration-based indicators may be more appropriate.
Can SPI identify drought duration?
SPI itself is a time series. Drought duration is usually calculated by identifying consecutive periods where SPI remains below a selected threshold, such as -1.0.
Selected references
- McKee, T. B., Doesken, N. J., and Kleist, J. (1993). The relationship of drought frequency and duration to time scales. Proceedings of the 8th Conference on Applied Climatology.
- World Meteorological Organization. Standardized Precipitation Index User Guide. WMO-No. 1090.
- Guttman, N. B. (1999). Accepting the Standardized Precipitation Index: A calculation algorithm. Journal of the American Water Resources Association.
- Edwards, D. C., and McKee, T. B. (1997). Characteristics of 20th century drought in the United States at multiple time scales. Colorado State University.
- Lloyd-Hughes, B., and Saunders, M. A. (2002). A drought climatology for Europe. International Journal of Climatology.