For optimal use, please visit numiqo on your desktop PC!

Calculate
Values over time
Time (optional)

How-to

Mann-Kendall Trend Test Calculator

To calculate the Mann-Kendall trend test, select "Mann-Kendall Test" under "Calculate", enter the measured values in the table above and select them under "Values over time". If the rows are not equally spaced or not sorted, also select the column with the time, for example the year or the day. numiqo then calculates the Mann-Kendall trend test and Sen's slope and draws the values with the trend line.

Example

The example contains simulated nitrate concentrations (mg/L) measured once a year from 2008 to 2025. Select "Nitrate (mg/L)" under "Values over time" and "Year" under "Time". The Mann-Kendall test shows whether the concentration rises or falls over the years, and Sen's slope gives the change in mg/L per year.

What the Mann-Kendall test does

The Mann-Kendall test checks whether a series of values tends to rise or fall over time. It compares every observation with every later one and counts how often the later value is higher or lower. It does not assume a normal distribution or a straight-line trend, and single outliers have little influence. The test only asks whether there is a monotonic trend, not how large it is. The size of the trend is given by Sen's slope.

The test is the same as testing Kendall's tau between the values and the time. For an overview of the trend analysis calculator, see trend analysis. For a linear trend with normally distributed residuals, a linear regression on time is an alternative. To look at runs and shifts in process data, use a run chart.

Settings

  • Values over time: one or more metric columns. Each selected column is tested on its own.
  • Time (optional): a metric column such as the year, month number or day. The rows are ordered by this column, and Sen's slope is given per one unit of it. Without a time column, the row number is used as time. Rows with a missing value are left out, but the gap is kept.
  • Alternative hypothesis: increasing or decreasing (two-sided), or only one of the two directions (one-sided).
  • Trend classification (GSI): adds the confidence factor, the coefficient of variation and the trend class as used in groundwater monitoring.

Results

Mann-Kendall test

  • Kendall S: the number of pairs in which the later value is higher minus the number of pairs in which it is lower. A positive S points to an increasing trend, a negative S to a decreasing trend.
  • Var(S): the variance of S under the null hypothesis, corrected for ties.
  • τ: Kendall's tau-b between the values and the time, from -1 to 1. It is S scaled to the number of pairs.
  • z and p: the standardized test statistic with continuity correction and its p-value from the normal distribution. A p-value below 0.05 means that the trend is statistically significant at the 5% level.

Sen's slope

Sen's slope (Theil-Sen estimator) is the median of the slopes between all pairs of observations. It is the typical change per one unit of time and, unlike the slope of a linear regression, it is robust to outliers. The 95% confidence interval is based on the ranks of the pairwise slopes (Gilbert, 1987). The intercept is the median of value − slope × time, and the chart shows the resulting trend line.

Trend classification (GSI)

The GSI Mann-Kendall Toolkit, used in groundwater monitoring, sorts a series into one of six classes. The confidence factor is 1 minus the one-sided p-value in the direction of S. The coefficient of variation (CV) is the standard deviation divided by the mean.

Kendall S Confidence factor Trend
S > 0 above 95% Increasing
S > 0 90% to 95% Probably increasing
S > 0 below 90% No trend
S ≤ 0 below 90%, CV ≥ 1 No trend
S ≤ 0 below 90%, CV < 1 Stable
S < 0 90% to 95% Probably decreasing
S < 0 above 95% Decreasing

The toolkit takes the confidence factor from exact tables for 4 to 40 observations. numiqo uses the normal approximation, so for very short series the class can differ near the 90% and 95% limits.

Assumptions and limitations

  • Independent observations: the test assumes that the values do not depend on each other. With positive autocorrelation, as is common in closely spaced measurements, the p-value is too small and a trend is found too often.
  • No seasonality: with monthly or quarterly data that follow a seasonal pattern, the seasonal cycle can hide or mimic a trend.
  • Normal approximation: the p-value uses the normal distribution of S, which is accurate from about 10 observations. For shorter series, read the p-value with caution.
  • Monotonic trend: the test detects a steady rise or fall. A trend that first rises and then falls can result in S close to 0.

Cite numiqo: numiqo Team (2026). numiqo: Online Statistics Calculator. numiqo e.U. Graz, Austria. URL https://numiqo.com