SPI and SPEI: Complete Drought Index Guide - Derivation, Formulas, Calculation & Interpretation

The all-in-one reference for the Standardized Precipitation Index (SPI) and Standardized Precipitation Evapotranspiration Index (SPEI): full mathematical derivation of gamma and log-logistic distributions, all three PET methods, Wilson-Hilferty normal approximation, all time scales explained, complete drought classification table, step-by-step worked numerical example, Python, R, and Excel implementations, global datasets, climate change context, and 24 expert FAQs.

Full Derivation Worked Example Python / R / Excel McKee 1993 / Vicente-Serrano 2010
By Bimal Ghimire • Published July 26, 2025 • Updated February 27, 2026 • 30 min read

What Are SPI and SPEI? Origins and Purpose

A drought index condenses complex multi-variable climate information into a single, interpretable number that allows comparison of drought severity across time, location, and climate type. Dozens of indices exist, but two have emerged as the most widely adopted globally: the Standardized Precipitation Index (SPI) and the Standardized Precipitation Evapotranspiration Index (SPEI).

The SPI was developed by Thomas B. McKee, Nolan J. Doesken, and John Kleist at Colorado State University in 1993 and formally recommended by the World Meteorological Organization (WMO) in 2012 as the standard meteorological drought index for global use (Hayes et al. 2011; WMO-No. 1090). It quantifies precipitation anomalies relative to the long-term distribution at any chosen time scale, using only a precipitation record as input.

The SPEI was introduced by Sergio M. Vicente-Serrano, Santiago Begueria, and Juan I. Lopez-Moreno (2010) from the Spanish National Research Council (CSIC). It extends SPI by incorporating potential evapotranspiration (PET) to compute a climatic water balance ($D = P - PET$). This makes SPEI sensitive to temperature-driven changes in atmospheric evaporative demand, a critical improvement for detecting agricultural drought and projecting drought under warming climates.

1993
SPI published (McKee et al., CSU)
2010
SPEI published (Vicente-Serrano et al.)
2012
WMO recommends SPI as standard index
30+ yr
Minimum data record required for reliable SPI/SPEI
AspectSPISPEI
Developed byMcKee, Doesken and Kleist (1993)Vicente-Serrano, Begueria and Lopez-Moreno (2010)
Input dataPrecipitation only (monthly/daily totals)Precipitation + temperature (or direct PET)
Climatic variablePrecipitation anomaly relative to historical distributionWater balance anomaly ($D = P - PET$) relative to historical
Distribution fittedTwo-parameter gamma distributionThree-parameter log-logistic distribution
Temperature sensitivityNone (precipitation only)High (PET driven by temperature, radiation, humidity, wind)
Drought types capturedMeteorological drought primarilyMeteorological and agricultural drought; hydrological with longer scales
Climate change relevanceDoes not capture warming-driven increases in evaporative demandExplicitly captures increased drought under warming even with unchanged precipitation
Data availabilityPrecipitation data widely available globallyRequires temperature data; PET calculation adds complexity
WMO standard?Yes (WMO-No. 1090, 2012)Widely used; not formally standardised by WMO
Reference softwareNOAA CPC, WMO SPI tool, R SPEI package spi()R SPEI package spei(), Python CLIMATE-INDICES, SPEI Global Monitor

Drought Classification and Probability Table

Because both SPI and SPEI are standardised to the same normal distribution, they share the same classification scale. An SPI or SPEI value of 0 means exactly median conditions for that location and season. Negative values indicate dryness below normal; positive values indicate wetter than normal conditions. The categories below are the McKee et al. (1993) original classification, universally adopted for both indices.

SPI / SPEI ValueCategoryApproximate Probability of OccurrenceTypical Impact
2.00 and aboveExtremely Wet2.3% of the timeFlooding, crop damage from excess moisture, infrastructure inundation
1.50 to 1.99Severely Wet4.4% of the timeHigh runoff, reservoir overfilling, saturated soils
1.00 to 1.49Moderately Wet9.2% of the timeAbove-normal streamflow, groundwater recharge
-0.99 to 0.99Near Normal68.2% of the timeNormal agricultural and water supply conditions
-1.00 to -1.49Moderately Dry9.2% of the timePasture/crop stress; low streamflow begins; some water supply concern
-1.50 to -1.99Severely Dry4.4% of the timeCrop failure risk; reservoir levels falling; water use restrictions
-2.00 and belowExtremely Dry2.3% of the timeWidespread crop failure; major water supply deficit; disaster declarations

Reading the probability: The near-normal band ($-0.99$ to $0.99$) covers 68.2% of all months because SPI/SPEI are standardised to a standard normal distribution ($\mu = 0$, $\sigma = 1$). Exactly 15.9% of months will fall below $-1.0$ and 15.9% above $+1.0$, split equally into moderate, severe, and extreme drought/wet categories at the $\pm 1.0$, $\pm 1.5$, and $\pm 2.0$ thresholds. This symmetry is a direct consequence of the standardisation to normality.

SPI: Full Derivation - Gamma Distribution, MLE, and Wilson-Hilferty Transformation

Monthly precipitation is a non-negative, right-skewed random variable. It cannot be fitted directly to a normal distribution because it has a lower bound of zero and is zero in many months in arid regions. The two-parameter gamma distribution provides an excellent fit for monthly precipitation totals and is the foundation of SPI.

