Written and maintained by CASRAI Editorial Board
Published
On this page
The Standardized Precipitation Index (SPI) is a drought indicator that expresses how much precipitation over a chosen period (1, 3, 6, 12 months or longer) departs from the long-term record for the same place and season, measured in standard deviations. A value of 0 is a typical period, negative values are drier than usual and positive values are wetter. SPI is calculated by fitting a probability distribution, usually the gamma, to the historical precipitation totals and transforming the cumulative probability of the observed total to a standard normal score. Its sibling, the SPEI, adds temperature through potential evapotranspiration.
What is the SPI drought indicator?
McKee and colleagues at the National Drought Mitigation Center introduced the index in 1993. The NCAR Climate Data Guide describes SPI as the standardized departure of observed precipitation from a fitted distribution, so a reading is the number of standard deviations from the long-term mean. Because only precipitation goes in, it can be computed for any station or grid cell with a long enough record, and because it is computed per timescale it can describe a dry fortnight-to-season spell (short scales) or a multi-year hydrological deficit (long scales) with the same arithmetic. The Climate Data Guide notes the 2011 Lincoln Declaration on Drought, which recommended SPI as the preferred meteorological drought index.
The same source lists the main limits. SPI has no evapotranspiration term, so it cannot register drought that develops because warming raises water demand while rainfall stays near normal. It is sensitive to the quality of the distribution fit, and it says nothing about rainfall intensity or runoff. Its strengths are the single required input, multiscalar output and comparability across climates, which the guide contrasts with the Palmer Drought Severity Index.
How is SPI calculated? Formula and symbols
The NCAR Climate Data Guide gives the definition as SPI = (P − P*) / σP in the simple case. In practice the operational procedure, described in the Ontario Ministry of Natural Resources SPI technical document (which follows the WMO user guide and the NDMC SPI program), has three steps:
- Aggregate. Sum monthly precipitation over the timescale k. A 3-month SPI for the end of September uses the July, August and September total, and is compared only with the July–September totals of every other year in the record. Totals are never compared across different seasons or intervals.
- Fit. Fit a gamma probability density function to that set of totals (Pearson Type III is an alternative named by NCAR), giving shape α and scale β.
- Transform. Compute the cumulative probability G(P) of the observed total under the fitted distribution, then convert it to the standard normal variate Z with mean 0 and variance 1. That Z is the SPI.
Symbols: P is the precipitation total for the period (mm); P* is the long-term mean of those totals; σP is their standard deviation; k is the timescale in months; α and β are the gamma shape and scale parameters; G(P) is the gamma cumulative probability; Z = Φ⁻¹(G(P)) where Φ⁻¹ is the inverse standard normal distribution function. For background see our guides to the gamma distribution and the standard normal distribution.
Timescales and how much data you need
NCAR describes timescales of 1 to 36 months, with 1, 3, 6, 12, 18, 24, 36, 48 and 60 months in routine use. Record length is where sources differ in wording: NCAR cites Guttman (1999) recommending at least 50 years, while its limitations section speaks of 30 to 50 years, and the Ontario document recommends a minimum of 20 to 30 years of monthly data with 50 to 60 or more as optimal. The consistent message is that the fitted tails, which decide how extreme an extreme looks, become reliable only with a long record. The worked example below uses 20 seasons only to keep the arithmetic visible.
Worked example with the arithmetic shown
The numbers below are an illustrative synthetic series, not observations from any station. Suppose a 3-month (July–September) precipitation total, in mm, for 20 consecutive years: 212, 168, 245, 190, 131, 224, 176, 203, 152, 238, 185, 119, 207, 196, 160, 229, 174, 142, 215, 181. The question is how unusual a new season of 150 mm is.
- Sum = 3,747 mm, so the mean P* = 3,747 / 20 = 187.35 mm.
- Sample standard deviation σP = 35.30 mm.
- Gamma fit by maximum likelihood with the location fixed at zero: α = 27.88, β = 6.72 mm.
- Cumulative probability of 150 mm under that gamma: G(150) = 0.1428, so about 14% of seasons are as dry or drier.
- SPI = Φ⁻¹(0.1428) = −1.07.
Reading the result against the Ontario classes below, −1.07 falls in the moderately dry band (−1.0 to −1.49). For comparison, the simplified z-score ignoring the fitted distribution is (150 − 187.35) / 35.30 = −1.06. The two agree closely here because the gamma with a large shape is nearly symmetric; they diverge in the tails. For 119 mm, the driest year in the series, the z-score is −1.94 while the gamma-based SPI is −2.16, and for a very wet 300 mm the z-score is +3.19 against an SPI of +2.76. That tail behaviour is why the distribution fit matters.
How to calculate deviation in rainfall
Three different numbers are often called rainfall deviation, and they answer different questions. The raw departure is P − P*: for the example, 150 − 187.35 = −37.35 mm. The percent of normal is P / P* × 100 = 150 / 187.35 × 100 = 80.1%. The standardized departure, the SPI, is −1.07. Raw departure and percent of normal depend on the local climate (37 mm is a small shortfall in a wet region and a large one in a dry region); the SPI is built so that the same value carries the same probability anywhere, which is what makes it comparable between stations.
A sourced station example
The Ontario document includes a station table for Moosonee using a gamma fit to August precipitation for 1892–2014. It maps August totals to 1-month SPI as follows: 2000, 87 mm gives 0.33; 2003, 42 mm gives −0.97; 2006, 116 mm gives 1.03; 2008, 62 mm gives −0.36; 2013, 120 mm gives 1.11; 2014, 60 mm gives −0.42. Note that 62 mm gives a lower SPI than 87 mm, and 116 mm a lower one than 120 mm: the index is a monotonic function of the total for one station and one calendar month.
Interpretation: SPI classes and return periods
The Ontario technical document reproduces the standard SPI classes. There are three wet classes, one near-normal class and three dry classes, so there are seven categories, not five.
| SPI value | Class | Approximate frequency (per the Ontario document) |
|---|---|---|
| +2.0 or more | Extremely wet | not stated |
| +1.5 to +1.99 | Very wet | not stated |
| +1.0 to +1.49 | Moderately wet | not stated |
| −0.99 to +0.99 | Near normal | about 33 in 100 years in the document’s text |
| −1.0 to −1.49 | Moderately dry | 10 in 100 years (1 in 10) |
| −1.5 to −1.99 | Severely dry | 5 in 100 years (1 in 20) |
| −2.0 or less | Extremely dry | 2.5 in 100 years (1 in 50) |
NCAR gives a consistent summary: an SPI of −1.5 or below occurs in about 6% of cases (roughly 2% extreme plus 4% severe). Always say which timescale the value refers to: a 3-month SPI of −1.6 and a 24-month SPI of −1.6 describe different water-supply situations. The SPEI project site relates short timescales to soil moisture and headwater flow, medium scales to reservoir storage and long scales to groundwater.
How do I interpret SPEI values?
SPEI is read the same way as SPI: negative values are drier than normal, positive values wetter, and 0 corresponds to a 50% cumulative probability. The difference is the input. According to the SPEI project site, the index uses the climatic water balance, precipitation minus potential evapotranspiration (PET), aggregated at the chosen scale, and fits a three-parameter log-logistic distribution (scale, shape, origin) with parameters estimated by unbiased probability weighted moments before standardizing. The class bands above are published for SPI; because both indices are standard normal scores, the ±1, ±1.5 and ±2 cutoffs correspond to the same normal-curve probabilities (cumulative probabilities of about 16%, 7% and 2% on the dry side). When reporting SPEI, state the PET method, since the SPEI site notes the index is not tied to one equation: SPEIbase version 1.0 used Thornthwaite and version 2.0 used FAO-56 Penman-Monteith.
SPI vs SPEI: what is the difference?
SPI uses precipitation alone; SPEI uses precipitation minus PET. Both are multiscalar and both express results as standardized scores, but SPEI can reflect drought driven by temperature-linked demand, which the SPEI site says SPI cannot. Where temperature varies little, the SPEI site notes the two indices are similar. In software the defaults differ too: the CRAN SPEI package documents spi() with a gamma distribution and spei() with log-logistic, both fitted by default with unbiased probability weighted moments. The data table below compares them side by side.
Assumptions and common mistakes
- Mixing seasons. A 3-month SPI is compared only with the same three calendar months in other years.
- Too short a record. The Ontario and NCAR guidance on record length (20 to 30 years minimum, 50 or more preferred) exists because extreme classes depend on the fitted tail.
- Assuming a good fit. NCAR flags sensitivity to fit quality; check the fitted distribution against the empirical one rather than accepting defaults.
- Treating SPI as a complete drought measure. It excludes evapotranspiration, intensity and runoff, so use SPEI or a water-balance index where warming matters.
- Omitting the timescale and the reference period when reporting a value.
- Quoting the simple z-score as SPI. As the worked example shows, the two differ in the tails.
How to report SPI in APA style
Report the timescale, the distribution, the reference period and the class in the text, and give the value to two decimals. An illustrative pattern, using the synthetic example above: The 3-month SPI for July–September was −1.07, a moderately dry season, based on a gamma distribution fitted to 20 seasonal totals (reference period 20 consecutive years). In a methods section add the software and version, for example the package and function used, and cite McKee et al. (1993) and the user guide you followed. Put the numeric result in a table when more than a few values are reported.
How to calculate SPI in Excel, R or Python
Each snippet reproduces the worked example (the 20 seasonal totals and a 150 mm target). The Python version was run and returned −1.07; the Excel version uses a closed-form approximation to the gamma maximum-likelihood estimates (the Thom estimator), which gives α = 27.880 and β = 6.720 on this series, matching the direct fit.
Python (scipy)
import numpy as np
from scipy import stats
x = np.array([212,168,245,190,131,224,176,203,152,238,185,119,207,196,160,229,174,142,215,181], float)
a, loc, scale = stats.gamma.fit(x, floc=0)
G = stats.gamma.cdf(150, a, scale=scale)
spi = stats.norm.ppf(G) # about -1.07
R
x = c(212,168,245,190,131,224,176,203,152,238,185,119,207,196,160,229,174,142,215,181)
fit = MASS::fitdistr(x, "gamma")
qnorm(pgamma(150, shape = fit$estimate["shape"], rate = fit$estimate["rate"]))
For a monthly series the SPEI package call is SPEI::spi(precip_series, scale = 3).
Excel
A2:A21 = seasonal totals; D1 = 150
B1 = LN(AVERAGE(A2:A21)) - SUMPRODUCT(LN(A2:A21))/COUNT(A2:A21)
B2 (alpha) = (1+SQRT(1+4*B1/3))/(4*B1)
B3 (beta) = AVERAGE(A2:A21)/B2
SPI = NORM.S.INV(GAMMA.DIST(D1, B2, B3, TRUE))
For a full monthly series at several timescales, use the SPEI package (R) or the NDMC SPI program rather than hand-fitting each calendar month. For time-series handling in the same environments see our guides to time series analysis in R and time series analysis in Python. Background on standard scores is in the z-score guide, and the probability bands above rest on percentiles and quantiles.
Frequently asked questions
What is the SPI drought indicator?
It is a standardized precipitation anomaly, expressed in standard deviations, computed for a chosen timescale from a long record. Negative values signal precipitation deficits relative to that location’s history.
How is the SPI index calculated?
Aggregate precipitation over the timescale, fit a gamma (or Pearson III) distribution to the historical totals for that season, convert the cumulative probability of the observed total to a standard normal score.
What is the difference between SPI and SPEI?
SPI uses precipitation only and, in the CRAN package, a gamma distribution. SPEI uses precipitation minus PET and a log-logistic distribution, so it responds to warming-driven water demand.
How do I interpret SPEI values?
Negative is drier, positive is wetter, 0 is the 50% cumulative probability; state the timescale and the PET method alongside the value.
What are the levels of SPI drought?
The Ontario document lists three dry classes: moderately dry (−1.0 to −1.49), severely dry (−1.5 to −1.99) and extremely dry (−2.0 or less), alongside three wet classes and a near-normal band.
How to calculate deviation in rainfall?
Subtract the long-term mean for the same period from the observed total for the raw departure, divide by the mean and multiply by 100 for percent of normal, or compute the SPI for a standardized departure.
Sources
- NCAR Climate Data Guide: Standardized Precipitation Index (SPI), checked 2026-12-03
- Ontario Ministry of Natural Resources: Standardized Precipitation Index technical document, checked 2026-12-03
- SPEI project: Standardised Precipitation-Evapotranspiration Index, checked 2026-12-03
- CRAN: SPEI package reference manual, checked 2026-12-03
- WMO-No. 1090: Standardized Precipitation Index User Guide (Svoboda, Hayes, Wood, 2012), the guide followed by the Ontario document
Data: SPI and SPEI compared: inputs, distributions and default fitting
Side-by-side comparison of the Standardized Precipitation Index and the Standardised Precipitation-Evapotranspiration Index, compiled from the NCAR Climate Data Guide, the SPEI project site and the CRAN SPEI package reference manual.
| Property | SPI | SPEI |
|---|---|---|
| Input variable | Precipitation only | Precipitation minus potential evapotranspiration (climatic water balance) |
| Distribution (CRAN SPEI package default) | Gamma | Log-logistic (three parameters: scale, shape, origin) |
| Parameter fitting (CRAN SPEI package default) | Unbiased probability weighted moments (ub-pwm) | Unbiased probability weighted moments (ub-pwm) |
| Reflects warming-driven drought | No: no evapotranspiration term | Yes: PET enters the water balance |
| PET method | Not applicable | Not tied to one equation; SPEIbase v1.0 Thornthwaite, v2.0 FAO-56 Penman-Monteith |
| Interpretation of 0 | Typical precipitation for the period | 50% cumulative probability |
| Primary reference | McKee et al. (1993) | Vicente-Serrano, Beguería and López-Moreno (2010), J. Climate 23:1696-1718 |
Sources
- NCAR Climate Data Guide: Standardized Precipitation Index (SPI) (accessed 2026-12-03)
- SPEI project: Standardised Precipitation-Evapotranspiration Index (accessed 2026-12-03)
- CRAN: SPEI package reference manual (accessed 2026-12-03)
Compiled by CASRAI from the sources above. Free to reuse under CC BY 4.0 with attribution.







