How to
How to make a Sankey diagram
A Sankey diagram shows how an amount flows from one stage to the next. Each stage is a bar, called a node, and each flow is a band whose width matches its amount, so the biggest flows stand out and nothing gets lost between the start and the end.
- List the flows. Each row is one flow: where it comes from, where it goes and how much. The sample follows a monthly budget from income to spending and savings.
- Or paste from a spreadsheet. Copy three columns from Excel or Google Sheets, From, To and Amount, and press Paste from a spreadsheet. Amounts can include commas and currency signs.
- Check the nodes. A name that appears as both a To and a From becomes a middle step. Spell each name the same way every time, or it becomes a separate node.
- Choose the colors. Color bands by the node they leave or the node they reach, and set any node's color under Node colors.
- Export. Download a PNG for a report or slides, or an SVG to edit or print.
How the layout works
Nodes are placed in columns by how many steps they are from a starting node. With Line up on the right, every end node sits in the last column, which suits budgets and energy balances. Inside each column the nodes are moved up and down a few times to sit level with the flows they connect to, which keeps bands short and limits crossings. Nodes are never dragged by hand, so adding a row always gives a tidy result.
A flow that loops back to an earlier node, such as a refund returning to income, cannot be drawn in a Sankey diagram, so it is left out and a note tells you which one.
Tip
Keep it to a handful of end nodes. Group small flows into an Other node, and the diagram stays readable on a slide.
Related charts
To show how one total splits without the stages in between, a pie chart is simpler. For a hierarchy where size does not matter, use the tree chart maker.
Questions people ask
What data do I need for a Sankey diagram?
A list of flows with three columns: where each flow starts, where it goes and how much it carries. A budget might list Salary to Budget 4,200 and Budget to Housing 1,600. Nodes are created from the names, so a node that receives and sends flows becomes a middle step, and the width of every band is set by its amount.
Is a Sankey chart the same as a Sankey diagram?
Yes, both names describe the same kind of flow diagram, where arrows or bands are drawn with a width proportional to the quantity they carry. It is named after Matthew Henry Phineas Riall Sankey, who used one in 1898 to show the energy efficiency of a steam engine.
When is a Sankey diagram a good choice?
When the story is about how a total splits and moves: income into spending, energy into uses and losses, visitors through the pages of a site, or budget through departments. It shows at a glance where most of the amount goes. For a simple split of one total, a pie or bar chart is easier to read.
Why does a node look bigger than its outgoing flows?
A node is drawn at the larger of what flows in and what flows out. If they differ, part of the bar has no band leaving it, and a note under the chart names the node and both totals. Add the missing flow, such as an Other or Losses target, to make the diagram balance.