Two-sample Kolmogorov-Smirnov test calculator
Paste two independent samples. The calculator compares their empirical CDFs at every observed point.
Empirical CDFs
| x | F_A(x) | F_B(x) | |F_A − F_B| |
|---|---|---|---|
| Fill in the fields above — the result is computed on this page. | |||
How to use this page
- Paste two independent samples.
- Find the largest CDF difference in the table.
- Read D and the approximate p-value.
What this page does not do: The classical test assumes independent observations from continuous distributions. Many ties or discrete data change the statistic distribution; a permutation procedure or a method designed for discrete data is then preferable.
Further reading
The two-sample Kolmogorov-Smirnov test measures the largest vertical distance D between two empirical cumulative distribution functions. It can react to differences in location, spread or shape.
The p-value uses the asymptotic distribution of the statistic with a finite-sample adjustment. The table shows where the empirical CDFs differ most.
Frequently asked questions
Does the test compare only means?
No. It compares the complete empirical distributions and can detect location, spread or shape differences.
Are ties allowed?
The calculator processes them, but the classical asymptotic p-value is not exact when many ties occur.
See also
Beta distribution calculator
Calculate beta density, CDF, upper tail and quantile together with its mean and variance.
Chi-square test calculator
Calculate chi-square goodness of fit, independence, or a chi-square critical value.
Continuous uniform distribution calculator
Calculate density, CDF, upper tail, quantile, mean and variance for U(a,b).