ratio.

Find a tool

Browse all tools and categories ↗
MINIMUM SPANNING TREE

Minimum Spanning Tree Calculator

Find a least-total-weight undirected connection spanning every entered node and list its selected edges.

Enter your values

01 / INPUT
Calculated on your device

YOUR CALCULATION

Result

—

Calculation steps

Work through one step at a time or reveal the complete calculation. The steps use your current inputs.

    How to calculate

    Use Kruskal’s algorithm with disjoint-set components; require the entire entered graph to be connected.

    Sort edges by weight and add an edge only if it connects two different components

    Worked example

    Edges 0–1 weight 1, 1–2 weight 2 and 2–3 weight 3 span the default four nodes with total weight 6.

    Assumptions and input details

    Undirected edges, consistent numeric weights, no self edges. Duplicate parallel edges are allowed. Disconnected graphs are rejected; the result is a connection tree rather than a shortest route from a chosen origin.

    Using this calculator

    Can I enter my own problem?

    Yes. Replace the example values with your own inputs. The result, calculation steps, tables and applicable diagrams update from those inputs. Blank or invalid values clear the result; example values are never silently substituted for missing inputs.

    Are the results exact?

    Results use floating-point arithmetic and displayed rounding. Read the formula, assumptions and any stated data precision before interpreting the result.

    Is my input uploaded?

    The calculation runs in your browser. No account, file upload or external AI service is required. Inputs are not saved between page reloads.

    RELATED TOOL · GRAPH THEORYWeighted Graph Shortest Route Calculator

    Find a least-cost route through a small directed or undirected edge graph with nonnegative costs.

    RELATED TOOL · TRAVELING SALESPERSONTraveling Salesperson Calculator

    Find an exact minimum-cost tour visiting each node once and returning to node zero in a small directed cost matrix.

    RELATED TOOL · PLANNINGLinear Stock Cutting Allocation Calculator

    Find a minimum identical-stock allocation under an explicit per-piece kerf reservation and end-trim convention.

    ADVERTISEMENT

    Reserved advertising space.