In Excel: put time or ordered categories in the first column, values in the next column, select both, then Insert ▸ Line or Area Chart ▸ Line.
Arrange the x-axis labels in the first column and the values in the next column.
Select only the label and value range, excluding totals.
Choose Insert ▸ Line or Area Chart ▸ Line.
Add a chart title, axis labels and markers when the individual points need to be visible.
What this does
A line graph connects values in order, usually across time, so the slope makes direction and change visible. The first column should hold dates, months or ordered categories; the second holds the values to plot. Excel treats each additional numeric column as another line, which is useful for comparing series but messy if totals or helper columns are accidentally selected. The same idea underpins a lot of everyday Excel work, so the few minutes spent getting it right here pay back across every sheet you build afterwards. Treat it as a pattern, not a one-off, and it stops being something you look up and starts being something you reach for. For “plot linear regression in excel”, the reliable version is a short checking loop, not just the first command that appears to work. Run it on a deliberately small range first, watch how the affected cells change, and only then apply the same setup to the full sheet. When this is a ribbon command, the selection matters more than the button: confirm the range, apply the command, then spot-check the output before saving. That is what makes a visual that makes the number obvious at a glance useful in real work: repeatable, auditable, and not dependent on memory or luck.
A worked example
Months Jan through Jun are in A2:A7 and sales 42, 51, 48, 61, 67, 73 are in B2:B7. Select A2:B7, choose Insert ▸ Line Chart, and Excel draws a six-point line rising from 42 to 73. Add markers if individual months matter, and format the vertical axis to start at zero only when that supports the story rather than flattening the change. Line graphs are strong for trends: monthly sales, weekly traffic, running totals, error rates, production output and any metric where readers need to see direction over a sequence. A practical tip before you scale it up: build it once on a small block of test data, confirm the number against the tool on this page, and only then point it at your real sheet. That one habit catches almost every mistake while it is still cheap to fix, long before a wrong figure reaches a report or a colleague.
In Google Sheets
If you are in Google Sheets rather than Excel, the good news is that the formula shown here is identical and the workflow barely changes — menus sit across the top instead of in a ribbon, and a few function names differ slightly, but anything you build here moves across with little or no rework. Nothing on this page is behind a login: the tool runs entirely in your browser, the formula is shown in full with one-click copy, and the steps work the same on Windows and Mac. That is the whole promise here — the exact answer, a way to prove it on your own numbers, and just enough context to make it stick. Here is the takeaway for “plot linear regression in excel”: copy the answer if you are busy, but if you have a spare few minutes, rebuild the example in Excel yourself with the tool above open beside it. That single pass — type it, run it, watch the result move when you change an input — is what turns a formula you found into a technique you trust. Keep your inputs labelled and referenced, never hard-coded, and the same sheet stays correct and auditable as it grows. Done that way, you will not need to look this up again, and you will be the person others ask.
Common mistakes
- Using a line chart for unordered categories, where a bar chart would compare values more honestly.
- Including a total row, which creates a sudden fake spike at the end.
- Letting Excel treat text dates as categories; convert them to real dates when spacing matters.
- Plotting too many series at once, turning the chart into unreadable crossing lines.
Frequently asked questions
When should I use a line graph?
Use it for ordered data, especially time series, where the change from one point to the next matters.
How do I add a second line?
Place the second value series in another column beside the first, include it in the selected range, and Excel plots it as a separate line.
Line chart or scatter plot?
Use a line chart for ordered categories or dates; use a scatter plot when both axes are numeric measurements.
Other ways people ask this
People reach this page typing “how to plot a linear regression in excel” and “how to plot linear regression in excel”, among other phrasings; whichever wording you used, the fix above is the one you want.
Why do people search for this in so many different ways?
Because the same task has many names. “how to plot a linear regression in excel”, “how to plot linear regression in excel” all point at the one operation explained on this page, which is why they all lead here.