PPolySim OS
For K-12 Students · k-Means Clustering

k-Means Clustering for a clustering model

Built for k-12 students learning it in middle or high school. Watch the idea come alive with plain-language steps and everyday examples — perfect for projects and homework. Simulate a clustering model live below — adjust the inputs and watch it respond, right in your browser.

k-Means ClusteringLive

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.

▶ Run in Python

Data Inspector

Clusters3
Points80
Statusconverged

Governing equation

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.

or unlock everything with Pro →

More with k-Means Clustering

Frequently asked questions

Is this good for k-12 students?
Yes — this version of "k-Means Clustering for a clustering model" is framed for k-12 students learning it in middle or high school. Watch the idea come alive with plain-language steps and everyday examples — perfect for projects and homework.
Do I need to install anything?
No. It runs in any modern browser, free, with no account required.