A line graph with two variables in Excel is built from a label column and a numeric value column, with one row per data point and a single line connecting the values in the order they appear. The Line Graph Maker follows that same model: you paste Label, Value rows (the two variables), and it draws one connecting line in your browser. This works well for monthly totals, daily readings, project milestones, experiment trials, and other ordered sequences where the direction of change matters more than precise x-axis distance. Unlike Excel's chart wizard, the tool needs no menu navigation, no file upload, and no login — parsing, coordinate calculation, preview rendering, and SVG download all happen locally in the current page. The trade-off is that it draws one line, not two or more side-by-side series, and the horizontal positions are spaced evenly by row index rather than by date or measured x distance. If that matches your data, you can go from a copied Excel range to a downloadable chart in well under a minute.

how to make line graph in excel with 2 variables
Turn Excel's Two Columns Into a Line Graph in Your Browser

What "two variables" means for this tool

Most readers who search for a line graph in Excel with two variables are working with a table that has two columns — one categorical or temporal label (month, day, region, trial number) and one numeric measurement (sales, temperature, count). The two variables are the label and the value; the line then shows how the value moves as you walk through the labels in order.

Excel handles this by selecting both columns, inserting a Line chart, and adjusting axes through the ribbon. The Line Graph Maker takes the same input shape — two columns of values — and asks you to express it as Label, Value text. Each row becomes one point on the x-axis; the value sets the height on the y-axis; adjacent points are joined by a straight segment so the eye can follow the rise and fall.

If your "two variables" instead means two parallel data series (for example, temperature and humidity over the same months, drawn as two lines on one chart), this single-line tool is not the right destination. See the comparison further down for when to choose a different approach.

Prepare your Excel data for the paste

Before you open the tool, get your Excel range into a clean two-column state. The tool's parser uses the last comma on a non-empty line as the separator between label and value, so the simplest preparation is to follow a short checklist.

  • Keep only the two columns you need. Hide or delete any extra header text, totals row, or commentary that sits between the data and the chart.
  • Make sure every value is numeric. Empty labels, non-numeric values, the words Infinity or NaN, and magnitudes above 1×10¹² are reported as invalid and skipped.
  • Sort the rows in the order you want them drawn. The tool does not sort for you; it plots rows in entry order, with the first valid row placed at the left edge of the plot and the last at the right.
  • Decide whether your labels should contain commas. They may — "New York, East" works fine — but only the final comma on each line acts as the separator, so keep the rest of the label's commas to the left of the value.

Once your two columns look right, copy them from Excel, paste into any plain-text editor, and confirm the result is a list with one row per data point. That text list is what feeds the tool.

Enter your data and generate the chart

  1. Open the Line Graph Maker in your browser.
  2. Type a concise chart title in the title field (something like "Monthly Sales, 2025").
  3. In the data area, enter one row per point using Label, Value format. For example: "January, 1240" on the first line, "February, 980" on the next, and so on through "May, 1610".
  4. Click Generate. The tool parses each row, separates the label and the value, and draws the chart using equal horizontal spacing between consecutive points.
  5. Read the notices next to the result. The tool counts invalid rows (empty labels, malformed numbers, out-of-range magnitudes, or Infinity) and over-limit rows (anything beyond the 200-row processing cap) separately, so you can tell which problem to fix.
  6. Inspect the preview: check the chart title, the axis range printed on the y-axis, the order of points, and the connecting line. If a row was skipped, the count appears beside the result.
  7. If anything looks off, edit the data and click Generate again. The previous chart clears and the download button stays disabled until the new chart is ready, so the visible chart always matches the current input.

Reading the axis range and the notices

The vertical axis uses a linear scale that runs from the smallest valid value you entered to the largest, with five evenly spaced reference lines and labels. Because the domain is the data's actual minimum and maximum — not a forced zero — a chart of values 980, 1010, 990, 1020 will look dramatic even though every reading is close to 1000. Always read the axis labels before judging the size of a change.

When every value is identical, the tool expands the domain symmetrically around that constant so the single horizontal line is drawn in the middle of the plot area instead of collapsing to a zero-height artifact. If your data is supposed to vary and you see this symmetric band, look for a paste error that turned every value into the same number.

Numeric handling follows standard JavaScript double-precision arithmetic. Axis labels are rounded for readability and switch to scientific notation for very small or very large magnitudes, but the underlying data is not given extra precision. If your source numbers have known uncertainty or audit-grade precision, keep the original spreadsheet — the chart is for visualization, not measurement. Rounded axis text can also be shorter than the full internal number, which is expected and does not indicate lost data.

When this approach does not fit

The Line Graph Maker draws a single line with categorical x-axis spacing. Use the table below to decide whether your data fits or whether to stay inside Excel instead.

Your data situationBest destination
One numeric series with categorical labels (months, days, regions, trials)Line Graph Maker
Two or more parallel numeric series (for example temperature and humidity)Excel multi-series Line chart or an XY scatter tool
Dates with uneven gaps between observationsExcel date-aware axis or a plotting tool with explicit x columns
Need for a regression line, moving average, or confidence bandExcel trendline options or a statistics package
Brand-specific colors, fonts, or accessibility metadata requiredDownload the SVG, then edit it in a vector application

A few clarifications worth stating in plain words. For a side-by-side comparison such as "temperature vs. humidity over the same months," use Excel's multi-series Line chart or a plotting tool that accepts x, y, series rows. The weekly reading followed by a four-month gap is the classic case where equal spacing misleads readers; Excel's date-aware axis handles irregular gaps correctly. The tool does not calculate regression, moving averages, confidence intervals, error bars, or interpolation between observations, so the line shows sequence and direction rather than evidence of values that exist between your measurements. Finally, the exported SVG uses a white background and a blue line for broad compatibility; if your publication requires a house palette or specific typography, edit the file in a vector application after export.

For the simpler single-variable case — Excel data with one numeric column and the labels already obvious — the single-variable Excel workflow guide covers that adjacent task.

Download and use the SVG

Once the chart looks right and the skipped-row count is zero (or matches what you expected), click Download SVG. The file is a standalone vector document — no external fonts, no embedded raster images — that opens in any modern browser by double-click and imports into Illustrator, Inkscape, Affinity Designer, Figma, PowerPoint, Keynote, and Google Slides.

Because the output uses an 800 by 480 viewBox, the chart stays sharp at any zoom level or print size and does not inherit pixel blur from a screenshot. Point titles (label and formatted value) are embedded so that hovering or focusing through an SVG-aware viewer exposes them for screen readers and inspection.

The full chart pipeline — parsing, coordinate calculation, preview rendering, and download assembly — runs in the current browser. The text you enter is not uploaded to a server, which matters when the underlying numbers are sales figures, patient readings, classroom grades, or anything else you do not want leaving your device. If you need to verify the chart matches the SVG specification when exchanging files with a designer or a publisher, the MDN SVG tutorial describes the element model you will see when opening the file in a text editor.