Calculators

Euclidean Distance Calculator

Calculate straight-line Euclidean distance between two signed numeric vectors privately in your browser.

Enter equal-length numeric vectors, separated by spaces, commas or semicolons. Signed values and scientific notation are supported. Each vector allows 10000 numbers and 200000 characters. The result is the square root of the sum of squared coordinate differences. Calculation runs locally in your browser.

Your Euclidean distance will appear here.

How Euclidean distance works

Euclidean distance, also called L2 distance, is the square root of the sum of squared coordinate differences: √Σ(aᵢ − bᵢ)². For A = (1, 2, 3) and B = (4, 6, 3), the differences are 3, 4 and 0, giving √(9 + 16) = 5. In two or three dimensions this measures straight-line distance. Identical vectors, including zero vectors, have distance zero. Match coordinates in order and use comparable units and scales; inputs are not normalized. Enter 1 to 10000 finite signed decimal numbers per vector separated by spaces, commas or semicolons. Scientific notation is supported; commas separate coordinates rather than thousands. Each input allows 200000 characters. Values that underflow to zero and differences or results outside the browser numeric range are rejected. Scaled hypotenuse arithmetic avoids unnecessary overflow and underflow from squaring. Results use browser floating-point arithmetic and display up to 12 significant digits. Unlike Manhattan distance, which adds absolute differences, Euclidean distance combines squared differences. All processing stays in your browser.

Frequently Asked Questions

Everything you need to know about this tool, how it works, and privacy.

What is the Euclidean distance formula?

Take the square root of the sum of squared differences between matching coordinates: √Σ(aᵢ − bᵢ)². For (1, 2, 3) and (4, 6, 3), the distance is 5.

Can I use negative numbers and zero vectors?

Yes. Signed finite decimal numbers and scientific notation are supported. Identical vectors have distance zero.

How does this differ from Manhattan distance?

Euclidean distance measures straight-line separation by combining squared differences. Manhattan distance adds absolute differences and gives 7 for the example where Euclidean distance gives 5.

Do coordinate units and order matter?

Yes. Match coordinates in order and use comparable units and scales. The calculator does not normalize inputs.

What are the input limits?

Enter equal-length vectors with 1 to 10000 numbers and up to 200000 characters each. Empty inputs, non-finite values, values that underflow to zero and differences or results beyond the browser numeric range are rejected.