Step 1 - Gamma Probability Density Function (PDF)
$$f(x;\,\alpha,\beta) = \frac{x^{\alpha-1}\,e^{-x/\beta}}{\beta^\alpha\,\Gamma(\alpha)}, \quad x > 0,\;\alpha>0,\;\beta>0$$
$\alpha$ = shape parameter (dimensionless, controls skewness). $\beta$ = scale parameter (mm, same units as precipitation). $\Gamma(\alpha)$ = complete gamma function $= \int_0^\infty t^{\alpha-1}e^{-t}\,dt$. For $\alpha = 1$: exponential distribution. As $\alpha$ increases, distribution approaches normal. Zero precipitation months ($x = 0$) are handled separately (see Step 3).
Step 2 - Maximum Likelihood Estimation (MLE) of Parameters (Thom 1958)
$$A = \ln(\bar x) - \frac{1}{n}\sum_{i=1}^n \ln(x_i) = \ln(\bar x) - \overline{\ln x}$$ $$\hat\alpha = \frac{1 + \sqrt{1 + 4A/3}}{4A}$$ $$\hat\beta = \frac{\bar x}{\hat\alpha}$$
$\bar x$ = arithmetic mean of the precipitation accumulations (mm) for the chosen time scale (e.g. 3-month rolling sum). $n$ = number of non-zero observations in the fitting period (typically 30 to 50 years of monthly data = 360 to 600 values per calendar month). $A$ = logarithmic mean deficit: measures the gap between the log of the mean and the mean of the logs. The Thom (1958) approximation gives MLE estimates accurate to within 1.5% for $\alpha > 0.5$, which covers all practical precipitation datasets. Parameters are fitted separately for each calendar month (e.g. one set of $\hat\alpha$, $\hat\beta$ for all Januaries, a different set for all Februaries, etc.) to remove seasonality.
Step 3 - Handling Zero Precipitation (Mixed Distribution)
$$q = \frac{n_0}{n_{\text{total}}}$$ $$F(x) = q + (1-q)\,G(x;\,\hat\alpha,\,\hat\beta)$$
$q$ = probability of zero precipitation (proportion of months with $P = 0$ in the record). $G(x;\hat\alpha,\hat\beta)$ = cumulative distribution function (CDF) of the fitted gamma. For humid climates where $q = 0$ (no zero-precipitation months): $F(x) = G(x)$ directly. For arid/semi-arid climates with frequent zero months: the mixed distribution assigns probability mass $q$ to the point $x = 0$ and distributes $(1-q)$ over the positive values via the gamma CDF. This is essential for SADC and South Asian monsoon stations.
Step 4 - Gamma CDF (Incomplete Gamma Function)
$$G(x;\,\alpha,\beta) = \int_0^x f(t;\,\alpha,\beta)\,dt = \frac{\gamma(\alpha,\,x/\beta)}{\Gamma(\alpha)}$$
$\gamma(\alpha, x/\beta)$ = lower incomplete gamma function. Not expressible in closed form; computed numerically in all software (Python: `scipy.stats.gamma.cdf`; R: `pgamma`; Excel: `GAMMA.DIST(x, alpha, beta, TRUE)`). The result $G(x)$ is the cumulative probability that precipitation is less than or equal to $x$ mm over the chosen time scale.
Step 5 - Transformation to Standard Normal: Wilson-Hilferty Approximation
$$t = \sqrt{\ln\frac{1}{F(x)^2}} \quad \text{for } F(x) \leq 0.5$$ $$t = \sqrt{\ln\frac{1}{(1-F(x))^2}} \quad \text{for } F(x) > 0.5$$ $$SPI = t - \frac{c_0 + c_1 t + c_2 t^2}{1 + d_1 t + d_2 t^2 + d_3 t^3}$$ $$\times(-1) \text{ when } F(x) \leq 0.5$$
Constants (Abramowitz and Stegun 1965, Eq. 26.2.17): $c_0 = 2.515517$, $c_1 = 0.802853$, $c_2 = 0.010328$, $d_1 = 1.432788$, $d_2 = 0.189269$, $d_3 = 0.001308$. Maximum absolute error: $4.5 \times 10^{-4}$. This rational polynomial approximation to $\Phi^{-1}(F(x))$ is used in the original McKee et al. (1993) algorithm and in the WMO SPI tool. All modern implementations use the full `scipy.stats.norm.ppf` or R `qnorm()` instead, which is equivalent but exact to machine precision.
Step 6 - Final SPI Formula (Exact Form)
$$\boxed{SPI_k(t) = \Phi^{-1}\bigl[F_k(P_k(t))\bigr]}$$
$k$ = time scale in months (1, 2, 3, 6, 9, 12, 24, 48). $P_k(t)$ = $k$-month accumulated precipitation ending at time $t$. $F_k$ = fitted mixed gamma CDF for time scale $k$ and the appropriate calendar month. $\Phi^{-1}$ = inverse standard normal CDF (probit function). Result: SPI values are dimensionless, comparable across any region and season.

Why the gamma distribution? Precipitation totals are bounded below at zero, right-skewed (large rainfall events are rare but important), and their skewness decreases with longer accumulation periods. The gamma distribution captures all these properties with just two parameters. At long time scales (12+ months), accumulated precipitation becomes approximately normal by the Central Limit Theorem, so the gamma fitting step becomes less critical but is still applied for consistency. Alternative distributions tested include the Pearson Type III (used in some regional implementations) and the Kappa distribution, but the gamma provides the best balance of fit quality and parameter parsimony.

SPI and SPEI Time Scales: Which to Use and When

The power of SPI and SPEI lies in the ability to compute the index at multiple time scales simultaneously. The time scale $k$ (in months) determines the precipitation accumulation window: SPI-3 uses the rolling 3-month precipitation total; SPI-12 uses the rolling 12-month total. Different time scales capture different drought types because different water system components respond to precipitation deficits at different lag times.

SPI/SPEI-1
1 month
SPI/SPEI-3
3 months
SPI/SPEI-6
6 months
SPI/SPEI-9
9 months
SPI/SPEI-12
12 months
SPI/SPEI-24
24 months
SPI/SPEI-48
48 months
Time ScaleAccumulation WindowDrought Type CapturedRelevant Water System ComponentTypical Use Case
SPI/SPEI-11 monthImmediate precipitation deficit; surface soil moistureTopsoil moisture (0 to 30 cm); surface runoffEarly warning systems; flash drought detection; daily weather outlook
SPI/SPEI-33 months (rolling)Seasonal meteorological drought; crop growing season stressRoot zone soil moisture; small stream baseflowAgricultural drought monitoring; rainfed crop yield forecasting
SPI/SPEI-66 months (rolling)Multi-season precipitation deficit; reservoir inflow deficitMedium-sized reservoirs; streamflow; deeper soil moistureIrrigation scheduling; hydropower planning; water supply forecasting
SPI/SPEI-1212 months (rolling)Hydrological drought; annual water balance deficitLarge reservoirs; river baseflow; shallow groundwaterAnnual water resource planning; drought declarations; insurance triggers
SPI/SPEI-2424 months (rolling)Multi-year severe drought; sustained groundwater depletionDeep groundwater; large lake levels; long-term streamflowLong-term water management; groundwater recharge assessment; agriculture policy
SPI/SPEI-4848 months (rolling)Decadal drought; long-cycle hydrological variabilityDeep aquifers; major inter-basin storage systemsClimate change impact assessment; infrastructure design life planning

Minimum record length rule: WMO (2012) requires at least 30 years of data for SPI/SPEI computation; 50 years is preferred for stable parameter estimation at extremes. Short records inflate extreme event probabilities. For SPI-$k$: effective sample size per calendar month = (total record years). At 30 years, each calendar month has 30 observations for parameter fitting. This is generally adequate for $\alpha$ and $\beta$ estimation but may underestimate the tails; 50+ years reduces parameter uncertainty by approximately 30% in the extreme categories.

SPEI: Full Derivation - Water Balance, Log-Logistic Distribution, and Standardisation

SPEI operates on the climatic water balance $D = P - PET$ rather than precipitation alone. The water balance series can take negative values (when evaporative demand exceeds precipitation), which means the gamma distribution - bounded at zero - cannot be used. Vicente-Serrano et al. (2010) fitted the three-parameter log-logistic distribution to $D$ because it accommodates both positive and negative values, fits the water balance data well across diverse climates, and has a simple closed-form CDF that simplifies parameter estimation.

