Hand a computer a cloud of points and k-means finds the natural groups. Step through the iterations and watch the clusters crystallize.
k-Means ClusteringLive
finding groups in data
Controls
Presets
k-means alternates two steps: assign each point to its nearest centroid, then move each centroid to the mean of its points. Repeat and the clusters snap into place. Choosing the right k, and where to start, both matter. Educational tool.
Reading this result: k = 3 is fewer than the 4 true blobs, so Lloyd’s algorithm is forced to merge neighbouring groups into one cluster and real structure is lost. Try k = 4.
Runs locally in your browser — free forever. Scale to the cloud when reality gets heavy.
★ Sign in to save this setupSave your tuned setup, or drop this simulation into your own site, docs, or course page.
How it works
k-means is unsupervised learning: it assigns each point to the nearest centroid, then recomputes each centroid as the mean of its points, repeating until stable. The choice of k and the initial centroids both shape the result — a simple algorithm with surprising subtlety. Educational tool.
✦
Ask the AI about this model
The math, the assumptions, real-world uses, or a code translation — explained for this exact simulation.
Is this k-means clustering simulator tool really free?▾
Yes. k-Means Clustering runs entirely in your browser using your device's own compute, so local use is free forever. You only pay Compute Tokens if you scale a job to the cloud.
Do I need to install anything?▾
No. Everything runs client-side in a modern browser — no downloads, no license, no account required to start.
Can I save or share my simulation?▾
Create a free account to save projects, and use a shareable embed or minted DOI to publish a live, interactive version anywhere.
How accurate are the results?▾
The solver uses established numerical methods, but results are for research and educational purposes and should be validated against experiment or professional review before you rely on them.