{"id":1011,"date":"2026-10-23T17:32:28","date_gmt":"2026-10-23T17:32:28","guid":{"rendered":"http:\/\/jfdi-blog-how-to-make-a-sankey-diagram"},"modified":"2026-10-23T17:32:28","modified_gmt":"2026-10-23T17:32:28","slug":"how-to-make-a-sankey-diagram","status":"publish","type":"post","link":"https:\/\/jfdi.pro\/blog\/how-to-make-a-sankey-diagram\/","title":{"rendered":"How to make a Sankey diagram, free and without an account"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">A Sankey diagram shows how a quantity moves between stages, such as energy from fuels to uses, money from income to spending, or visitors from pages to sign-ups. Each flow is drawn as a band whose width is proportional to its size. To make one, you need a table with three columns, <strong>From<\/strong>, <strong>To<\/strong> and <strong>Value<\/strong>, with one row per flow.<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/jfdi.pro\/charts\/\">Make a Sankey diagram<\/a><\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Where the name comes from<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The diagram is named after Captain Matthew Henry Phineas Riall Sankey, an Irish engineer, who used one in 1898 to show how much of a steam engine&#8217;s energy was lost at each stage (<a href=\"https:\/\/en.wikipedia.org\/wiki\/Sankey_diagram\">Wikipedia<\/a>). Charles Minard had drawn flows of the same kind decades earlier, most famously in his 1869 map of Napoleon&#8217;s march on Moscow.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The data layout<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Each row is one flow between two nodes. This is the example in the JFDI chart maker, showing energy flowing through an economy (illustrative figures, in terawatt hours):<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>From<\/th><th>To<\/th><th>Value<\/th><\/tr><\/thead><tbody><tr><td>Gas<\/td><td>Electricity<\/td><td>95<\/td><\/tr><tr><td>Gas<\/td><td>Heating<\/td><td>120<\/td><\/tr><tr><td>Wind<\/td><td>Electricity<\/td><td>82<\/td><\/tr><tr><td>Oil<\/td><td>Transport<\/td><td>210<\/td><\/tr><tr><td>Electricity<\/td><td>Homes<\/td><td>105<\/td><\/tr><tr><td>Electricity<\/td><td>Losses<\/td><td>50<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">A node can be a target in one row and a source in another. <em>Electricity<\/em> receives flows from gas, wind and other fuels, then sends flows on to homes, industry and losses. The chart works out the stages from that.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/jfdi.pro\/blog\/wp-content\/uploads\/2026\/10\/sankey-energy.png\" alt=\"A Sankey diagram of energy flowing from fuels through electricity and heating to homes, industry and transport\"\/><figcaption class=\"wp-element-caption\">The chart maker&#8217;s example Sankey: band widths are proportional to each flow.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step by step<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Open the <a href=\"https:\/\/jfdi.pro\/charts\/\">chart maker<\/a><\/strong> and type <em>sankey<\/em> in the search box, then click <strong>Sankey diagram<\/strong>.<\/li>\n\n\n\n<li><strong>Replace the example data<\/strong> on the Data step. Paste your three columns straight from Excel or Google Sheets, with a header row.<\/li>\n\n\n\n<li><strong>Check the totals.<\/strong> Wherever a node has flows both in and out, the two sides should add up, or the difference should go to a node such as <em>Other<\/em> or <em>Losses<\/em>.<\/li>\n\n\n\n<li><strong>Style it<\/strong> on the Format step: title, colours, and node width and spacing.<\/li>\n\n\n\n<li><strong>Export it<\/strong> as PNG, SVG or PDF, or copy the embed code for a website. The interactive embed shows each flow&#8217;s value on hover.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Nothing you paste is uploaded. The chart is drawn by your browser.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Tips for a readable Sankey<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Keep it to about 15 to 20 nodes.<\/strong> Beyond that, bands get too thin to read. Group small items into <em>Other<\/em>.<\/li>\n\n\n\n<li><strong>Make it balance.<\/strong> A node that receives 300 and sends on 250 looks wrong. Show the missing 50 explicitly, often as <em>Losses<\/em> or <em>Unallocated<\/em>.<\/li>\n\n\n\n<li><strong>Use the same units throughout.<\/strong> Mixing percentages and totals breaks the widths.<\/li>\n\n\n\n<li><strong>Put the story in the title.<\/strong> &#8220;Half of all gas goes to heating&#8221; beats &#8220;Energy flows&#8221;.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">When to use something else<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>If you want to show<\/th><th>Try<\/th><\/tr><\/thead><tbody><tr><td>How one total breaks down, one level<\/td><td>Bar chart or treemap<\/td><\/tr><tr><td>Gains and losses from a start value to an end value<\/td><td><a href=\"https:\/\/jfdi.pro\/blog\/how-to-make-a-waterfall-chart\/\">Waterfall chart<\/a><\/td><\/tr><tr><td>How people move between categories over several stages (for example, survey answers in two years)<\/td><td>Alluvial chart<\/td><\/tr><tr><td>Steps in a sign-up or sales funnel, with drop-offs<\/td><td>Funnel Sankey<\/td><\/tr><tr><td>Revenue flowing to costs and profit<\/td><td>Income statement chart<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">All of these are in the chart maker&#8217;s <em>Flow and process<\/em> family.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common questions<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Can a flow go backwards?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Not in a standard Sankey: flows run left to right through stages. Loops (A to B to A) confuse the layout, so split repeated stages into separate nodes, such as <em>Year 1<\/em> and <em>Year 2<\/em>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Can I use negative values?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. A band can&#8217;t have negative width. Show reductions as flows to a node such as <em>Losses<\/em> or <em>Refunds<\/em>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Is it free to use commercially?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. Charts you make are yours, with no watermark and no credit required.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Related<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/jfdi.pro\/blog\/how-to-make-a-waterfall-chart\/\">How to make a waterfall chart from spreadsheet data<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/jfdi.pro\/blog\/which-chart-should-i-use\/\">Which chart should I use?<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/jfdi.pro\/help-charts.html\">The chart maker guide<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>A Sankey diagram shows how a quantity flows from one stage to the next, with each band as wide as the amount it carries. All you need is a three-column table: From, To and Value.<\/p>\n","protected":false},"author":1,"featured_media":1005,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[20,23,22],"class_list":["post-1011","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-charts","tag-data-visualisation","tag-flow-charts","tag-sankey-diagram"],"_links":{"self":[{"href":"https:\/\/jfdi.pro\/blog\/wp-json\/wp\/v2\/posts\/1011","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jfdi.pro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jfdi.pro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jfdi.pro\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jfdi.pro\/blog\/wp-json\/wp\/v2\/comments?post=1011"}],"version-history":[{"count":1,"href":"https:\/\/jfdi.pro\/blog\/wp-json\/wp\/v2\/posts\/1011\/revisions"}],"predecessor-version":[{"id":1041,"href":"https:\/\/jfdi.pro\/blog\/wp-json\/wp\/v2\/posts\/1011\/revisions\/1041"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jfdi.pro\/blog\/wp-json\/wp\/v2\/media\/1005"}],"wp:attachment":[{"href":"https:\/\/jfdi.pro\/blog\/wp-json\/wp\/v2\/media?parent=1011"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jfdi.pro\/blog\/wp-json\/wp\/v2\/categories?post=1011"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jfdi.pro\/blog\/wp-json\/wp\/v2\/tags?post=1011"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}