CalculatorsToolsGuides 日本語
BenchFig › Guides › How to add significance brackets and asterisks to an Excel graph
Publication figures

How to add significance brackets and asterisks to an Excel graph

Excel has no built-in way to add significance brackets or asterisks to a chart. T.TEST gives you the P value, but the bracket and stars have to be placed with shapes or data labels. This guide walks through the Excel steps with a worked example, and includes a free calculator that draws the starred graph for you if you would rather not draw it by hand.

Updated: BenchFig日本語
Key points
  • Excel cannot add brackets or stars automatically. Get P from T.TEST, then place the bracket and stars with shapes or data labels
  • Use Custom error bars pointing to your own SD cells. The built-in “Standard Deviation” option is not each group’s SD
  • With three or more groups, do not repeat t tests: use the P values from ANOVA plus multiple comparisons
  • In the legend, state “bars = mean ± SD, dots = samples, the test, and the star definitions”

Shortcut: paste values, get the starred graph (free)

To preview the figure before drawing it in Excel, or to skip drawing altogether, paste your two groups into the calculator below. Along with the t test P value you get a bar + dot plot with SD error bars and the significance bracket, and “Save as PNG (free)” lets you keep it. The numbers are processed only in your browser.

Your numbers are processed only in this browser. Nothing is sent to a server (it is gone when you close the page).

Copy a column in Excel and paste it (one value per line). Paste two columns at once and they are split into A and B. A text first line becomes the group name. Blanks, N/A and #DIV/0! are treated as missing; decimal commas such as 12,5 are understood.

Unpaired
Paired (same subjects before/after)

For three or more groups, use the one-way ANOVA calculator (stars from Tukey or Dunnett comparisons are drawn on the graph).

Step by step in Excel (two-group bar graph)

This is the figure we are aiming for, using made-up data: control and treated, six measurements each.

0246810ControlTreatedValue**
A. Bracket and asterisks
0246810ControlTreatedValueP = 0.005
B. Exact P value
The figure this guide aims for (example data, n = 6 each, made up). Bars = mean, error bars = SD, dots = samples. Welch’s t test gives P = 0.0052, so ** (P < 0.01). Drawn with BenchFig.

1. Calculate the mean, SD, P value and star in cells

Put the control values in A2:A7 and the treated values in B2:B7, then add these formulas below.

P and the symbol go in column B (treated). In T.TEST, the third argument 2 = two-tailed and the fourth 3 = unequal variances (Welch).
RowWhatFormula (column A; same for B)Example
9Mean=AVERAGE(A2:A7)4.58 / 6.83
10SD=STDEV.S(A2:A7)0.59 / 1.25
11n=COUNT(A2:A7)6 / 6
12P value (Welch’s t test)=T.TEST(A2:A7,B2:B7,2,3)0.0052
13Symbol=IF(B12<0.001,"***",IF(B12<0.01,"**",IF(B12<0.05,"*","ns")))**
14Height for the star (just above bar + SD)=(A9+A10)*1.085.58 / 8.73

For independent groups, 3 (Welch) is the recommended fourth argument; use 1 (paired) for before/after measurements on the same subjects. See how to do a t test.

2. Make the bar graph and use your own SD for the error bars

  1. Select the two means (A9:B9) and choose Insert > Column chart.
  2. Select the chart, click the + (Chart Elements) button, then the arrow next to Error Bars > More Options.
  3. In Format Error Bars choose Custom > Specify Value, and set both Positive Error Value and Negative Error Value to the SD cells (A10:B10).
Do not use the “Standard Deviation” button. According to Microsoft’s formula, that error amount is a single value calculated from the plotted values (here, the heights of the two bars), not each group’s SD. In this example it is 1.59, matching neither the control SD (0.59) nor the treated SD (1.25). “Standard Error” works the same way.

To overlay individual data points on the bars, see how to add SD error bars and data points in Excel.

