Maths & numbers

Pie chart generator

Create a browser-local SVG pie chart with labeled categories percentage and angle calculations a data table and downloadable vector output.

Your settings

Use label, value on each row, with no commas inside labels. Up to 24 distinct labels and non-negative values. Omit thousands separators; decimals may have up to six places.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Generate result.

Report an issue

Try it, understand it

Explore the result

Compare values fractions and angles for categories describing one common whole.

Worked example comparison
ExampleOutputWhat to notice
Study weekTotal across entered categories20The four categories have shares 40%, 30%, 20% and 10%.
Four equal partsTotal across entered categories4Equal values create equal 90° slices.
A category with no valueTotal across entered categories10Zero stays in the legend and table without drawing a wedge.

Check your understanding

Does a colorful circle prove the categories are comparable?

No. The input categories must share units, scope and a defensible non-overlapping total.

Why might displayed percentages not sum exactly to 100?

Each row is rounded independently for display.

Behind the tool

How this tool works

Enter distinct categories that represent non-overlapping parts of one whole. The generator totals the values, calculates each share and central angle, and draws the matching two-dimensional SVG wedges. The legend and table identify every category, including zero values. Save a standalone SVG or copy the data table.

THE OUTPUT RULEShare = category value / total; central angle = share × 360°

A worked example

Values 8, 6, 4 and 2 total 20. Their shares are 40%, 30%, 20% and 10%, producing central angles 144°, 108°, 72° and 36°. A zero-valued category stays in the legend and table but draws no visible wedge.

Good to know

Descriptive chart only, with no inference or validation that the categories actually form one non-overlapping whole. At least one value must be positive. Negative values and duplicate labels are rejected. Very small wedges can be difficult to see; use the numeric table. Percentages and angles are independently rounded for display.

A pie chart needs one defined whole

A pie chart compares parts of a common total. The categories should be non-overlapping and use the same measurement unit and reporting period. Hours of study in one week make a coherent example when each hour belongs to one category. Combining this week’s reading hours with a whole year’s science hours would still produce a circle, but the graphic would describe a misleading total.

The generator can check whether values are numeric and non-negative, but it cannot inspect how the source data were collected. It does not infer missing categories or detect double counting between labels. Choose the scope before drawing the chart. Duplicate labels require correction or an explicit combination in the input so categories are not silently merged.

Convert each value into a percentage and an angle

For a total of 20 and a category value of 8, the share is 8/20 = 0.4, or 40%. Multiplying the share by 360° gives a central angle of 144°. The other values 6, 4 and 2 produce 30%, 20% and 10%, with angles 108°, 72° and 36°. The tool exposes both representations so the picture can be checked against the arithmetic.

The percentage calculator can answer an isolated proportion question, while the full pie generator keeps multiple category shares on the same denominator. Values can be decimals rather than whole frequencies, provided they still describe additive non-negative amounts. Independently rounded displayed shares can sum to 99.9999% or 100.0001% without changing the full-precision proportions used to draw the wedges.

Read the table when a small slice is hard to distinguish

A zero-valued category has a zero-degree angle and therefore no visible wedge. It remains in the legend and table so its omission from the picture is understandable. If every value is zero, there is no positive denominator for the shares, so the generator asks you to correct the data instead of drawing an arbitrary full circle. A negative amount is also unsuitable for a standard parts-of-a-whole pie.

Very small wedges and many similar categories can make a pie difficult to compare. The chart is limited to twenty-four categories, and fewer clearly named categories are often easier to read. The table and copyable data remain available when color or wedge size is insufficient. The downloadable SVG retains vector shapes and a legend; it is created locally in your browser rather than uploaded to an external chart service. The set operations calculator addresses a different membership question and should not be used to assume that overlapping categories can be added as if they were disjoint pie slices.

A few questions, answered

Can a category be zero?

Yes, provided at least one other value is positive. It remains in the table and legend but has no visible wedge.

Why are negative values rejected?

A standard pie chart represents non-negative parts of one positive whole. Signed balances need a different display.

Are my values uploaded to generate the chart?

No. The parsing, calculations, SVG drawing and SVG download are performed in the browser.

Find your calculator

Start typing to explore the library.