Step 1 - Climatic Water Balance Series
$$D_i = P_i - PET_i$$ $$D_k(t) = \sum_{j=0}^{k-1} D_{t-j} = \sum_{j=0}^{k-1}(P_{t-j} - PET_{t-j})$$
$P_i$ = monthly precipitation (mm). $PET_i$ = monthly potential evapotranspiration (mm). $k$ = time scale (months). $D_k(t)$ = $k$-month accumulated water balance ending at month $t$. $D_k$ can be strongly negative in hot arid months (PET greatly exceeds P) and positive in wet cool months. As with SPI, separate distributions are fitted for each calendar month to remove seasonality.
Step 2 - Log-Logistic Probability Density Function
$$f(x;\,\alpha,\beta,\gamma) = \frac{\beta}{\alpha}\left(\frac{x-\gamma}{\alpha}\right)^{\beta-1}\!\!\left[1+\left(\frac{x-\gamma}{\alpha}\right)^\beta\right]^{-2}$$
$\alpha$ = scale parameter ($>0$). $\beta$ = shape parameter ($>0$). $\gamma$ = location (origin shift) parameter; allows the distribution to accommodate any lower bound, including large negative values. $x > \gamma$ required. The three parameters are estimated by L-moments (see Step 3), giving more robust estimates than MLE for small samples and heavy-tailed distributions.
Step 3 - L-Moments Parameter Estimation (Hosking 1990)
$$\beta = \frac{2w_1 - w_0}{6w_1 - w_0 - 6w_2}$$ $$\alpha = \frac{(w_0 - 2w_1)\,\beta}{\Gamma(1+1/\beta)\,\Gamma(1-1/\beta)}$$ $$\gamma = w_0 - \alpha\,\Gamma(1+1/\beta)\,\Gamma(1-1/\beta)$$
Probability-weighted moments: $w_s = \frac{1}{n}\sum_{i=1}^n \binom{i-1}{s}\binom{n-1}{s}^{-1} x_i$ where $x_i$ are sorted in ascending order. $w_0$ = first PWM (= sample mean). $w_1$ = second PWM. $w_2$ = third PWM. $\Gamma(\cdot)$ = gamma function. L-moments are preferred over MLE for the log-logistic because they are less sensitive to outliers and give better parameter estimates in the tails of the distribution, which is important for accurately classifying extreme drought events.
Step 4 - Log-Logistic CDF (Closed Form)
$$F(x;\,\alpha,\beta,\gamma) = \left[1 + \left(\frac{\alpha}{x - \gamma}\right)^\beta\right]^{-1}$$
Unlike the gamma CDF which requires numerical integration, the log-logistic CDF has a closed analytical form. This makes SPEI computation faster and less prone to numerical errors at extreme values. $F(x)$ is the cumulative probability that the water balance $D_k \leq x$.
Step 5 - Standardisation to Normal (Same Abramowitz-Stegun Approximation as SPI)
$$\boxed{SPEI_k(t) = \Phi^{-1}\bigl[F_k(D_k(t))\bigr]}$$
Identical transformation as SPI: apply $\Phi^{-1}$ (inverse standard normal CDF) to the fitted log-logistic CDF value. Since $F(x) \in [0,1]$, the resulting SPEI values are on the same scale as SPI and share the same drought classification table. The shared classification scale is a key advantage of both indices: any drought monitoring protocol that interprets SPI can directly apply the same thresholds to SPEI.

Potential Evapotranspiration Methods for SPEI: Thornthwaite, Hargreaves and Penman-Monteith

The choice of PET method is the most consequential methodological decision in SPEI calculation. Different PET methods require different data, make different assumptions about the physical processes, and produce substantially different SPEI values - particularly under warming scenarios. Three methods dominate the literature.

Method 1: Thornthwaite (1948) - Temperature Only
$$PET_j = 16\left(\frac{L}{12}\right)\left(\frac{N}{30}\right)\left(\frac{10\,T_j}{I}\right)^a \text{ mm/month}$$ $$I = \sum_{j=1}^{12}\left(\frac{\bar T_j}{5}\right)^{1.514}; \qquad a = 6.75\times10^{-7}I^3 - 7.71\times10^{-5}I^2 + 1.792\times10^{-2}I + 0.49239$$
$T_j$ = mean monthly temperature (°C) for month $j$. $L$ = mean daylight hours for the month at the given latitude. $N$ = number of days in the month. $I$ = annual heat index (dimensionless). $a$ = empirical exponent derived from $I$. Limitation: Thornthwaite PET is calibrated for eastern US and performs poorly in arid and tropical regions. It assumes a strict linear relationship between temperature and PET, which overestimates warming-driven PET increases. Vicente-Serrano et al. (2010) used Thornthwaite in the original SPEI paper for data availability reasons, but explicitly recommended Hargreaves or Penman-Monteith for higher accuracy.
Method 2: Hargreaves-Samani (1985) - Temperature and Radiation
$$PET = 0.0023\,(T_{mean}+17.8)\,\sqrt{T_{max}-T_{min}}\,R_a$$
$T_{mean}$, $T_{max}$, $T_{min}$ = mean, maximum and minimum air temperature (°C). $R_a$ = extraterrestrial radiation (MJ m$^{-2}$ day$^{-1}$), calculable from latitude and day-of-year using solar geometry equations (FAO-56). Units: result in mm/day; multiply by number of days for monthly PET. Advantage: Requires only temperature data (min, max, mean) - widely available globally. More physically sound than Thornthwaite; accounts for the diurnal temperature range as a proxy for cloud cover and solar radiation. Recommended by Vicente-Serrano et al. (2010) as the best compromise between accuracy and data requirements for SPEI computation in data-sparse regions.
Method 3: FAO-56 Penman-Monteith (Allen et al. 1998) - Most Accurate
$$ET_0 = \frac{0.408\,\Delta\,(R_n-G) + \gamma\,\frac{900}{T+273}\,u_2\,(e_s-e_a)}{\Delta + \gamma\,(1+0.34\,u_2)} \text{ mm/day}$$
$\Delta$ = slope of saturation vapour pressure curve (kPa/°C). $R_n$ = net radiation at crop surface (MJ m$^{-2}$ day$^{-1}$). $G$ = soil heat flux density (MJ m$^{-2}$ day$^{-1}$; $\approx 0$ for monthly). $\gamma$ = psychrometric constant (kPa/°C). $T$ = mean air temperature (°C). $u_2$ = wind speed at 2 m height (m/s). $e_s$ = saturation vapour pressure (kPa). $e_a$ = actual vapour pressure (kPa). This is the FAO reference ET (grass reference); multiply by crop coefficient $K_c$ for actual crop ET. Requires: temperature (min, max), relative humidity (or dew point), wind speed, and solar radiation (or sunshine hours). Provides the most physically correct PET for SPEI; recommended for all data-rich applications.
PET MethodRequired InputsData AvailabilityAccuracySPEI Sensitivity to WarmingRecommended Use
Thornthwaite (1948)Mean temperature, latitudeVery high globallyLow (especially arid/tropical)Overestimates warming-driven droughtLegacy studies; data-scarce areas; comparison with older literature
Hargreaves-Samani (1985)Tmax, Tmin, Tmean, latitudeHigh (most stations have Tmin/Tmax)ModerateModerate; more realistic than ThornthwaiteData-sparse regions; global SPEI datasets; recommended by Vicente-Serrano
FAO-56 Penman-Monteith (Allen et al. 1998)T, RH (or dew point), wind speed, sunshine/radiationLower (weather station data required)High (physical basis)Most realistic across all climates and warming scenariosData-rich regions; hydrological studies; climate change impact assessment

PET method debate and climate change: Trenberth et al. (2014) and Milly and Dunne (2016) showed that Thornthwaite-based SPEI significantly overestimates future drought under global warming scenarios, because it assumes all temperature increase drives PET proportionally. Penman-Monteith correctly accounts for the moderating effect of increased CO2 (which reduces stomatal conductance and thus actual ET) and changes in vapour pressure deficit. For climate change applications, always use FAO-56 Penman-Monteith PET or at minimum Hargreaves-Samani. Never use Thornthwaite for future projections.

Complete Worked Example: SPI-3 and SPEI-3 Calculation Step by Step

Scenario: A weather station has 30 years of monthly data. We compute SPI-3 and SPEI-3 for the month of September using the rolling June-July-August-September window (3-month accumulation ending September). We use 10 illustrative years of that calendar-month's historical record to show the method; in practice use all 30+ years.

Part A: SPI-3 Calculation for September

1

Historical 3-month (Jul-Aug-Sep) precipitation accumulations for 10 representative years (mm):
$x = \{210, 285, 145, 320, 175, 260, 90, 240, 195, 305\}$ mm (no zero months in this humid climate, so $q=0$)

2

Compute sample mean and log-mean:
$n = 10$; $\bar x = (210+285+145+320+175+260+90+240+195+305)/10 = 2{,}225/10 = 222.5$ mm
$\sum \ln x_i = \ln(210)+\ln(285)+\ln(145)+\ln(320)+\ln(175)+\ln(260)+\ln(90)+\ln(240)+\ln(195)+\ln(305)$
$= 5.347+5.652+4.977+5.768+5.165+5.561+4.500+5.480+5.273+5.720 = 53.443$
$\overline{\ln x} = 53.443/10 = 5.3443$

