How to Create a Line Graph in Excel (Step-by-Step Guide)
Learn how to create a line graph in Excel step by step. Format axes, add trendlines, use a secondary axis, and avoid common chart pitfalls.

If you have ever stared at a column of dates and a column of numbers and wondered how to turn that mess into something a manager can actually read in three seconds, a line graph is usually the answer. Excel has built line charts into the ribbon since the 1990s, and the workflow is still about as quick as it gets—assuming you know which Insert button to click and which one to avoid. This guide walks through every step.
We will cover the basic select-data-then-Insert path first because that is what most people actually need. Then we will get into the weeds: choosing between a plain line and a line with markers, plotting two series with wildly different scales, slapping a trendline onto noisy data, and converting your chart into a dynamic one that refreshes when you paste new rows.
You do not need any add-ins for any of this. A vanilla install of Excel 2016 or later (including Microsoft 365 and Excel for Mac) ships with everything required. Where the Mac ribbon differs from Windows, we will flag it. And if you are stuck on Excel 2010, most of this still applies—you just have one less chart preset.
By the end you will know how to create a line graph in Excel, when a line chart is the wrong choice, and the two date-axis pitfalls that quietly ruin maybe a third of all the charts I have ever fixed for colleagues. Let's start with the data.
Step 1: Lay Out Your Data the Right Way
Line charts assume your data flows left-to-right along the X axis. That usually means time. Put your time labels (dates, months, quarters, weeks—whatever) in the first column. Then put each thing you want to plot in its own column to the right, with a header in row 1. That header becomes the legend entry. It really is that simple, and yet people still hand me workbooks with months going across row 1 and values going down. Excel can chart that—you just have to remember to click Switch Row/Column later, which is annoying.
A few quick rules I have learned the hard way:
- No merged cells in the chart range. Excel will accept them but the resulting chart looks broken.
- No blank rows in the middle of your data unless you genuinely want a gap.
- Sort your dates ascending. A line chart with shuffled dates produces a chart that looks like an EKG of a panicked squirrel.
- Use real dates, not text. Type
2025-01-15, notJan 15as a label. Real dates unlock the date axis, which we will need later.
Now select the whole block, headers included. The fastest way is to click any cell inside the range and press Ctrl+A—Excel auto-expands the selection to the surrounding data island. On Mac it's Cmd+A. If you only have one column of numbers and no date column, select just that one column; Excel will use 1, 2, 3 as the X axis labels by default.

