Skip to main content

Kutools for Office — One Suite. Five Tools. Get More Done.

How to add vertical/average line to bar chart in Excel?

Author Sun Last modified

When you use a bar chart to show the data, in some cases, you may want to add a vertical line into the bar chart to obviously show the average of the data as below screenshot shown. Now this tutorial is talking about adding a vertical/average line to a bar chart in Excel.

add vertical/average line to bar chart

Add vertical line to bar chart


arrow blue right bubble Add vertical line to bar chart

Now you need to insert a bar chart first.

1. Select your data range, and click Insert > Bar > Bar.

click bar to create a bar charta bar chart is created

2. Then go to a blank cell, here I select Cell A10 to type Y, and then go to the cell next to the Y cell, here is Cell B10 to type X. see screenshot:

type x y into blank cells separately

3. In the two cells below Y cell, type 0 and 1 in each cell. See screenshot:

type 0 1 below Y cell separately

4. Go to the cell below X cell, here is B11, type =AVERAGE($B$2:$B$9) ($B$2:$B$9 is the data range you want to calculate the average), then press Enter key and drag the fill handle to the next cell below it. See screenshot:

enter a formula below x cell

5. Then right click at the bar chart, and click Select Data from context menu

click Select Data from right click menu

6. In Select Data Source dialog, click Add button in the Legend Entries (Series) section.

click add button

7. In the Edit Series dialog, type the new series name you need, and select B11:B12 (B11:B12 is the range you calculate average in step 4).

set options in Edit Series dialog box

8. Click OK > OK to close dialogs. Then select the new series you added in the bar chart, and right click to click Change Series Chart Type in context menu.

click Change Series Chart Type from right click menu

9. In the popped out Change Chart Type dialog, select X Y (Scatter) > Scatter with Straight Lines, and click OK to exit the dialog. See screenshot:

choose X Y (Scatter) chart type

In Excel 2013, select Combo section under All Charts tab, and select Scatter with Straight Lines from the drop down list in Average series, and click OK to exit the dialog.

choose Scatter with Straight Lines from excel 2013

10. Go to the chart and right click to click Select Data in the context menu again.

11. In the Select Data dialog, select Average series and click Edit button.

edit the Average series

12. In Edit Series dialog, select the X values and Y values range. (You just need to add the range cells below Cell Y and Cell X you have typed in step 2 to Y values and X values.)

set options in Edit Series dialog box

13. Click OK > OK to close dialog. Then right click at the right Y axis (the secondary axis), and select Format Axis from the context menu.

click Format Axis from right click menu

14. In the Format Axis dialog, check Fixed option after Maximum and then type 1 into the textbox beside the Fixed option.

set options in Format Axis dialog

In Excel 2013, you just need to directly type 1 into Maximum text box in the Format Axis pane.

15. Close dialog. Now the average vertical line has added into bar chart.

the average vertical line has added into bar chart

You can format the line by right clicking the line and selecting Format Data Series in the context menu, then you can change the line as you need in the Format Data Series dialog/pane.

format line style to your need


Best Office Productivity Tools

šŸ¤– Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions…
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!

All Kutools add-ins. One installer

Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.

Excel Word Outlook Tabs PowerPoint
  • All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
  • One installer, one license — set up in minutes (MSI-ready)
  • Works better together — streamlined productivity across Office apps
  • 30-day full-featured trial — no registration, no credit card
  • Best value — save vs buying individual add-in