How to Make a Violin Plot in Excel (and Faster Alternatives)

Excel has no violin chart, so here is how to build one with formulas and which faster workarounds exist.

Excel has no built-in violin chart type. At the time of writing, the chart gallery in Excel for Microsoft 365 includes a box and whisker chart and a histogram, but no violin. You can still build one by hand: estimate the density with formulas, then plot it as a mirrored scatter chart. This guide shows that method, the other workarounds, and how long each one takes.

If you just need the picture, the fastest route is to copy your column from Excel and paste it into our free violin plot maker. It draws the chart in your browser and lets you download it, with no add-in or signup.

What Excel offers instead

Excel 2016 and later, including Microsoft 365, include a Box and Whisker chart under the statistical charts. It shows the median, quartiles, whiskers and outliers. It does not show the shape of the distribution, so two very different datasets can produce the same box. That gap is the main reason people want a violin. Our comparison of the violin plot vs box plot shows what each one hides.

The Histogram chart shows shape for one dataset at a time. It is awkward for comparing several groups side by side, which is what violins do well.

Your options compared

MethodEffortNeedsGood for
Formulas plus mirrored scatter chartHigh the first time, then reusableAny recent ExcelStaying fully inside Excel
Python in Excel (seaborn)Low if you know a little PythonA Microsoft 365 plan that includes Python in ExcelRepeat work inside a workbook
Third-party statistics add-inLow once installedInstall rights, often a paid licenceTeams that already use the add-in
Paste into an online makerVery lowA browserOne-off charts for reports and slides

Method 1: build a violin with formulas

A violin is a kernel density estimate drawn on both sides of a centre line. Excel can calculate a Gaussian kernel density with SUMPRODUCT and NORM.S.DIST. The steps below build one violin. Repeat the block for each group.

Step 1: put the data in one column

Place the values for one group in A2:A101. Adjust the range to your data. Remove blanks and text, because they break the counts.

Step 2: choose a bandwidth

The bandwidth sets how smooth the outline is. Silverman’s rule of thumb is a common starting point. Put this in H2:

=0.9*MIN(STDEV.S(A2:A101),(QUARTILE.INC(A2:A101,3)-QUARTILE.INC(A2:A101,1))/1.34)*COUNT(A2:A101)^(-1/5)

A smaller value shows more bumps. A larger value smooths them away. Try halving and doubling it to see how sensitive your chart is. The violin plot bandwidth guide explains the trade-off.

Step 3: create a grid of y values

The density is calculated at evenly spaced points from the minimum to the maximum. In Microsoft 365 or Excel 2021 and later, one formula in D2 fills 50 rows:

=SEQUENCE(50,1,MIN(A2:A101),(MAX(A2:A101)-MIN(A2:A101))/49)

In older versions, put =MIN(A2:A101) in D2, then =D2+(MAX($A$2:$A$101)-MIN($A$2:$A$101))/49 in D3, and fill down to D51.

Step 4: calculate the density

In E2, enter this and fill down to E51:

=SUMPRODUCT(NORM.S.DIST((D2-$A$2:$A$101)/$H$2,FALSE))/(COUNT($A$2:$A$101)*$H$2)

For each grid value, this adds up a small normal curve centred on every data point. That sum is the kernel density estimate. FALSE tells NORM.S.DIST to return the curve’s height rather than the cumulative probability.

Step 5: mirror the density

Scale the density so the widest point is a fixed half-width, here 0.4, around a centre of 1. For the second group, use a centre of 2, and so on.

F2 (right edge):  =1 + E2/MAX($E$2:$E$51)*0.4
G2 (left edge):   =1 - E2/MAX($E$2:$E$51)*0.4

Fill both down to row 51. Dividing by the maximum gives every violin the same width. If you want widths to reflect sample size, divide by one shared maximum across all groups instead.

Step 6: plot it

  1. Insert a Scatter with Straight Lines chart.
  2. Add a series with X values from F2:F51 and Y values from D2:D51.
  3. Add a second series with X values from G2:G51 and the same Y values.
  4. Give both series the same colour and remove the markers.
  5. Set the horizontal axis to run from 0.5 to the number of groups plus 0.5, then hide its labels and add text boxes or data labels for group names.