The Four-Click Method
The fastest path: Select your data → Insert tab → Line or Area Chart icon → pick the first sub-type. That is it—you have a chart. Everything else in this guide is polish.
Keyboard shortcut for the impatient: select your range and hit Alt+F1 to drop a default chart on the same sheet, or F11 to drop it on a new chart sheet. Excel for Mac uses Fn+Option+F1.
Step 2: Insert → Line Chart
With your range selected, head up to the ribbon and click Insert. About a third of the way across you will see a cluster of chart icons. The line chart icon is the one with the little zigzag—hover over it and the tooltip says Insert Line or Area Chart. Click that, and a drop-down appears with two rows of previews: 2-D line on top, 3-D line on the bottom.
Hover (don't click yet) over each preview. Excel gives you a live preview on the sheet, which is genuinely useful. The seven sub-types are:
- Line – plain old line, no markers. Use this when you have many data points and markers would clutter the chart.
- Stacked Line – series stack on top of each other. Almost always the wrong choice; people read it as if each line is independent.
- 100% Stacked Line – same problem, normalized to 100%. Use a stacked area chart instead.
- Line with Markers – line with dots at each data point. Great for ≤30 points; cluttered above that.
- Stacked Line with Markers – see #2.
- 100% Stacked Line with Markers – see #3.
- 3-D Line – do not. I have never once seen this used by someone who knew what they were doing.
Click the plain Line (top-left) for now. A chart appears on the sheet, sized roughly half a screen. It is selected, which means two new ribbon tabs have appeared: Chart Design and Format. We will live in those tabs for the rest of the guide.
If your chart looks wrong—dates on the Y axis, values on the X axis—click Chart Design → Switch Row/Column. That single button fixes 90% of my chart looks weird
emergencies.
Line Chart Sub-Types: Pick the Right One
One or more clean lines, no dots. Best when you have many data points or want a minimalist look. Default choice for most dashboards.
Dots at each value. Great for quarterly KPIs, monthly check-ins, or anything with under ~30 points. Helps the reader see exact data points.
Series sit on top of each other. Readers misinterpret it as independent lines. If you genuinely want stacked, switch to a stacked area chart.
Looks fancy, distorts perception of values. Banned in every data viz style guide worth reading. The ribbon includes it; you should not.
Step 3: Format the Chart (Titles, Axes, Legend)
Right now your chart probably has a default title that says Chart Title
and uses an unhelpful color scheme. Time to fix that.
Click the chart once to select it. You will see three small icons floating on its right edge: a plus, a paintbrush, and a funnel. The plus opens Chart Elements—check or uncheck axes, axis titles, chart title, data labels, gridlines, legend, trendline, and so on. The paintbrush opens Chart Styles for quick theme swaps. The funnel filters which series and categories are shown without changing your underlying data.
For the chart title, just double-click it and type. For axis titles, tick the box under the plus icon. The axis title that shows up will say Axis Title
; click it and type the real label. Always label your axes—Revenue ($M)
is more useful than a number floating on its own.
To format the Y axis values themselves, right-click the axis numbers and choose Format Axis. A pane opens on the right with four tabs of options. The two you will use most:
- Axis Options → set Minimum and Maximum bounds. By default Excel auto-scales, which usually exaggerates fluctuations. Set the minimum to 0 if your values can't go negative.
- Number → format the displayed values.
Currency
,Percentage
, or a custom format like$#,##0Kfor thousands.
Want different colors for each line? Click the line once (selects all data points), then right-click and pick Format Data Series. Under the paint-bucket icon, change the line color, width, dash type, and smoothing. Hold off on Smoothed Line—it interpolates curves between your data points, which can mislead viewers about values that don't exist.

Click the line you want to recolor (one click selects the whole series), then right-click and choose Format Data Series. Open the paint-bucket icon, pick Line → Solid line, and choose your color from the swatch.
For brand colors, hit More Colors → Custom and paste a hex code. Excel remembers recently-used colors at the bottom of the swatch, which speeds up multi-chart workbooks.
Step 4: Add a Trendline and Secondary Axis
Trendlines are the feature people most underuse. A trendline is a smoothed line that approximates your data's underlying direction—great for noisy series where the eye can't pick out the signal.
To add one: click the data series, then click the plus icon and tick Trendline. The default is linear. Click the small arrow next to Trendline for other options: Exponential, Linear Forecast, Two Period Moving Average, More Options. For most business data, the moving average smooths out month-to-month noise without making bold claims about the future.
If you want forecasting, choose More Options and set Forecast Forward to however many periods you want to project. Tick Display Equation on chart and Display R-squared value on chart so the reader can see the math. An R² below ~0.7 means your trendline isn't fitting the data well; reconsider before publishing.
Plotting Two Series with Different Scales
This is one of the most common reasons people search how to create a line graph in Excel and then get stuck. Say you want to plot website visits (range 0–50,000) and conversion rate (range 0%–5%) on the same chart. Plot them both on the primary axis and conversion rate becomes a flat line near zero.
Solution: a secondary axis. Right-click the smaller series, choose Format Data Series → Series Options → Plot Series On → Secondary Axis. A second Y axis appears on the right, scaled to the smaller series. Now both lines occupy roughly the same vertical space.
Add an axis title to clarify which line uses which axis, or change the line colors to match each axis title's color. A reader should not have to squint to figure out which axis goes with which line.
Pitfall 1: Dates stored as text. If your X axis shows every single date crammed together with no spacing logic, your dates are probably text. Click a date cell—if it shows left-aligned and as you typed it, it's text. Highlight the column, hit Ctrl+Shift+3 for date format, then use Data → Text to Columns → Finish to coerce them into real date values.
Pitfall 2: Auto-grouping months. Excel sometimes assumes a date axis should show monthly buckets even if your data is daily. Right-click the axis → Format Axis → set Major unit to Days
and your daily data will plot point-by-point instead of being averaged.
Step 5: Make Your Chart Dynamic with an Excel Table
Here's a problem nobody warns you about. You build a beautiful chart from rows 2–100. Next month, you paste rows 101–130 of new data. The chart ignores them. Now you have to right-click the chart, pick Select Data, and manually extend the range. Every month. Forever.
The fix takes about 15 seconds. Convert your data into an Excel Table before you build the chart. Click any cell in your data, press Ctrl+T, confirm the range includes headers, and click OK. The data gets banded colors and filter arrows. More importantly, it now has a name (visible in the Name Box on the left—something like Table1).
Now build your line chart from the table the same way as before. The difference: every time you add a row to the bottom of the table, Excel auto-extends the chart range. Same for columns—add a new metric as a column and a new series appears on the chart automatically.
Pair this with a PivotTable feeding a PivotChart and you have a chart that updates itself when new data arrives in the source. PivotCharts have a few quirks (you can't easily add trendlines, and some chart elements get reset on refresh), but for monthly dashboards they're hard to beat.
Exporting the Chart as an Image
For slide decks or emails, right-click the chart and choose Save as Picture. PNG works for most uses; SVG keeps the chart sharp at any zoom level but doesn't render in older PowerPoint versions. You can also just select the chart and hit Ctrl+C, then paste into Word/PowerPoint as a picture or as a linked object that updates when the source changes.

- ✓Data is sorted ascending by date (or sequential category)
- ✓Headers in row 1, no merged cells in the chart range
- ✓Chart title describes the takeaway, not just the metric
- ✓Both axes are labeled with units ("Revenue ($M)" not "Revenue")
- ✓Y axis starts at zero unless you have a strong reason
- ✓Series colors are distinct (avoid red/green if printing in mono)
- ✓Legend is on top or right, not crammed below
- ✓Trendline (if used) has R-squared displayed and explained
- ✓Secondary axis (if used) is labeled with matching line color
- ✓Data source is converted to an Excel Table for auto-extension
When a Line Chart Is the Wrong Choice
Line charts are for continuous change. If your X axis represents discrete categories with no order—product types, departments, regions—a line chart implies a relationship between them that doesn't exist. Use a bar chart or column chart instead.
Some quick rules of thumb:
- Comparing categories? Bar chart. Sales by region is not a trend.
- Showing parts of a whole? Stacked bar or 100% stacked column. Pie charts work for two or three slices only.
- Two variables, looking for correlation? Scatter plot. A line chart with one variable on each axis is misleading.
- Distribution of a single variable? Histogram or box plot, not a line chart.
- Showing change over time? Line chart, every time.
One more thing: line charts work best with at least 5–6 data points. With three points, a line chart looks like a tent. Use a column chart for quarterly data with only a year of history.
The flip side: if you have hundreds or thousands of data points (think stock prices, sensor readings), a line chart is the only sane choice. Just use the plain line sub-type, drop the markers, and consider a moving-average trendline to surface the signal.
And remember—just because Excel offers a chart type doesn't mean it's a good idea. The 3-D options exist for legacy reasons. Stick to 2-D charts and your work will look more credible, not less.
Putting It All Together
Let's walk through one end-to-end example. You have monthly revenue for three product lines from January 2023 to April 2026—40 months of data, three columns of numbers, dates in column A. Here's the full workflow:
- Click any cell in your data, press Ctrl+T to convert it to a Table.
- With the data still selected, hit Alt+F1 for an instant default chart.
- Click the chart title, type
Quarterly Revenue by Product Line, 2023–2026
. - Click the plus icon, check Axis Titles. Label the Y axis
Revenue ($M)
and the X axisMonth
. - Right-click the Y axis → Format Axis → set minimum to 0, format as Currency with no decimals.
- Right-click the X axis → Format Axis → set axis type to Date axis.
- If one product line has a much smaller scale, right-click that series and plot it on a Secondary Axis.
- Add a 6-month moving average trendline to your most important series for forecasting context.
- Save the chart as a PNG via Save as Picture for use in your monthly report.
The whole exercise takes under five minutes once the data is clean. The next month, when you paste 30 new rows, your chart updates automatically thanks to the Table you set up in step 1. That's the entire workflow professional analysts use, with no add-ins required.
Final Thoughts
A line chart is one of those tools that looks trivial until you've fixed enough broken ones to spot the patterns. The four-click insert is genuinely fast. The judgment calls—sub-type, axis type, secondary axis, trendline—are where you separate a chart that informs from one that confuses.
If you remember nothing else, remember this: convert your data to a Table first, use real dates not text, label both axes with units, and skip the 3-D options. Everything else you can fix in a minute or two.
Got a dataset that doesn't fit the line-chart pattern? Refer back to the When a Line Chart Is the Wrong Choice section above and pick the right tool. Excel is generous with chart types—the trick is knowing which one earns its keep.
Excel Questions and Answers
About the Author
Attorney & Bar Exam Preparation Specialist
Yale Law SchoolJames R. Hargrove is a practicing attorney and legal educator with a Juris Doctor from Yale Law School and an LLM in Constitutional Law. With over a decade of experience coaching bar exam candidates across multiple jurisdictions, he specializes in MBE strategy, state-specific essay preparation, and multistate performance test techniques.