Home / Calculators / Graph Theory Analyzer
Free online tool

Graph Theory Analyzer

Find the shortest path between two nodes in a non-negative weighted undirected graph using Dijkstra. Enter edges as start,end,weight.

Start using

Graph Theory Analyzer

Find the shortest path between two nodes in a non-negative weighted undirected graph using Dijkstra. Enter edges as start,end,weight.

Worked example

Input
A,B,2
B,C,3
A,C,10
start = A; end = C
Result
5; A → B → C

Input and calculation

Enter one undirected edge per line as start,end,weight. For this example paste A,B,2; B,C,3; A,C,10 on three separate lines. Use a decimal point for fractional weights; commas separate fields.

Set the start node to A and the end node to C, then run. Expect shortest distance 5 and path A → B → C.

Limits

Weights must be non-negative. Limits: 1,000 edges and 500 nodes. This tool uses Dijkstra for undirected graphs; it does not calculate centrality, connected components or directed paths.

Use ASCII commas between fields and a decimal point in weights, including on decimal-comma pages. A,B means weight 1; A,B, currently means 0, so enter weights explicitly. Empty lines are ignored. Names are case-sensitive, with only outer whitespace trimmed; commas cannot belong to names. Equal start and end returns distance 0 and that node. All listed nodes count, including unrelated components. Floating-point sums may round; a reachable distance beyond the finite range produces a range error, not a disconnected result.

Processing takes place locally in your browser.