Calculation Results
Feature Contributions
Point Visualisation
Calculation Steps
Calculator Inputs
Formula Used
Euclidean distance measures straight-line separation between two numeric vectors. Feature scaling prevents large-value variables from dominating every comparison. Weighted distance lets important dimensions contribute more strongly.
How to Use the Calculator
- Select a calculation mode.
- Enter two points or paste dataset rows.
- Choose scaling, missing-value, weighting, and precision options.
- Enter ignored feature numbers when necessary.
- Select Calculate Distance to view metrics, tables, charts, and steps.
- Copy results or export them as CSV or PDF.
Example Data
| Example | Point A | Point B | Distance |
|---|---|---|---|
| Two dimensions | (1, 2) | (4, 6) | 5 |
| Three dimensions | (1, 2, 3) | (4, 6, 8) | √50 ≈ 7.0711 |
| Identical points | (2, 5) | (2, 5) | 0 |
| Weighted example | (1, 2) | (3, 5) | √[1(4)+2(9)] ≈ 4.6904 |
Machine Learning Notes
Euclidean distance is widely used by K-nearest neighbours and clustering algorithms. It works best when features share comparable scales and meaningful numeric relationships. Standardisation usually improves distance-based model behaviour.
High-dimensional datasets can make distances increasingly similar and less informative. Feature selection, dimensionality reduction, or alternative metrics may improve results. Always validate metric choices against model performance.
Frequently Asked Questions
What does Euclidean distance measure?
It measures the straight-line distance between numeric points in multidimensional space.
Why should features be scaled?
Scaling prevents large-range features from dominating the distance calculation.
What is squared Euclidean distance?
It is the sum of squared coordinate differences without applying the square root.
Can Euclidean distance use negative values?
Yes. Differences are squared, so negative coordinates are fully supported.
How are feature weights applied?
Each squared difference is multiplied by its non-negative feature weight.
How does missing-value skipping work?
Dimensions missing from either compared vector are excluded from that pair.
What is a pairwise distance matrix?
It contains the distance between every dataset row and every other row.
Can this calculator identify nearest neighbours?
Yes. Reference mode ranks dataset rows and returns the closest top-k observations.
When should another metric be used?
Consider Manhattan, cosine, or Minkowski distance when geometry or data meaning differs.