Format Code Now
/

Pie Chart Maker

FV-51

Paste two columns, names and amounts, and the pie chart works out each slice's percent of the total. Save it as SVG or PNG.

Runs in your browser. Nothing is uploaded.

Data (CSV or tab)

Pie chart

Monthly budget: Rent 50%, Food 18.8%, Transport 7.5%, Utilities 6.7%, Savings 12.5%, Other 4.6%.

How to use it

  1. Paste the data with a header row: slice names in the first column and amounts in the second.
  2. Add a title, and choose whether slices show the percent, the value or both.
  3. Pick Largest first to sort the slices, and choose where the legend goes.
  4. Download the pie chart as PNG or SVG.

How the percentages are worked out

Each slice is its value divided by the sum of all values, times 100. A slice's angle is that share of 360 degrees, starting at twelve o'clock and going clockwise in the order of your rows. Percentages on the chart are rounded to one decimal, so three equal slices show 33.3 each and the labels add up to 99.9 even though the slices fill the circle exactly. The legend lists every slice with its percent.

Values a pie chart cannot show

A slice cannot be negative, so a negative value stops the chart with its row named. Zero is allowed: that row stays in the legend at 0 percent but gets no slice. If every value is zero there is nothing to divide, and the tool says so. For data with negatives, or to compare items rather than parts of a whole, a bar graph is the better choice.

Keeping a pie chart readable

Pie charts work best with a handful of slices. Up to 60 are accepted, but once the palette runs out the colors repeat, and thin slices are too narrow for a label, so their number appears only in the legend. Sorting largest first makes sizes easier to compare. Labels on a slice are black or white, whichever contrasts more with the slice color.

Error messages and what to do

MessageWhat it meansFix
Row 3, column "Amount": pie charts cannot show negative values (-40).A slice cannot be smaller than nothing.Remove the row, or show the data as a bar graph, which handles negative values.
All values are zero, so there is nothing to divide into slices.The total is zero, so no slice has a size.Check that the second column holds the amounts.

Questions people ask

How do I make a pie chart with percentages?

Paste the names and amounts; you do not need to work out percentages yourself. The chart divides each amount by the total and labels the slices with the percent. Choose Value and percent to show both on each slice.

Can I paste percentages instead of amounts?

Yes. Values such as 45% are read as 45, and the slices are drawn from their share of the total. If your percentages do not add up to 100, the slices are rescaled to fill the circle, so check the total in the status line.

Why do my pie chart percentages add up to 99.9?

Each label is rounded to one decimal on its own. Three equal slices are each 33.333 percent, shown as 33.3, which adds up to 99.9. The slices themselves are drawn from the exact values and fill the whole circle.

Why is there no label on a small slice?

A label is left off when the slice is too narrow to hold it without spilling over its neighbors. The legend always lists that slice with its percent, and in the downloaded SVG hovering the slice shows its value.

Can I choose the slice colors?

Yes. Type hex colors separated by commas in Custom colors, for example #1f77b4, #ff7f0e. They are used in row order and repeat if there are more slices than colors. Without custom colors, a color-blind safe palette is used.

About this tool

Paste CSV or tab-separated data (for example straight from a spreadsheet) with a header row first. The first column names the slices and the second holds the numbers; extra columns are ignored and the status line says so. Each slice is its value divided by the total, so the slices always add up to the whole circle, starting at twelve o'clock and going clockwise. Percentages are rounded to one decimal, so the shown numbers can add up to 99.9 or 100.1. Negative values are refused because a slice cannot be smaller than nothing; zero values stay in the legend without a slice. Labels on slices too thin to hold them are left out, but the legend always lists every percent. Up to 60 slices.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.