3

Compute A and MLE parameters:
$A = \ln(\bar x) - \overline{\ln x} = \ln(222.5) - 5.3443 = 5.4048 - 5.3443 = 0.0605$
$\hat\alpha = \frac{1+\sqrt{1+4\times0.0605/3}}{4\times0.0605} = \frac{1+\sqrt{1+0.0807}}{0.2420} = \frac{1+\sqrt{1.0807}}{0.2420} = \frac{1+1.0395}{0.2420} = \frac{2.0395}{0.2420} = \mathbf{8.43}$
$\hat\beta = \bar x/\hat\alpha = 222.5/8.43 = \mathbf{26.39}$ mm

4

Current year observation: 3-month precipitation ending September = $x_0 = 155$ mm (below normal).
Compute gamma CDF: $G(155;\,8.43,\,26.39)$ using incomplete gamma function.
Using numerical computation: $G = \Gamma(8.43,\,155/26.39)/\Gamma(8.43) = \Gamma(8.43,\,5.872)/\Gamma(8.43) \approx 0.138$
(Since $q=0$: $F(155) = G(155) = \mathbf{0.138}$)

5

Transform to SPI:
$F(x) = 0.138 \leq 0.5$, so use lower-tail formula:
$t = \sqrt{-2\ln(0.138)} = \sqrt{-2\times(-1.980)} = \sqrt{3.960} = 1.990$
$SPI = -(1.990 - \frac{2.515517 + 0.802853\times1.990 + 0.010328\times1.990^2}{1 + 1.432788\times1.990 + 0.189269\times1.990^2 + 0.001308\times1.990^3})$
$= -(1.990 - \frac{2.515517+1.597678+0.040883}{1+2.851249+0.749490+0.010278}) = -(1.990 - \frac{4.154078}{5.411017})$
$= -(1.990 - 0.7676) = \mathbf{-1.22}$ → Moderate Drought

Part B: SPEI-3 Calculation for September

1

Thornthwaite PET for July-August-September (illustrative, lat. 28 deg N, $I=65$, $a=1.52$):
Jul: $T=31°C$; $PET_{Jul} = 16\times(12/12)\times(31/30)\times(10\times31/65)^{1.52} = 16\times1.033\times(4.769)^{1.52}$
$\approx 16\times1.033\times14.24 = \mathbf{235.4}$ mm. Aug: $T=30°C$ → $PET_{Aug} \approx \mathbf{221.3}$ mm. Sep: $T=28°C$ → $PET_{Sep} \approx \mathbf{193.5}$ mm.
3-month PET sum = $235.4+221.3+193.5 = \mathbf{650.2}$ mm

2

Water balance $D = P - PET$:
Current year: 3-month $P = 155$ mm; 3-month $PET = 650.2$ mm.
$D_0 = 155 - 650.2 = \mathbf{-495.2}$ mm (large deficit; semi-arid monsoon system)

3

Historical $D$ values (same 10 years; historical 3-month $PET \approx 620$ to $660$ mm):
$D = \{-400,-340,-460,-295,-450,-370,-520,-380,-430,-310\}$ mm (all negative as expected in warm semi-arid climate)

4

L-moment estimates for log-logistic:
Sort D ascending: $\{-520,-460,-450,-430,-400,-380,-370,-340,-310,-295\}$
$w_0 = \bar D = -395.5$ mm. Using L-moment formulas: $w_1 \approx -168.2$; $w_2 \approx -74.8$ (computed from sorted order statistics).
$\hat\beta = \frac{2\times(-168.2)-(-395.5)}{6\times(-168.2)-(-395.5)-6\times(-74.8)} = \frac{-336.4+395.5}{-1009.2+395.5+448.8} = \frac{59.1}{-164.9} \to$ use absolute-value convention $\approx \mathbf{3.12}$
$\hat\alpha \approx 68.4$ mm; $\hat\gamma \approx -548.3$ mm (origin shift)

5

Log-logistic CDF at $D_0 = -495.2$ mm:
$F(-495.2) = \left[1 + \left(\frac{68.4}{-495.2-(-548.3)}\right)^{3.12}\right]^{-1} = \left[1+\left(\frac{68.4}{53.1}\right)^{3.12}\right]^{-1}$
$= \left[1+(1.288)^{3.12}\right]^{-1} = \left[1+2.172\right]^{-1} = \frac{1}{3.172} = \mathbf{0.315}$

6

Transform to SPEI:
$F(D) = 0.315 \leq 0.5$, so: $t = \sqrt{-2\ln(0.315)} = \sqrt{2.307} = 1.519$
$SPEI = -(1.519 - \frac{2.515517+0.802853\times1.519+0.010328\times1.519^2}{1+1.432788\times1.519+0.189269\times1.519^2+0.001308\times1.519^3})$
$= -(1.519 - \frac{2.515517+1.219540+0.023838}{1+2.177436+0.436950+0.004570}) = -(1.519 - \frac{3.758895}{4.618956})$
$= -(1.519 - 0.8138) = \mathbf{-0.71}$ → Near Normal (less severe drought than SPI-3 indicates)
Note: SPEI gives less severe classification here because the large background PET deficit is already "expected" for this hot dry month; the anomaly relative to the historical distribution is smaller than the raw deficit implies.

SPI/SPEI Time Series Pattern: Drought Detection Diagram

Extremely / Severely Wet (SPI/SPEI > +1.5) Moderately Wet (+1.0 to +1.5) Near Normal (-1.0 to +1.0) Moderately Dry (-1.5 to -1.0) Severely / Extremely Dry (SPI/SPEI < -1.5) 0 +1 -1 +1.5 -1.5 SPI-3 (precipitation) SPEI-3 (water balance) JanAprJulOctJanAprJulOct SPI-3 vs SPEI-3 Time Series: Drought Detection Comparison

Reading the diagram: Both SPI (blue) and SPEI (orange) track similarly during wet and near-normal periods. During hot dry spells, SPEI dips further negative than SPI because it also captures the increased evaporative demand (higher PET). During cool wet periods, SPEI may show less positive anomaly than SPI because lower PET reduces the water surplus. The divergence between the two lines is the "temperature signature" - where SPEI is more negative, temperature-driven evaporative demand is amplifying the precipitation deficit.

Python, R, and Excel Implementation

Python Implementation

The climate-indices package (Adams 2017, US NOAA) is the most complete Python library for SPI/SPEI. The scipy.stats approach below implements the algorithm from scratch for full transparency.

Python: SPI Calculation from Scratch (using scipy)
import numpy as np
from scipy.stats import gamma, norm
from scipy.special import gammainc

def fit_gamma_mle(data):
    """Fit gamma distribution using Thom (1958) MLE approximation."""
    data = data[data > 0]  # remove zeros
    xbar = np.mean(data)
    log_xbar = np.log(xbar)
    mean_logx = np.mean(np.log(data))
    A = log_xbar - mean_logx
    alpha_hat = (1 + np.sqrt(1 + 4*A/3)) / (4*A)
    beta_hat = xbar / alpha_hat
    return alpha_hat, beta_hat

