Standardized Precipitation Index Calculator
What is the Standardized Precipitation Index?
The SPI answers one question: how unusual is the precipitation of the last k months, compared with the same months in other years? It is expressed in standard deviations, so an SPI of −2 means as dry as roughly the driest 2.3% of comparable periods, anywhere in the world. Developed by McKee, Doesken and Kleist (1993) at Colorado State University, it was adopted in the 2009 Lincoln Declaration and the WMO SPI User Guide (2012) as the reference index for meteorological drought.
Because it needs only precipitation, it can be computed for any rain gauge or for gridded products such as CHIRPS, ERA5-Land or GPM IMERG. For the theory, history and the comparison with SPEI, read our guide SPI and SPEI explained.
How the SPI is Calculated, Step by Step
- Accumulate. For time scale k, sum the current and previous k − 1 months: \(X_t=\sum_{j=0}^{k-1}P_{t-j}\).
- Group by calendar month. All the March values of SPI-3 (Jan–Mar totals) form one sample, all April values another, and so on. This removes the seasonal cycle.
- Fit a gamma distribution to the non-zero values of each sample, \(g(x)=\dfrac{x^{\alpha-1}e^{-x/\beta}}{\beta^\alpha\Gamma(\alpha)}\), using Thom's (1958) maximum-likelihood approximation: $$A=\ln\bar x-\frac{\sum\ln x}{n},\qquad \hat\alpha=\frac{1}{4A}\left(1+\sqrt{1+\frac{4A}{3}}\right),\qquad \hat\beta=\frac{\bar x}{\hat\alpha}$$
- Handle zeros. With q the fraction of zero totals, the cumulative probability is \(H(x)=q+(1-q)\,G(x)\).
- Transform to the standard normal: \(\text{SPI}=\Phi^{-1}\!\big(H(x)\big)\). This "equiprobability transformation" keeps the probability and changes only the scale.
Choosing the SPI Time Scale
| Scale | Reflects | Typical use |
|---|---|---|
| SPI-1 | Short-term precipitation; close to percent of normal | Meteorological drought, short dry spells |
| SPI-3 | Seasonal moisture | Soil moisture, agricultural drought, crop stress |
| SPI-6 | Medium-term trends | Seasonal streamflow and reservoir inflow |
| SPI-9 | Inter-seasonal patterns | Transition from agricultural to hydrological drought |
| SPI-12 to SPI-24 | Long-term deficits | Streamflow, reservoirs, groundwater, hydrological drought |
SPI Drought and Wetness Categories
| SPI | Category | Expected frequency |
|---|---|---|
| ≥ 2.0 | Extremely wet | 2.3% |
| 1.5 to 1.99 | Very wet | 4.4% |
| 1.0 to 1.49 | Moderately wet | 9.2% |
| −0.99 to 0.99 | Near normal | 68.2% |
| −1.0 to −1.49 | Moderately dry | 9.2% |
| −1.5 to −1.99 | Severely dry | 4.4% |
| ≤ −2.0 | Extremely dry | 2.3% |
Categories from McKee et al. (1993) and the WMO SPI User Guide (2012). Expected frequencies follow from the standard normal distribution.
Drought Duration, Severity and Intensity
McKee et al. (1993) define a drought event as a period in which the SPI is continuously negative and reaches −1.0 or less. The event starts when SPI first falls below zero and ends when it becomes positive again.
Limitations of the SPI
Record length
Fewer than ~30 years gives unstable gamma parameters; extreme SPI values become unreliable.
Precipitation only
Ignores evaporative demand. Under warming, use SPEI as well (see our SPI vs SPEI guide).
Dry seasons and arid climates
Months with many zero totals produce a bounded, discontinuous SPI. Very negative values cannot occur when the median is zero.
Calibration period and distribution
SPI depends on the reference period and the fitted distribution (gamma vs Pearson III). Report both so others can reproduce your numbers.
Related Tools and Guides
Frequently Asked Questions
What is the Standardized Precipitation Index (SPI)?
The SPI expresses accumulated precipitation over a chosen period (1 to 48 months) as the number of standard deviations above or below the long-term median for that time of year. It was developed by McKee, Doesken and Kleist (1993) and is recommended by the World Meteorological Organization as the reference meteorological drought index.
How is the SPI calculated?
Precipitation is summed over the chosen time scale (for SPI-3, the current and previous two months). For each calendar month separately, a gamma distribution is fitted to the long-term record of these sums, with a separate probability for zero totals. The cumulative probability of each value is then converted to the equivalent standard normal value, which is the SPI.
What do SPI values mean?
SPI of 0 is median precipitation. Values of −1.0 to −1.49 are moderately dry, −1.5 to −1.99 severely dry and −2.0 or less extremely dry. Positive values indicate wet conditions on the same scale. Because SPI is standardized, values from different climates can be compared.
How many years of data are needed for SPI?
The WMO SPI User Guide recommends at least 20–30 years of monthly data, with 50–60 years or more being optimal. Short records make the fitted gamma distribution and therefore the extreme SPI values unreliable.
What is the difference between SPI-3 and SPI-12?
SPI-3 compares the last three months of precipitation with the same three months in other years, so it reflects short- and medium-term moisture relevant to soil moisture and crops. SPI-12 compares the last 12 months and reflects long-term conditions that affect streamflow, reservoirs and groundwater.
What is the difference between SPI and SPEI?
SPI uses precipitation only. SPEI (Vicente-Serrano et al., 2010) uses precipitation minus potential evapotranspiration, so it also captures the effect of rising temperature on drought. SPEI is preferred when warming is important; SPI is simpler and needs only rainfall.
References
McKee, T. B., Doesken, N. J., & Kleist, J. (1993). The relationship of drought frequency and duration to time scales. Proceedings of the 8th Conference on Applied Climatology, American Meteorological Society, 179–184.
World Meteorological Organization (2012). Standardized Precipitation Index User Guide (M. Svoboda, M. Hayes and D. Wood). WMO-No. 1090, Geneva.
Thom, H. C. S. (1958). A note on the gamma distribution. Monthly Weather Review, 86(4), 117–122.
Edwards, D. C., & McKee, T. B. (1997). Characteristics of 20th century drought in the United States at multiple time scales. Climatology Report 97-2, Colorado State University.
Guttman, N. B. (1999). Accepting the standardized precipitation index: a calculation algorithm. Journal of the American Water Resources Association, 35(2), 311–322.
Vicente-Serrano, S. M., Beguería, S., & López-Moreno, J. I. (2010). A multiscalar drought index sensitive to global warming: the standardized precipitation evapotranspiration index. Journal of Climate, 23(7), 1696–1718.