How to Draw a Violin Plot in Excel (Two Real Methods)
In this article
Excel has no violin plot chart type, so the usual attempt fails: people paste a column of numbers, insert a box-and-whisker chart, and get a box with no shape around it. The method that works is to build the density outline yourself from a frequency table and draw it as a filled area chart, or to use Excel's built-in box-and-whisker plot and accept that it shows quartiles rather than a full distribution curve. Both are covered below, fast method first.
Build the Density Outline
A violin plot is a box plot with a smoothed distribution shape mirrored on both sides of the axis. In Excel you create the shape from a histogram-style count, then plot it as an area chart with the category axis hidden. The steps below assume your data sits in one column, for example A2:A101, with a header in A1.
- Find the range. In two empty cells, enter
=MIN(A2:A101)and=MAX(A2:A101). Subtract the minimum from the maximum to get the span. If the span is 60 and you want 20 bins, each bin is 3 units wide. - Set the bin width. Pick a round number near span divided by 20 to 30. Too few bins gives a lumpy violin; too many gives a spiky one. For 100 values, 15 to 25 bins is a practical range.
- Create bin labels. In a new column, put the lower edge of each bin in successive rows: minimum, minimum plus width, minimum plus twice the width, and so on until you pass the maximum. In the next column, put the upper edge of each bin.
- Count each bin. In the third column, enter
=COUNTIFS(A$2:A$101,">="&B2,A$2:A$101,"<"&C2)and fill down. The last bin needs<=on the upper edge or its top value is dropped. - Mirror the counts. Add two helper columns: one holding the negative of each count, one holding the count itself. These become the left and right halves of the violin.
- Insert the chart. Select the bin midpoint column and both mirrored count columns, then choose Insert > Chart > Area > Stacked Area. The negative column draws left of the axis and the positive column draws right, producing a symmetric shape.
- Clean the axes. Delete the legend, set the horizontal axis line to no line, and set the vertical axis to cross at zero. Format the plot area with no fill and no border so only the shape remains.
- Add the quartiles. On the same chart, add a second series of four points at the minimum, first quartile, median, and third quartile, plotted as a line with no markers, or draw a short horizontal line at the median using a scatter series. This turns the shape into a true violin plot.
Check the shape before you trust it
Compare the widest part of the violin with the median line. In a right-skewed dataset the bulge sits left of the median and the tail stretches right; if your chart shows the opposite, the bin edges are probably offset by half a bin. Shift every bin label down by half the bin width and the shape will centre correctly. Also confirm the total of your count column equals the number of data rows; a mismatch means the COUNTIFS ranges do not cover every value.
Use the Box-and-Whisker Route
If you need quartiles and outliers rather than a smooth curve, Excel's built-in box-and-whisker chart does the job in seconds and is less error-prone. It is not a violin plot, but it answers the same questions about spread and centre for most business data.
- Select your single column of numbers, including the header.
- Go to Insert > Chart > Statistic Chart > Box and Whisker.
- Right-click the chart and choose Format Data Series to show inner points, outlier points, or the mean marker.
- To compare groups, arrange data in side-by-side columns with one column per group and select the whole block; Excel draws one box per column.
Labels differ slightly between Excel versions and between Windows and Mac, so if a menu item is not where you expect, look under the chart's right-click menu or the Chart Design tab. The box-and-whisker chart shows the median, the quartiles, and the range, but it does not show the density shape that makes a violin plot useful for spotting a second peak.
Which Method Fits Your Data
Use the density method when the shape matters: when you suspect two clusters, a long tail, or a floor effect where many values pile at the minimum. Use the box-and-whisker method when you only need to compare medians and spreads across groups, or when you have fewer than about 30 values, where a density curve is too jagged to read.
- If you have one group and more than 50 values, build the density outline.
- If you have several groups, build one density chart per group or use side-by-side box plots.
- If the data has repeated identical values, expect spikes; widen the bins.
- If the chart must update when data changes, build the bin table with formulas rather than typed numbers.
Make It Readable
A violin plot carries no axis labels by default, so add them deliberately. Put the group name under each shape, label the vertical axis with the unit of measurement, and keep the fill a single light colour so the median line stands out. If you are placing several violins side by side, align them on the same vertical scale; otherwise a wide shape in one panel and a narrow one in another will be misread as a difference in spread when it is only a difference in axis limits.
For a quick sanity check, the median line should sit inside the widest part of the shape for symmetric data, and the shape should narrow toward the minimum and maximum. If the violin looks like a rectangle, your bin width is too large; if it looks like a comb, it is too small. Adjust the bin count once, rebuild the count column, and the chart refreshes.
When the data is already summarised
If you only have counts per category rather than raw values, skip the binning step and plot the counts directly as a mirrored bar or area chart. You will not get a smoothed outline, but the relative widths still show the distribution, and the median can be estimated from the cumulative counts. This is the fastest route when the raw measurements are not available.
Save the workbook with the bin table on a separate sheet so the chart data stays out of the way. If you later add rows to the source column, extend the COUNTIFS ranges and the chart will follow; a chart built from typed numbers will not.