Graph coloring calculator
Color a graph so that no two adjacent vertices share a color. Enter an edge list and the DSATUR (or greedy) heuristic assigns a color to every vertex, shows the color classes, and reports an upper bound on the chromatic number χ. K4 needs 4 colors, an even cycle 2, an odd cycle 3 — see it instantly.
Related tools
All Discrete maths & graphs tools →Graph coloring calculator is free to use as often as you like, directly from this page. Its place is under Discrete maths & graphs; Planar graph checker and Bitwise Calculator answer the questions closest to this one.
How to use it
- Open the tool — no signup or install needed.
- Enter your input or adjust the available options.
- Get your result instantly, then copy or download it.
Frequently asked questions
What does Graph coloring calculator do?
Color a graph so that no two adjacent vertices share a color. Enter an edge list and the DSATUR (or greedy) heuristic assigns a color to every vertex, shows the color classes, and reports an upper bound on the chromatic number χ. K4 needs 4 colors, an even cycle 2, an odd cycle 3 — see it instantly.
What does a concrete case look like?
K₄ → 4 · C₅ → 3 · K₃,₃ → 2 — the tool shows every step in between, not just the final figure.
When would I actually use this?
Anything modelled as points and connections: a shortest route, a network's capacity, a schedule with dependencies, or a circuit reduced to its logic.
What is the most common mistake?
Assuming a shortest path stays shortest when a weight changes sign. Negative edges break the greedy argument Dijkstra rests on, and the algorithm returns a confident wrong answer rather than an error.
How is Graph coloring calculator different from Planar graph checker?
They sit next to each other but answer different questions: Planar graph checker is the one to open when you need it to test whether a graph is likely planar. Enter an edge list and the tool applies Euler's necessary inequalities (E ≤ 3V−6, and E ≤ 2V−4 when triangle-free) and searches for K5 and K3,3 subgraphs from Kuratowski's theorem. It is an honest heuristic, not a full planarity algorithm: "non-planar" is certain, "likely planar" is not a proof. Capped at 16 vertices. Pick whichever matches what you're starting from — both are free.
Where do the figures come from?
The algorithms are the textbook ones and their results are exact for the graph you enter. What varies is cost: several of these problems have no known efficient solution, so large inputs are answered by heuristic and the tool says when that is the case.