You now have the outline of a violin. To mark the median, add one more series: a single point with X = 1 and Y = MEDIAN(A2:A101). Quartiles work the same way with QUARTILE.INC.

Limits of the formula method

  • Filled violins are hard. Scatter charts draw lines, not filled shapes. Some people fake a fill with stacked area charts or thick lines, but it takes a lot of fiddling.
  • Every group needs its own block of formulas and two chart series.
  • Large datasets slow down, since each density cell loops over every data point.
  • The ends of each violin are open unless you add a closing line.

Once built, though, the workbook is reusable. Paste new data into column A and the chart updates.

Method 2: Python in Excel

Some Microsoft 365 plans include Python in Excel, which runs Python code in a cell with the =PY() function. The bundled environment includes seaborn, so a short script can draw a real violin from a table in your sheet. Availability depends on your plan, platform and region, so check whether =PY appears in your Formulas tab. The seaborn steps are in our violin plot in Python guide.

Method 3: add-ins

Several third-party statistics add-ins for Excel advertise violin or density plots. Features and prices change, so check the vendor’s current feature list and whether your organisation allows installing add-ins before you rely on one. An add-in makes sense if your team already uses it for other analysis. It is a lot of setup for one chart.

Method 4: paste the column into an online maker

For a one-off chart, this is the least work:

  1. Select your data column (or columns, one per group) in Excel and copy it.
  2. Open the online violin plot tool and paste.
  3. Pick a style, for example with a box inside or with the data points shown.
  4. Download the image and insert it into Excel, Word or PowerPoint.

The trade-off is that the image does not update when your data changes. You paste again instead.

Reading the result

Whichever method you use, read the width at each height as “how common values are here”. A violin with two bulges means two clusters of values, which a box and whisker chart would hide. If a group has only a handful of points, show the points too, because a smooth outline can look more certain than the data is. Our guide on how to read a violin plot goes further, and the violin plot guide covers when the chart is the right choice.

FAQ

Does Excel have a violin plot?

Not as a built-in chart type. Excel for Microsoft 365 includes box and whisker and histogram charts, but a violin has to be built with formulas, an add-in or another tool.

What is the closest built-in chart?

The Box and Whisker chart, available since Excel 2016. It shows quartiles and outliers but not the shape of the distribution.

Which Excel functions calculate the density?

SUMPRODUCT with NORM.S.DIST(...,FALSE) gives a Gaussian kernel density estimate. You divide by the count times the bandwidth.

Can I make a violin plot from Excel data without formulas?

Yes. Copy the column and paste it into a free online violin plot maker, then download the chart and insert it back into your file.

Adrian Lee
Adrian Lee

Adrian Lee is the Data Visualization Specialist and Statistical Analyst at ViolinPlot. Based in Boston, Massachusetts, Adrian utilizes a robust background in statistics and data science to create compelling and insightful visualizations that help interpret complex data.

With extensive experience in data analysis and visualization techniques, Adrian specializes in developing violin plots and other advanced graphical representations to convey statistical information effectively. Adrian’s expertise includes statistical modeling, data interpretation, and the creation of interactive visualizations.

At ViolinPlot, Adrian is responsible for transforming raw data into visual narratives that are both informative and engaging.

By employing state-of-the-art visualization tools and statistical methods, Adrian ensures that the visual representations are accurate, clear, and valuable for decision-making processes.

Adrian’s dedication to enhancing data comprehension through visual tools has established ViolinPlot. As a leading resource for data visualization and statistical analysis.

Articles: 89

Ready to Unlock Deeper Data Insights?

Transform complex datasets into clear, interactive visualizations with Violin Plot. Start exploring data distributions in a way that empowers insight and drives smarter decisions.

LEARN MOre
100% satisfaction guaranteed
McAfee SECURE
ssl-secured
verisign-secured
BEST-PRICE-GUARANTEED-free-trust-badge
guaranteed-safe-checkout-1