Minimum spanning tree calculator
The cheapest way to connect every node of a weighted graph with no cycles — the classic problem behind laying cable, roads or pipes. List the edges as “A B weight” and Kruskal's algorithm finds the minimum spanning tree, its total weight, and draws it, highlighting the chosen edges.
Related tools
All Discrete maths & graphs tools →Open Minimum spanning tree calculator and you get an answer straight away, with no account to create. You will find it under Discrete maths & graphs, with Find minimum and maximum and Bitwise Calculator for the neighbouring cases.
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 Minimum spanning tree calculator do?
The cheapest way to connect every node of a weighted graph with no cycles — the classic problem behind laying cable, roads or pipes. List the edges as “A B weight” and Kruskal's algorithm finds the minimum spanning tree, its total weight, and draws it, highlighting the chosen edges.
What does a concrete case look like?
A–B 1, B–C 2, A–C 3 → A–B–C, Σ = 3 — 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 Minimum spanning tree calculator different from Find minimum and maximum?
They sit next to each other but answer different questions: Find minimum and maximum is the one to open when you need it to paste a list of numbers and get the smallest, the largest, the range between them, and how many values there are. Handles negatives and decimals. 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.