AI Tools Free

Mann-Kendall Trend Test & Theil-Sen Slope Calculator

Evaluate any sequential time series for a monotonic upward or downward trend: compute the Mann-Kendall `S` statistic, tie-adjusted variance `Var(S)`, continuity-corrected `Z_MK`, two-sided `p`-value, Kendall's `tau`, and the outlier-resistant Theil-Sen median slope.

Free to useNo sign-upRuns in your browser
Enter your details

Enter the inputs, then select Run Mann-Kendall Trend Test.

Enter at least 4 sequential observations ordered from earliest to latest (t = 1, 2, ..., n).

Significance threshold for testing H0: no monotonic trend vs. H1: upward or downward monotonic trend.

Standard hydrological and environmental guidelines (USGS, EPA) subtract 1 from |S| before dividing by sqrt(Var(S)).

Your result
Enter your details

Result will appear here

How the Mann-Kendall Trend Test & Sen's Slope Work

Recommended by the US Geological Survey (USGS), World Meteorological Organization (WMO), and US EPA for hydrological, climate, and KPI time series, the Mann-Kendall test compares every earlier observation x_i with every later observation x_j (j > i).

S = (# positive pairs) - (# negative pairs); Var(S) = (n(n-1)(2n+5) - sum t_p(t_p-1)(2t_p+5)) / 18; Sen Slope = median((x_j - x_i) / (j - i)).

To test whether your time series contains a sudden step change rather than a smooth trend, run our Change Point Detector (/tools/change-point-detector).

Mann-Kendall Trend Test & Theil-Sen Slope Calculator workflow overview
Workflow overview for Mann-Kendall Trend Test & Theil-Sen Slope Calculator.

Mann-Kendall Trend Test & Theil-Sen Slope Reference Table

Formulas, tie-correction terms, and exact outputs for the default 10-point environmental monitoring series.

Statistic / ParameterMathematical DefinitionDefault 10-Point Series OutputTrend Interpretation
Mann-Kendall Score (`S`)`sum_{i<j} sgn(x_j - x_i)` across `45` pairs`S = +42` (`43` pos, `1` neg, `1` tie)Strong positive concordance across time pairs
Tie-Corrected Variance `Var(S)``[n(n-1)(2n+5) - sum t_p(t_p-1)(2t_p+5)] / 18``Var(S) = 124.0000` (`SD = 11.1355`)Accounts for the 2-element tie at `14.8` (`-18/18 = -1`)
Continuity-Corrected `Z_MK` & `p``(S - 1) / sqrt(Var(S))``Z = +3.6819`, `p = 0.0002`Statistically significant upward trend (`p < 0.05`)
Kendall's Rank Correlation (`tau`)`S / [n(n - 1) / 2]``tau = +0.9333`Near-monotonic upward rank progression (`-1` to `+1`)
Theil-Sen Robust Slope (`beta`)`median_{i<j} ((x_j - x_i) / (j - i))``+0.6000` units / stepMedian rate of change per time step (robust to outliers)

How to Run a Mann-Kendall Trend Analysis in 3 Steps

Test any chronological sequence of 4 to 500 measurements in your browser.

Paste your time-ordered series from earliest to latest

Enter your measurements in chronological order (separated by commas, spaces, or newlines). No normality assumption is required, and tied values are detected automatically.

Mann-Kendall Trend Test & Theil-Sen Slope Calculator step 1: Paste your time-ordered series from earliest to latest
Step 1 workflow overview for Mann-Kendall Trend Test & Theil-Sen Slope Calculator.

Select your significance level alpha and continuity correction mode

Pick alpha = 0.05 (95% confidence), 0.01, or 0.10, and choose whether to apply the standard +-1 continuity correction when converting S into Z_MK.

Mann-Kendall Trend Test & Theil-Sen Slope Calculator step 2: Select your significance level alpha and continuity correction mode
Step 2 workflow overview for Mann-Kendall Trend Test & Theil-Sen Slope Calculator.

Review S, Z_MK, p-value, Kendall's tau, and the Theil-Sen trend line

Check the trend verdict (Increasing, Decreasing, or No Significant Trend) alongside the Theil-Sen median slope and intercept for robust forecasting.

Mann-Kendall Trend Test & Theil-Sen Slope Calculator step 3: Review S, Z_MK, p-value, Kendall's tau, and the Theil-Sen trend line
Step 3 workflow overview for Mann-Kendall Trend Test & Theil-Sen Slope Calculator.

Worked Examples of Mann-Kendall & Theil-Sen Trend Detection

See how the non-parametric test handles ties, outliers, and stationary noise.

Baseline example

Free Mann-Kendall trend test calculator with Theil-Sen slope estimator. Compute S statistic, tie-corrected Var(S), continuity-corrected Z, p-value, and Kendall's tau in your browser.

Mann-Kendall Trend Test & Theil-Sen Slope Calculator example 1: Baseline example
Worked example 1 for Mann-Kendall Trend Test & Theil-Sen Slope Calculator.

Comparison scenario

S = (# positive pairs) - (# negative pairs); Var(S) = (n(n-1)(2n+5) - sum t_p(t_p-1)(2t_p+5)) / 18; Sen Slope = median((x_j - x_i) / (j - i)).

Mann-Kendall Trend Test & Theil-Sen Slope Calculator example 2: Comparison scenario
Worked example 2 for Mann-Kendall Trend Test & Theil-Sen Slope Calculator.

Boundary check before exporting

To test whether your time series contains a sudden step change rather than a smooth trend, run our Change Point Detector (/tools/change-point-detector).

Mann-Kendall Trend Test & Theil-Sen Slope Calculator example 3: Boundary check before exporting
Worked example 3 for Mann-Kendall Trend Test & Theil-Sen Slope Calculator.

How to Interpret S, Z_MK, Kendall's Tau, and Sen's Slope

Use the sign of S and Z_MK for direction, the p-value for significance, and Sen's slope for practical magnitude.

A positive S and Z_MK indicate an upward trend, while a negative S and Z_MK indicate a downward trend. When |Z_MK| exceeds the critical normal value (1.9600 at alpha = 0.05, two-sided), you reject the null hypothesis of no monotonic trend.

Kendall's tau normalizes S by the total number of pairs n(n - 1)/2 so values always lie in [-1, +1]. Pair tau with the Theil-Sen slope beta (change per index step) to report both rank consistency and physical rate of change.

How to interpret Mann-Kendall Trend Test & Theil-Sen Slope Calculator results
Result interpretation guide for Mann-Kendall Trend Test & Theil-Sen Slope Calculator.

Serial Correlation, Seasonality & Related Statistical Tools

Check these time-series conditions before reporting Mann-Kendall p-values.

1. Positive Autocorrelation (AR(1)): Strong positive lag-1 autocorrelation inflates false-positive rates in raw Mann-Kendall tests; aggregate high-frequency readings into annual or monthly blocks or pre-whiten the series first.

2. Seasonal Cycles: Compare like-for-like seasons (e.g., every July vs. July) so regular seasonal swings do not mask or mimic a long-term trend.

Scope limits and assumptions for Mann-Kendall Trend Test & Theil-Sen Slope Calculator
Assumptions and input boundaries for Mann-Kendall Trend Test & Theil-Sen Slope Calculator.

Frequently Asked Questions About the Mann-Kendall Trend Test

Answers about using Mann-Kendall Trend Test & Theil-Sen Slope Calculator and understanding its results.

What does the Mann-Kendall test detect in a time series?

The Mann-Kendall test is a rank-based, distribution-free test that evaluates whether a time series exhibits a statistically significant monotonic upward or downward trend over time, without requiring linear increments or normally distributed residuals.

How do tied values affect the Mann-Kendall variance Var(S)?

When observations share identical values, pairwise differences x_j - x_i equal zero and contribute 0 to S. For each tie group p containing t_p identical values, the variance formula subtracts t_p(t_p - 1)(2t_p + 5) / 18 from the untied variance n(n - 1)(2n + 5) / 18.

Why is the Theil-Sen slope reported alongside the Mann-Kendall test?

While the Mann-Kendall Z-score and p-value tell you whether a monotonic trend is statistically significant, they do not measure its rate of change. The Theil-Sen estimator takes the median of all n(n - 1)/2 pairwise slopes (x_j - x_i)/(j - i), providing an outlier-resistant slope with a 29.3% breakdown point.

What if my time series has an abrupt regime shift instead of a gradual trend?

If a series jumps suddenly from one plateau to another, pair the Mann-Kendall test with our Change Point Detector (/tools/change-point-detector) to locate structural breakpoints before fitting segment trends.

Try your own values

Choose another tool for your next calculation, conversion, or text task.

Run Mann-Kendall Trend Test