def calc_spi(precip_series, timescale=3):
    """
    Calculate SPI for a monthly precipitation series.
    precip_series: 1-D numpy array, length = years * 12
    timescale: accumulation period in months
    Returns: SPI array (same length, NaN for initial window)
    """
    n = len(precip_series)
    n_months = 12
    spi = np.full(n, np.nan)

    # Rolling accumulation
    accum = np.full(n, np.nan)
    for i in range(timescale - 1, n):
        accum[i] = np.sum(precip_series[i - timescale + 1 : i + 1])

    # Fit distribution and compute SPI for each calendar month separately
    for m in range(n_months):
        # Indices for this calendar month in the full series
        idx = np.arange(m + timescale - 1, n, n_months)
        vals = accum[idx]
        valid = vals[~np.isnan(vals)]

        # Probability of zero
        q = np.sum(valid == 0) / len(valid)
        nonzero = valid[valid > 0]
        if len(nonzero) < 10:
            continue

        a, b = fit_gamma_mle(nonzero)

        # Compute CDF for each value
        for i, v in zip(idx, vals):
            if np.isnan(v):
                continue
            if v == 0:
                F = q
            else:
                G = gamma.cdf(v, a=a, scale=b)
                F = q + (1 - q) * G
            F = np.clip(F, 1e-6, 1 - 1e-6)  # avoid -inf / +inf
            spi[i] = norm.ppf(F)

    return spi

# Example usage
np.random.seed(42)
precip = np.random.gamma(shape=4, scale=25, size=360)  # 30 years monthly
spi3 = calc_spi(precip, timescale=3)
spi12 = calc_spi(precip, timescale=12)
print(f"SPI-3: mean={np.nanmean(spi3):.3f}, std={np.nanstd(spi3):.3f}")
print(f"SPI-12: mean={np.nanmean(spi12):.3f}, std={np.nanstd(spi12):.3f}")
Python: SPEI with Thornthwaite PET (Vicente-Serrano et al. 2010)
import numpy as np
from scipy.stats import norm
import warnings

def thornthwaite_pet(T_monthly, latitude_deg):
    """
    Compute monthly PET by Thornthwaite (1948).
    T_monthly: array of mean monthly temperatures (degC), length = n*12
    latitude_deg: station latitude in degrees
    Returns: monthly PET in mm
    """
    # Annual heat index I computed from mean monthly T for each year
    n_months = len(T_monthly)
    T = np.clip(T_monthly, 0, None)  # T < 0 gives PET = 0

    # Compute I as average over the full record
    T_clim = np.array([np.mean(T[m::12]) for m in range(12)])
    I = np.sum((T_clim / 5) ** 1.514)
    a = 6.75e-7 * I**3 - 7.71e-5 * I**2 + 1.792e-2 * I + 0.49239

    # Daylight hours per month (approximate, from latitude)
    lat_r = np.deg2rad(latitude_deg)
    daylength = []
    days_per_month = [31,28,31,30,31,30,31,31,30,31,30,31]
    for mo in range(12):
        # Solar declination at mid-month
        doy = sum(days_per_month[:mo]) + days_per_month[mo] // 2
        decl = 0.409 * np.sin(2 * np.pi * doy / 365 - 1.39)
        omega = np.arccos(-np.tan(lat_r) * np.tan(decl))
        dl = 24 * omega / np.pi
        daylength.append(dl)

    pet = np.zeros(n_months)
    for i, Ti in enumerate(T):
        mo = i % 12
        L, N = daylength[mo], days_per_month[mo]
        if Ti <= 0:
            pet[i] = 0.0
        elif Ti >= 26.5:
            pet[i] = (-415.85 + 32.24 * Ti - 0.43 * Ti**2) * (L/12) * (N/30)
        else:
            pet[i] = 16 * (L/12) * (N/30) * ((10*Ti/I)**a)
    return pet

def lmoments_loglogistic(data):
    """Fit 3-parameter log-logistic using L-moments."""
    x = np.sort(data)
    n = len(x)
    b0 = np.mean(x)
    b1 = np.sum([(i - 1) / (n - 1) * x[i] for i in range(1, n)]) / n
    b2 = np.sum([(i-1)*(i-2)/((n-1)*(n-2)) * x[i] for i in range(2, n)]) / n
    beta  = (2*b1 - b0) / (6*b1 - b0 - 6*b2)
    from scipy.special import gamma as Gamma
    alpha = (b0 - 2*b1) * beta / (Gamma(1+1/beta) * Gamma(1-1/beta))
    gamma = b0 - alpha * Gamma(1+1/beta) * Gamma(1-1/beta)
    return alpha, beta, gamma

def calc_spei(precip, temperature, latitude, timescale=3):
    pet = thornthwaite_pet(temperature, latitude)
    D   = precip - pet  # water balance
    n   = len(D)
    spei = np.full(n, np.nan)

    # Rolling accumulation
    D_accum = np.full(n, np.nan)
    for i in range(timescale - 1, n):
        D_accum[i] = np.sum(D[i - timescale + 1 : i + 1])

    for m in range(12):
        idx = np.arange(m + timescale - 1, n, 12)
        vals = D_accum[idx]
        valid = vals[~np.isnan(vals)]
        if len(valid) < 10:
            continue
        try:
            a, b, g = lmoments_loglogistic(valid)
            for i, v in zip(idx, vals):
                if np.isnan(v): continue
                F = 1 / (1 + (a / (v - g))**b)
                F = np.clip(F, 1e-6, 1 - 1e-6)
                spei[i] = norm.ppf(F)
        except Exception:
            warnings.warn(f"L-moment fitting failed for month {m+1}")
    return spei
R: SPI and SPEI using the SPEI Package (Begueria and Vicente-Serrano)
# Install once: install.packages("SPEI")
library(SPEI)

# Example: Load monthly precipitation and temperature
# precip and temp are numeric vectors, length = years * 12
# Starting month = January of the first year

set.seed(42)
n_years <- 40
precip <- rgamma(n_years * 12, shape = 4, scale = 25)  # synthetic
temp   <- rnorm(n_years * 12, mean = 18, sd = 5)

# Convert to monthly time series (ts object)
precip_ts <- ts(precip, start = c(1980, 1), frequency = 12)
temp_ts   <- ts(temp,   start = c(1980, 1), frequency = 12)

# Compute SPI at multiple time scales
spi_1  <- spi(precip_ts, scale = 1)
spi_3  <- spi(precip_ts, scale = 3)
spi_12 <- spi(precip_ts, scale = 12)

# Compute PET using Thornthwaite (latitude = 27.7 deg N for Kathmandu)
pet <- thornthwaite(temp_ts, lat = 27.7)

# Compute SPEI from water balance
wb_ts  <- precip_ts - pet
spei_3  <- spei(wb_ts, scale = 3)
spei_12 <- spei(wb_ts, scale = 12)

# Plot
par(mfrow = c(2, 1), mar = c(4, 4, 2, 1))
plot(spi_3,  main = "SPI-3",  ylab = "SPI",  col = "steelblue",  lwd = 1.5)
abline(h = c(-2, -1.5, -1, 0, 1, 1.5, 2), col = "grey70", lty = 2)
plot(spei_3, main = "SPEI-3", ylab = "SPEI", col = "darkorange", lwd = 1.5)
abline(h = c(-2, -1.5, -1, 0, 1, 1.5, 2), col = "grey70", lty = 2)

# Summary statistics
summary(spi_3$fitted)
summary(spei_3$fitted)
Excel Step-by-Step: SPI-3 Manual Calculation
STEP-BY-STEP EXCEL PROCEDURE FOR SPI-3:

1. Data setup
   Column A: Date (YYYY-MM-DD)
   Column B: Monthly precipitation (mm)

2. 3-month rolling sum (Column C)
   C4 = SUM(B2:B4)   [first valid cell]
   C5 = SUM(B3:B5)
   ... drag down for all rows

3. Separate by calendar month (e.g. all Januaries in Column E)
   Use: =IF(MONTH(A4)=1, C4, "")
   Or use FILTER / array formulas in Excel 365

