Dijkstra's Shortest Path Calculator — Find the Shortest Route Between Two Nodes
Our Dijkstra's Shortest Path Calculator finds the shortest path between any two nodes in a weighted graph, entered as a simple text edge list (e.g. A-B:4, B-C:2), using Dijkstra's classic shortest-path algorithm — the same technique that powers real-world routing and network systems.
Quick Answer
Enter your weighted graph as an edge list and pick a start and end node to instantly find the shortest path and total distance via Dijkstra's algorithm.
Enter weighted edges as NodeA-NodeB:weight, e.g. A-B:4, B-C:2.
How to Use the Dijkstra's Shortest Path Calculator — Weighted Graphs Online
- 1
Enter your graph as a comma-separated edge list, e.g. A-B:4, B-C:2.
- 2
Enter the start and end node names.
- 3
Click 'Calculate' to find the shortest path and total distance.
Why Use Dijkstra's Shortest Path Calculator — Weighted Graphs Online?
Dijkstra's algorithm, devised by Edsger Dijkstra in 1956, finds the shortest path from a starting node to every other node in a weighted graph by repeatedly visiting the closest unvisited node and relaxing (updating) the distances to its neighbors — a greedy approach that's provably optimal as long as edge weights are non-negative. This exact algorithm, or close variants of it, underlies GPS navigation, network routing protocols, and countless pathfinding systems, and this calculator runs it directly on a graph you describe as a simple weighted edge list.
Frequently Asked Questions
Related Tools
Minimum Spanning Tree Calculator — Kruskal's Algorithm Online
Find the minimum spanning tree of a weighted graph using Kruskal's algorithm. Free calculator with a simple edge-list input and union-find cycle detection.
Adjacency Matrix Calculator — Build a Graph Matrix Online
Build and display the adjacency matrix of a graph from a simple edge-list input, along with its degree sequence. Free calculator, weighted or unweighted.
Topological Sort Calculator — Kahn's Algorithm Online
Find a valid topological order for a directed graph using Kahn's algorithm, or detect that no order exists because of a cycle. Free calculator with a simple edge-list input.
Network Flow Calculator — Max Flow via Edmonds-Karp Online
Find the maximum flow from a source to a sink in a capacitated directed graph using the Edmonds-Karp algorithm. Free calculator with a simple edge-list input.