Show Sidebar Hide Sidebar

Make a Histogram Chart Online with Plotly and Excel

Histrograms with Plotly

Step 1

Upload your Excel data to Plotly's grid

Open the data file for this tutorial in Excel. You can download the file here in CSV format

Data view

Step 2

Head to Plotly

Head to Plotly's Workspace and sign into your free Plotly account. Go to 'Import', click 'Upload a file', then choose your Excel file to upload. Your Excel file will now open in Plotly's grid. For more about Plotly's grid, see this tutorial

Import data

Select 'Histogram' from the MAKE A PLOT menu.

How to make a histogram with excel

Select only one column of data for a basic histogram (two with the 'group by' option).

Single data column

These values will appear on our x-axis. The heights of the bars of our histogram will denote how many times each value or 'bin' of values appears in the column. To learn more see: histogram

Histograpm with plotly

Click the blue plot button in the sidebar to create the chart. (For more help with the grid see: here

Histogram button

Step 3

Drawing the Curve

Your plot should look something like this.

Histogram chart

Open the FIT DATA popover in the toolbar.

Fitting data

Click through to add a fit to the 'Height' trace.

Choosing a fit

Set up the 'Basic' tab to draw a Gaussian Peak based on the data. Leave the other options blank and click the 'Run this fit' button at the bottom.

Running a fit

Voila, a curve!

Histogram with curve

The popup now shows the fit statistics and parameters in the curve's equation, a+hexp(-(x-x0)^2/(2w^2)).

Fit statistics

(Alternative: if you want to group your values more or less than Plotly has by default, do so in the 'Range/bins' tab of the TRACES popover.)

Bin size

You'll probably want to remake your fit with the revised trace.

Firs trace change

Step 4

Style and Annotate

Your plot should now look something like this. In order to get the graph at the top of the chart, you'll need to style and annotate it.

Histogram with Excel

Open the NOTES popover.

Notes menu item

This is what the NOTES popover looks like. The '+' sign adds new notes. Hide the arrow. Set the 'Move with' option to 'Data', as the note refers to a specific pair of points on the plot.

Adding an annotation with Plotly

Find the note on the plot, and drag it to where you want it. Click the note to edit its text. Use markup to style and format it. <b>MEAN: 72.8''<br>MEDIAN:73''</b>

Graph markup

Click the plot title and axis titles to edit their text. Use markup to link to your source.

Adding titles

<b>HEIGHT (INCHES)</b><br><a href=''''>NHL Draftbook, Justin Fisher</a>

Select the TRACES menu.

Trace styling

This is what the 'Style' tab of the TRACES popover looks like for the 'Height' trace. We've changed the bar color and made them narrower.

Fill color

This is what the 'Style' tab of the TRACES popover looks like for the 'Height - fit' trace. We've changed the line color and stroke.


This is what the 'General' and 'Margins' tabs of the LAYOUT popover should look like.

Layout Options

We're giving our plot a grey background, and we've changed some of the font

Styling margins

This is what the 'Lines' tab of the AXES popover looks like. We're hiding the body grid lines, and turned the zero line off.

Styling Axes

We're removing the legend from the sidebar in the LEGEND popover.

Removing the legend

Step 5

Export & Share

Download an image of your Plotly graph by clicking EXPORT on the toolbar.


Your finished chart should look something like this:


To add the Excel file to your workbook, click where you want to insert the picture inside Excel. On the INSERT tab inside Excel, in the ILLUSTRATIONS group, click PICTURE. Locate the Plotly graph image that you downloaded and then double-click it. Notice that we also copy-pasted the Plotly graph link in a cell for easy access to the interactive Plotly version.


Still need help?
Contact Us

For guaranteed 24 hour response turnarounds, upgrade to our Premium or Enterprise plans.