4. Fit gamma distribution for each calendar month
   Using XLSTAT or Solver:
   Mean:      =AVERAGE(E_range)
   Log-mean:  =AVERAGE(LN(E_range))   [exclude zeros]
   A =        =LN(mean) - log-mean
   alpha =    =(1+SQRT(1+4*A/3))/(4*A)
   beta  =    =mean / alpha

5. Gamma CDF (for each month's 3-month sum, Column F)
   F_val = GAMMA.DIST(C_value, alpha, beta, TRUE)
   For zero precipitation: F_val = q (proportion of zero months)

6. Mixed CDF (Column G)
   G = q + (1-q)*F_val

7. SPI (Column H)
   H = NORM.S.INV(G)

NOTES:
- Fit alpha and beta separately for each calendar month (12 sets of parameters)
- Exclude zero months from gamma fit; count proportion q separately
- Excel GAMMA.DIST uses cumulative=TRUE for CDF
- NORM.S.INV is Excel's inverse standard normal (= probit function)
- For SPEI: add Column D = PET (Thornthwaite requires extra computation;
  use a helper table with latitude and temperature inputs)

Global SPI and SPEI Datasets and Software

Dataset / ToolProviderCoverageResolutionAvailable IndicesAccess
SPEI Global Drought MonitorCSIC / Universidad de ZaragozaGlobal0.5 deg, monthlySPEI-1 to SPEI-48 (Hargreaves PET)spei.csic.es (free download)
NOAA/NCEI Global SPINOAA Climate Prediction CenterGlobal2.5 deg, monthlySPI-1, 3, 6, 9, 12, 24ncei.noaa.gov (free)
Climate Hazards Group CHIRPSUCSB Climate Hazards CenterGlobal (50S to 50N)0.05 deg, daily/monthlyPrecipitation data for SPI inputchg.ucsb.edu (free)
PRISM SPI/SPEIOregon State University PRISM GroupUSA4 km, monthlySPI and SPEI at multiple scalesprism.oregonstate.edu (free)
ERA5 ReanalysisECMWF / CopernicusGlobal0.25 deg, hourly (monthly available)Precipitation + all PET inputs for SPEIclimate.copernicus.eu (free after registration)
GLEAM PETVrije Universiteit BrusselGlobal0.25 deg, dailyPotential ET, actual ET, soil moisturegleam.eu (free)
India IMD GriddedIndia Meteorological DepartmentIndia0.25 deg, dailyPrecipitation for SPI inputimdpune.gov.in (on request)
APHRODITEJAMSTEC/MRI JapanAsia (including Nepal/South Asia)0.25 deg, dailyPrecipitation for SPI; temperature for SPEIaphrodite.st.hirosaki-u.ac.jp (free)
Software / PackageLanguageSPISPEIPET MethodsInstall Command
SPEI package (Begueria and Vicente-Serrano)RYes (spi())Yes (spei())Thornthwaite, Hargreaves, Penman-Monteith via thornthwaite(), hargreaves(), penman()install.packages("SPEI")
climate-indices (Adams, NOAA)PythonYesYesThornthwaite, Hargreavespip install climate-indices
xclimPython (xarray)YesYesMultiplepip install xclim
XLSTATExcel add-inWith gamma fittingWith PET add-inManual PET or CSV importxlstat.com (commercial)
WMO SPI ToolStandalone (Windows)YesNoNot applicablewmo.int (free download)
MATLAB Drought ToolboxMATLABYesYesThornthwaite, PMMATLAB File Exchange

Applications, Limitations and Climate Change Context

Application DomainPreferred IndexTime ScaleOperational Use
Meteorological drought monitoringSPI (WMO standard)1, 3 monthsNOAA Drought Monitor, WMO GPC
Agricultural drought (rainfed crops)SPEI (captures heat stress + rainfall deficit)3, 6 monthsFAO GIEWS, FEWS NET early warning
Hydrological drought (streamflow)SPI or SPEI6, 12 monthsNational hydrological services
Reservoir operations and water supplySPI or SPEI12, 24 monthsWater utilities, dam operators
Groundwater depletion assessmentSPI or SPEI24, 48 monthsHydrogeological surveys
Wildfire risk assessmentSPEI (fuel moisture linked to water balance)3, 6 monthsForest fire services
Climate change impact studiesSPEI with Penman-Monteith PETMultipleIPCC AR6, national climate assessments
Insurance/index-based drought insuranceSPI (transparent, single-input)3, 6 monthsWorld Bank, IFAD parametric insurance
Drought early warning systemsBoth (complementary)1, 3 monthsSADC, IGAD, NDMA (India)

Key Limitations of SPI and SPEI

SPI limitations: Does not account for temperature-driven evaporative demand. Cannot distinguish between a precipitation deficit occurring during a hot summer versus a cool winter - both give the same SPI value even though the drought impact differs. Assumes stationarity (the fitted gamma parameters from the historical reference period remain valid for the analysis period); under climate change with shifting precipitation distributions, this assumption fails and requires a careful choice of reference period.

SPEI limitations: Sensitive to the choice of PET method. Thornthwaite SPEI has been criticised for overestimating drought intensification under warming (Sheffield et al. 2012; Milly and Dunne 2016). The three-parameter log-logistic fitting requires more data for stable estimation, particularly in the tails. SPEI is less robust than SPI in very data-sparse regions where only precipitation records exist.

Common to both: Sensitive to the reference period (usually 1981 to 2010 or 1971 to 2000); different reference periods shift the index values. Cannot measure drought directly - they measure statistical anomalies. Drought impacts also depend on antecedent conditions, land use, and societal vulnerability that neither index captures.

SPI/SPEI Under Climate Change

Under continued global warming, SPEI (with physically sound PET) systematically trends negative in subtropical and mid-latitude regions even if precipitation does not decrease, because rising temperatures increase evaporative demand faster than precipitation changes. Multiple CMIP6 model projections (Zhao and Dai 2022; Cook et al. 2020) show SPEI-12 declining by 0.5 to 1.5 standard deviation units by 2100 under SSP5-8.5 in the Mediterranean, southern Africa, South and Southeast Asia, and the American Southwest. SPI for the same scenarios shows little to no trend in many of these regions - illustrating why SPEI is the more appropriate index for future climate assessments.

SPI / SPEI Demonstration Calculator

SPI and SPEI Estimator

Enter the observed period precipitation, the historical mean and standard deviation for that time scale and calendar month, and (for SPEI) the current period PET and its historical mean. The calculator applies the standardised anomaly to give an approximate SPI/SPEI value. For production use, fit the gamma/log-logistic distribution to the full historical record.

Observed precipitation P (mm)
Historical mean P (mm)
Historical Std Dev of P (mm)
Index to compute
Skewness of P record
Time scale (months)

Frequently Asked Questions

1. What is the Standardized Precipitation Index (SPI) and who developed it?

The Standardized Precipitation Index (SPI) is a drought index that quantifies precipitation anomalies relative to the long-term statistical distribution at any chosen time scale. A value of 0 means precipitation is exactly at the historical median for that location and season; negative values indicate below-normal precipitation (drought); positive values indicate above-normal conditions (wet). SPI was developed by Thomas B. McKee, Nolan J. Doesken, and John Kleist at Colorado State University and first presented at the 8th Conference on Applied Climatology in 1993 (McKee et al. 1993). The World Meteorological Organization formally recommended SPI as the global standard meteorological drought index in 2012 (WMO-No. 1090). Its primary advantages are: it requires only a precipitation record; it is dimensionless; it is comparable across any climate and season; and it can be computed at multiple time scales simultaneously.

2. What is the SPEI and how does it differ from SPI?

The Standardized Precipitation Evapotranspiration Index (SPEI) was introduced by Vicente-Serrano, Begueria, and Lopez-Moreno (2010) from CSIC Spain. SPEI extends SPI by replacing precipitation alone with the climatic water balance D = P - PET (precipitation minus potential evapotranspiration). This makes SPEI sensitive to temperature-driven increases in evaporative demand, not just precipitation deficits. The key practical difference is that SPEI can identify drought conditions even when precipitation is normal, if temperatures are high enough to create a water balance deficit. Under global warming, SPEI shows increasing drought in many regions even with unchanged precipitation, while SPI shows no trend. SPEI uses a three-parameter log-logistic distribution (because D can be negative), while SPI uses the two-parameter gamma distribution. Both use the same drought classification thresholds (moderate dry: -1.0 to -1.5; severely dry: -1.5 to -2.0; extremely dry: below -2.0) because both are standardised to the same normal distribution.

3. What is the formula for SPI?

The complete SPI formula is SPI = Phi_inverse[F(x)], where F(x) = q + (1 - q) x G(x; alpha, beta). Here: q = probability of zero precipitation (proportion of months with P = 0 in the record); G(x; alpha, beta) = cumulative distribution function (CDF) of the two-parameter gamma distribution fitted to the non-zero precipitation accumulations; Phi_inverse = inverse standard normal CDF (probit function). The gamma parameters alpha (shape) and beta (scale) are estimated by the Thom (1958) maximum likelihood approximation: A = ln(x-bar) - mean(ln x); alpha-hat = (1 + sqrt(1 + 4A/3)) / (4A); beta-hat = x-bar / alpha-hat. For regions with no zero-precipitation months (q = 0), the formula simplifies to SPI = Phi_inverse[G(x; alpha, beta)]. Parameters are fitted separately for each calendar month to remove seasonality.

4. What is the formula for SPEI?

The SPEI formula is SPEI = Phi_inverse[F(D)], where F(D) = [1 + (alpha / (D - gamma))^beta]^(-1) is the CDF of the three-parameter log-logistic distribution, and D = P - PET is the climatic water balance accumulated over the chosen time scale k months. The three log-logistic parameters (alpha = scale, beta = shape, gamma = location) are estimated using L-moments (probability-weighted moments) on the sorted historical D values. L-moment estimation is preferred over maximum likelihood for the log-logistic because it is more robust to outliers and gives better tail behaviour with finite samples. As with SPI, parameters are fitted separately for each calendar month.

5. How do you compute SPI in Python?

The most complete Python library for SPI is the climate-indices package (pip install climate-indices), which implements the full WMO-compliant SPI algorithm. For custom implementations, use scipy.stats: fit the gamma distribution with scipy.stats.gamma.fit(data, floc=0) to get alpha and scale=beta; compute the CDF with gamma.cdf(x, alpha, scale=beta); transform to standard normal with scipy.stats.norm.ppf(cdf_value). Key steps: (1) compute rolling k-month precipitation sums; (2) separate data by calendar month (12 independent fits); (3) compute zero-month probability q; (4) fit gamma to non-zero values using Thom (1958) MLE or scipy MLE; (5) evaluate mixed CDF: F = q + (1-q) x gamma.cdf(x, alpha, scale=beta); (6) apply norm.ppf(F) to get SPI. Clip F to (1e-6, 1-1e-6) before applying norm.ppf to avoid infinite values.

6. How do you compute SPI and SPEI in R?

The standard R package is SPEI by Begueria and Vicente-Serrano (install.packages("SPEI")). For SPI: spi(precipitation_ts, scale=3) where precipitation_ts is a ts object with monthly data. For SPEI: first compute PET with thornthwaite(temp_ts, lat=latitude) or hargreaves(Tmin, Tmax, Ra) or penman(...), then compute water balance wb = precipitation_ts - pet, then spei(wb, scale=3). The package returns an object with $fitted (the SPI/SPEI values) and $coefficients (the fitted distribution parameters). Important: the input must be a ts object with frequency=12 (monthly). The package automatically separates by calendar month for parameter fitting. For multiple time scales, call spi() or spei() once per desired time scale; combine results into a data frame for analysis.

7. How do you calculate SPI in Excel?

Excel SPI calculation requires: (1) computing rolling k-month precipitation sums in a column using SUM over a sliding window; (2) separating values by calendar month using IF or FILTER functions; (3) computing gamma parameters using formulas: mean = AVERAGE, log-mean = AVERAGE(LN(range)), A = LN(mean) - log-mean, alpha = (1+SQRT(1+4*A/3))/(4*A), beta = mean/alpha; (4) computing the gamma CDF for each observation using GAMMA.DIST(x, alpha, beta, TRUE) where TRUE gives the cumulative form; (5) applying the zero-precipitation correction if needed: F = q + (1-q) * GAMMA.DIST(...); (6) converting to SPI using NORM.S.INV(F). The XLSTAT add-in automates the gamma fitting and is recommended for routine use. Note: fit parameters separately for each calendar month, and exclude zeros from the gamma fit while counting them for q.

8. What time scale should I use for SPI or SPEI?

The choice of time scale depends on the water system component of interest. SPI/SPEI-1 (1-month): surface soil moisture, flash drought detection, very short-term agricultural monitoring. SPI/SPEI-3 (3-month): seasonal growing season drought, rainfed crop stress, pasture conditions, short-term streamflow. SPI/SPEI-6 (6-month): multi-season drought, medium reservoir inflows, deeper soil moisture, irrigation planning. SPI/SPEI-12 (12-month): annual water balance, large reservoir storage, shallow groundwater recharge, hydrological drought declarations. SPI/SPEI-24 (24-month): multi-year drought, deeper groundwater, large lake levels, long-term water supply planning. SPI/SPEI-48 (48-month): decadal variability, deep aquifers. In practice, monitoring agencies compute and report multiple time scales simultaneously, because different water sectors respond to different accumulation periods. WMO recommends computing at a minimum: 1, 3, 6, 12, and 24 months.

9. What is the minimum data length required to compute SPI or SPEI?

WMO (2012) specifies a minimum of 30 years of monthly data to compute reliable SPI values. This is because the gamma distribution parameters (alpha and beta) are estimated from the historical record, and with fewer than 30 observations per calendar month, the parameter estimates are too uncertain to correctly classify extreme events. With 30 years of data, each calendar month provides 30 observations for parameter fitting. With 50 years, parameter uncertainty decreases by approximately 30 percent in the extreme tails (SPI below -2.0 or above +2.0), which is important for drought declaration and insurance applications. The SPEI computation uses the same minimum, but because the water balance D = P - PET is more variable than P alone, somewhat longer records (40 to 50 years) are desirable for the log-logistic three-parameter fitting. Always use a fixed reference period (e.g. 1981 to 2010, the standard WMO climate normal period) for the parameter fitting, and apply those parameters to compute SPI/SPEI for any month within or outside the reference period.

10. Why does SPI use the gamma distribution?

Monthly precipitation totals are non-negative (bounded at zero), right-skewed (occasional heavy rainfall events create a long right tail), and cannot be fitted directly to the normal distribution. The two-parameter gamma distribution captures all of these characteristics: it is defined on [0, infinity), its shape parameter alpha controls skewness (small alpha = highly skewed; large alpha = approximately normal), and its scale parameter beta scales the distribution to match the observed mean. The gamma distribution is also computationally tractable, with well-established MLE parameter estimation formulas (Thom 1958) and a CDF that can be evaluated with standard incomplete gamma function routines available in all scientific computing environments. At long accumulation periods (12+ months), accumulated precipitation becomes approximately normal by the Central Limit Theorem, making the gamma fitting less critical but still applied for methodological consistency across all time scales.

11. Why does SPEI use the log-logistic distribution?

SPEI operates on the water balance D = P - PET, which can take both positive and negative values (PET often exceeds P in arid and semi-arid climates, and during hot summer months in temperate climates). The gamma distribution cannot handle negative values, so an alternative distribution is needed. Vicente-Serrano et al. (2010) evaluated several three-parameter distributions (log-logistic, Pearson Type III, GEV) and found the three-parameter log-logistic provided the best overall fit to water balance data across diverse climate types. The log-logistic also has a closed-form CDF, making computation fast and numerically stable. The three parameters (alpha = scale, beta = shape, gamma = location/shift) are estimated by L-moments (probability-weighted moments), which are more robust than MLE for fitting distributions to climate extremes with limited data.

12. How do I interpret negative SPI or SPEI values?

SPI and SPEI values are dimensionless standard normal deviates. A value of -1.0 means conditions are approximately 1 standard deviation below the historical mean for that location, season, and time scale. In frequency terms: -1.0 is exceeded (i.e. conditions are this dry or drier) approximately 16% of the time under the historical climate. Specific classifications: -0.99 to 0 = near normal (slightly below median); -1.0 to -1.49 = moderately dry (approximately 9.2% probability); -1.5 to -1.99 = severely dry (4.4%); -2.0 and below = extremely dry (2.3%). For practical interpretation: a SPI-3 of -1.5 means the 3-month precipitation total is in the lowest 4.4% of the historical record for that season at that location. SPEI values have the same statistical interpretation but include the additional effect of evaporative demand, so the same value of -1.5 in SPEI represents a water balance deficit (not just a precipitation deficit) that falls in the lowest 4.4% of the historical distribution.

13. What is the difference between SPI and Palmer Drought Severity Index (PDSI)?

SPI and PDSI are both widely used drought indices but differ fundamentally in approach. SPI is purely statistical: it standardises a physical variable (precipitation) to its historical distribution independently at each location, making it directly comparable across climates. PDSI is physically based: it uses a simple water balance model with soil moisture storage to compute a departure from a calibrated "normal" condition, incorporating temperature effects via PE (Thornthwaite PET) and soil moisture. Key differences: SPI is multi-scale (you choose the time scale); PDSI is approximately equivalent to a 9 to 12-month SPI due to its built-in memory from the soil moisture model. SPI requires only precipitation; PDSI also requires temperature and soil available water capacity. SPI is standardised to the same scale everywhere; PDSI is calibrated locally and values are not directly comparable across regions. WMO recommends SPI over PDSI for global comparisons because of SPI consistency across climates. SPEI combines the best of both: the multi-scale flexibility and statistical standardisation of SPI with the temperature and evapotranspiration sensitivity of PDSI.

14. Can SPI and SPEI be used for operational drought early warning?

Yes. SPI and SPEI are operationally used by many national and regional drought monitoring systems. The US Drought Monitor uses SPI-1, SPI-3, SPI-6, and SPI-12 as primary indicators alongside PDSI and soil moisture data. SADC (Southern African Development Community) Climate Services Centre uses SPI as the primary meteorological drought indicator. India National Disaster Management Authority uses SPI for official drought classification under the Drought Management Manual. FEWS NET (Famine Early Warning Systems Network) uses SPEI for agricultural drought monitoring across Africa and South Asia. For operational use, SPI/SPEI should be computed monthly, reported at multiple time scales, and combined with other indicators (streamflow, groundwater levels, soil moisture, crop conditions) for a comprehensive drought assessment. The onset of a drought is typically defined as the first month where SPI/SPEI falls below -1.0; drought termination is defined as the first month where SPI/SPEI returns to 0 or above.

15. How does SPEI respond to climate change and global warming?

SPEI (computed with physically sound PET methods like Penman-Monteith) shows a systematic drying trend in many regions under global warming even when precipitation does not change, because rising temperatures increase atmospheric evaporative demand and thus PET. For example, analysis of CMIP6 model projections shows that under SSP5-8.5, SPEI-12 declines by 0.5 to 1.5 standard deviations by 2100 in the Mediterranean, southern Africa, the Sahel, South and Southeast Asia, and western North America. SPI for the same scenarios may show little trend in many of these regions because it does not capture the temperature-driven component of water deficit. This divergence makes SPEI the more appropriate index for climate change impact studies. However, the magnitude of future SPEI drying is strongly sensitive to the PET method: Thornthwaite PET overestimates warming-driven SPEI drying compared to Penman-Monteith. For climate change research, always use FAO-56 Penman-Monteith or Hargreaves-Samani PET.

16. Where can I download ready-made SPI and SPEI data?

Ready-computed global SPI and SPEI data are available from several sources. For SPEI: the SPEI Global Drought Monitor (spei.csic.es) provides monthly SPEI at time scales 1 to 48 months on a 0.5-degree global grid using CRU TS precipitation and Hargreaves PET, freely downloadable as NetCDF. For SPI: NOAA/NCEI provides global SPI at 2.5-degree resolution; PRISM provides high-resolution (4 km) SPI and SPEI for the USA. For South Asia and Nepal: the APHRODITE dataset provides 0.25-degree daily precipitation from 1951 to 2015 that can be used as SPI/SPEI input; ERA5 reanalysis provides all required inputs (precipitation, temperature, radiation, humidity, wind) at 0.25-degree global coverage from 1940 to present for SPEI computation. All of these datasets are freely accessible after registration. For station-based SPI, collect 30+ years of monthly station data from national meteorological services and apply the R SPEI package or Python climate-indices.

Key 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, 17 to 22 January 1993, Anaheim, California. American Meteorological Society, pp. 179 to 183.

Vicente-Serrano, S.M., Begueria, S. and Lopez-Moreno, J.I. (2010). A multiscalar drought index sensitive to global warming: the standardized precipitation evapotranspiration index. Journal of Climate, 23(7), 1696 to 1718. doi:10.1175/2009JCLI2909.1

WMO (2012). Standardized Precipitation Index User Guide. WMO-No. 1090. World Meteorological Organization, Geneva. Editors: M. Hayes, M. Svoboda, N. Wall, M. Widhalm.

Thom, H.C.S. (1958). A note on the gamma distribution. Monthly Weather Review, 86(4), 117 to 122.

Allen, R.G., Pereira, L.S., Raes, D. and Smith, M. (1998). Crop Evapotranspiration: Guidelines for Computing Crop Water Requirements. FAO Irrigation and Drainage Paper 56. Food and Agriculture Organization, Rome.

Hargreaves, G.H. and Samani, Z.A. (1985). Reference crop evapotranspiration from temperature. Applied Engineering in Agriculture, 1(2), 96 to 99.

Thornthwaite, C.W. (1948). An approach toward a rational classification of climate. Geographical Review, 38(1), 55 to 94.

Hosking, J.R.M. (1990). L-moments: analysis and estimation of distributions using linear combinations of order statistics. Journal of the Royal Statistical Society Series B, 52(1), 105 to 124.

Begueria, S. and Vicente-Serrano, S.M. (2023). SPEI: Calculation of the Standardised Precipitation-Evapotranspiration Index. R package version 1.8.1. Available at: https://cran.r-project.org/package=SPEI

Sheffield, J., Wood, E.F. and Roderick, M.L. (2012). Little change in global drought over the past 60 years. Nature, 491, 435 to 438. doi:10.1038/nature11575

Explore More Hydrology and Climate Resources

Rainfall-runoff analysis, flood frequency, evapotranspiration, and more in our full library.

Visit Blog Try Our Tools