3a. Draw the bracket and stars with shapes (most reliable)

  1. With the chart selected, choose Insert > Shapes > Line and hold Shift while drawing a horizontal line above the two bars. Drawing with the chart selected puts the shape inside the chart, so it moves with the chart.
  2. For the small downward ticks at each end, add two short vertical lines, or rotate a bracket shape.
  3. Insert a text box, type ** and place it above the middle of the line. Set the text box to No Fill and No Outline, and match the font size to the axis labels.
  4. Shift-select the lines and text box, right-click > Group, so they stay together.

3b. Align stars above the bars with data labels (comparisons with control)

If you only put a star above each group (and say “vs control” in the legend), data labels can position the symbols for you.

  1. Add row 14 (the star height) to the chart as a new series (right-click the chart > Select Data > Add).
  2. Right-click the new series > Change Series Chart Type > Line, then set No Line and No Marker, so only the positions remain.
  3. Add Data Labels to that series, right-click a label > Format Data Labels, untick Value and tick Value From Cells, selecting row 13 (the symbols). Set the position to Above.

Value From Cells (Excel 2013 and later) maps a range of cells to the data labels one by one. When the data change, the height and symbol formulas recalculate and the stars move with them. Leave the symbol cell for the control group blank.

Common mistakes

Example legend

Bars show mean ± SD; dots are individual samples (n = 6). Welch’s t test. **P < 0.01.

For the results sentence in the text (t(7.10) = 3.98, P = 0.0052), see how to report statistics; the calculator above also writes it for you.

Sources: Microsoft Support, “Add, change, or remove error bars in a chart” (error bar steps and the Standard Deviation / Standard Error formulas, checked 2026-11-10); Microsoft Learn, “DataLabels.ShowRange” (mapping a cell range to data labels). Menu names can differ slightly between Excel versions.

FAQ

Can Excel add significance stars automatically?

No. The chart elements (error bars, data labels and so on) have no significance option, so the bracket and stars are placed with shapes (lines and text boxes) or with “Value From Cells” data labels. T.TEST calculates the P value for two groups.

How many asterisks mean what?

The common convention is * P < 0.05, ** P < 0.01 and *** P < 0.001. It is a convention, not a rule, so define the symbols in the figure legend. See the guide to what the asterisks mean.

Can I use T.TEST for stars with three or more groups?

Not recommended. Repeating t tests for every pair inflates false positives. Use one-way ANOVA with multiple comparisons (Tukey, Dunnett) and put stars from those P values. Excel’s Analysis ToolPak has no Tukey or Dunnett, but the free ANOVA calculator does.

Does this work in Excel for Mac?

Yes. Shapes, text boxes and custom error bars exist on the Mac too; according to Microsoft, the error bar options are under Chart Design > Add Chart Element. The calculator on this page runs in the browser, so it works on a Mac as well.

Can I use the graph from this page in a paper?

You can save a PNG for free (2× screen size with a small BenchFig mark), fine for slides and drafts. Journal resolutions (300/600 dpi), PDF, TIFF and journal sizes are exported with BenchFig Pro (Windows).

I changed my data and the stars moved out of place

Shapes are not linked to chart values, so they must be redrawn. Data labels using Value From Cells follow the height formula, but the bracket itself still has to be adjusted by hand, so draw it once the numbers are final.

Three or more groups, with brackets placed automaticallyPaste your table into the graph screen and choose a test (ANOVA, Tukey, Dunnett…): brackets and stars are stacked so they never overlap. Free, no sign-up.
Open for free →
Your own data, all the way to the final figure.Loading your files, saving, and journal-ready export (PDF, TIFF, PNG, SVG) are in BenchFig Pro for Windows, updated based on researchers’ requests: ¥3,980/year (2 PCs), with lab and perpetual licenses too.
About the app →

Related guides

Product and journal names are trademarks or registered trademarks of their respective owners.