ratio.

Find a tool

Browse all tools and categories ↗
ONE DIMENSIONAL WASSERSTEIN DISTANCE

One Dimensional Wasserstein Distance Calculator

Calculate exact empirical first-Wasserstein distance between two equally weighted numeric samples, even with unequal lengths.

Enter your values

01 / INPUT
Calculated on your device

YOUR CALCULATION

Result

—

Calculation steps

Work through one step at a time or reveal the complete calculation. The steps use your current inputs.

    How to calculate

    Sort distinct combined sample knots and integrate the absolute empirical CDF gap over each interval.

    W1=∫|FA(x)−FB(x)| dx

    Worked example

    Samples (0,1) and (1,2) have empirical first-Wasserstein distance 1, in the same unit as the input values.

    Assumptions and input details

    Each observation has equal within-sample weight. This is a one-dimensional empirical transport distance, not a multivariate distance, standardized effect or p-value. Units and coordinate scale must match.

    Using this calculator

    Can I enter my own problem?

    Yes. Replace the example values with your own inputs. The result, calculation steps, tables and applicable diagrams update from those inputs. Blank or invalid values clear the result; example values are never silently substituted for missing inputs.

    Are the results exact?

    Results use floating-point arithmetic and displayed rounding. Read the formula, assumptions and any stated data precision before interpreting the result.

    Is my input uploaded?

    The calculation runs in your browser. No account, file upload or external AI service is required. Inputs are not saved between page reloads.

    RELATED TOOL · KOLMOGOROV SMIRNOV NORMAL REFERENCEKolmogorov Smirnov Normal Reference Calculator

    Compare an empirical sample CDF with a fully specified normal CDF using the two-sided KS distance.

    RELATED TOOL · SAMPLE STATISTICSPercentile Rank and Sample Quantile Calculator

    Compare strict, inclusive and midpoint empirical percentile ranks for a score and calculate an entered sample percentile under two explicit conventions.

    RELATED TOOL · JENSEN SHANNON DIVERGENCEJensen Shannon Divergence Calculator

    Compare two normalized category distributions using base-two Jensen–Shannon divergence and its square-root distance.

    ADVERTISEMENT

    Reserved advertising space.