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.
- 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.
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.
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.
| Row | What | Formula (column A; same for B) | Example |
|---|---|---|---|
| 9 | Mean | =AVERAGE(A2:A7) | 4.58 / 6.83 |
| 10 | SD | =STDEV.S(A2:A7) | 0.59 / 1.25 |
| 11 | n | =COUNT(A2:A7) | 6 / 6 |
| 12 | P value (Welch’s t test) | =T.TEST(A2:A7,B2:B7,2,3) | 0.0052 |
| 13 | Symbol | =IF(B12<0.001,"***",IF(B12<0.01,"**",IF(B12<0.05,"*","ns"))) | ** |
| 14 | Height for the star (just above bar + SD) | =(A9+A10)*1.08 | 5.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
- Select the two means (A9:B9) and choose Insert > Column chart.
- Select the chart, click the + (Chart Elements) button, then the arrow next to Error Bars > More Options.
- In Format Error Bars choose Custom > Specify Value, and set both Positive Error Value and Negative Error Value to the SD cells (A10:B10).
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)
- 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.
- For the small downward ticks at each end, add two short vertical lines, or rotate a bracket shape.
- 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. - 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.
- Add row 14 (the star height) to the chart as a new series (right-click the chart > Select Data > Add).
- Right-click the new series > Change Series Chart Type > Line, then set No Line and No Marker, so only the positions remain.
- 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
- Assuming the “Standard Deviation” error bar is each group’s SD. It is not (see the note above). Always use Custom with your own SD cells.
- Repeating T.TEST with three or more groups. Three t tests (control vs A, control vs B, A vs B) make chance findings more likely. Use ANOVA with multiple comparisons (Tukey vs Dunnett).
- Not defining the stars. Write “*P < 0.05, **P < 0.01” in the legend. Thresholds and example legends are in what the asterisks mean.
- Changing the data but not the stars. Shapes are not linked to cells. At the end, check that the T.TEST results match the symbols on the graph.
- Bars without points. With small n, overlaying the individual data points lets readers judge the spread, and many journals ask for it.
Example legend
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.
Related guides
Product and journal names are trademarks or registered trademarks of their respective owners.