Excel does not print the R-squared value on a chart automatically, but you can get it in a few clicks: right-click any data series in a scatter (XY) chart, choose Add Trendline, and in the Format Trendline pane tick Display R-squared value on chart. The number then appears as a label next to the trendline. That is the whole job. Two things have to be true first: the chart has to be a scatter chart, because trendlines only fit that chart type reliably, and the X column has to hold real numbers, not text.

What You'll Need

  • Excel for Windows, Mac, Excel on the web, or a current Excel mobile build - the exact labels can differ slightly by version, device and region
  • Two columns of data: one independent variable (X) and one dependent variable (Y), with matched rows
  • A scatter chart built from those columns
  • Enough data points to be meaningful - a handful of points will still produce a number, but it will not tell you much

Step-by-Step

  1. Lay out the data properly. Put your X values in one column and your Y values in the column beside it, one observation per row. Do not leave blank rows in the middle. Make sure the X values are formatted as numbers - if Excel shows them left-aligned by default, or a small green triangle appears in the corner, they are probably text and an XY chart will treat them as categories.
  2. Select both columns, including headers. Drag across the X and Y columns so the header cells are included; Excel then uses the headers as series names and axis titles.
  3. Insert a scatter chart. Go to Insert, find the Charts group, click the scatter icon and pick the plain Scatter option with markers only. Avoid Line, Column and Bar charts - a trendline can sometimes be added to them, but the fit and the R-squared are only trustworthy on a scatter (XY) plot where both axes are numeric.
  4. Right-click a data point. Click any marker in the series. If you have several series plotted, click one in the series you want to fit.
  5. Choose Add Trendline. A pane opens on the right. On Mac and on the web version the wording is the same, but the pane may open as a floating window.
  6. Pick the trend type. Linear is the default and the right choice for most data. Choose Exponential, Logarithmic, Polynomial or Power only if the shape of the points clearly calls for it.
  7. Tick the R-squared checkbox. At the bottom of the Trendline Options section, check Display R-squared value on chart. Optionally also tick Display Equation on chart to see the slope and intercept.
  8. Read the value. A small text box appears on the plot, usually reading something like R² = 0.8734. Drag it somewhere clear so it does not sit over the data.
  9. Format it if it looks ugly. Select the label box, then use the Home tab's font and number tools, or right-click and use Format Trendline Label to set the number format and decimal places.
  10. Sanity-check the result. Compare the label against Excel's own calculation. Put the same X and Y ranges into =RSQ(known_ys, known_xs) in an empty cell. Note the argument order: the Y range comes first. The two numbers should match to the displayed precision.

Common Mistakes

  • Using the wrong chart type. The most frequent problem by far. A line chart or column chart will give you a trendline that does not behave like a regression on the actual X values. Convert to a scatter chart.
  • Swapping X and Y in RSQ. =RSQ(known_ys, known_xs) takes the Y range first. Reversing them gives you the R-squared of the reverse regression, which is different unless the relationship is a perfect straight line.
  • X values stored as text. Numbers imported from another system often arrive as text, with leading apostrophes or non-breaking spaces. The chart then plots categories at equal spacing and the fit is meaningless.
  • Fitting the wrong series. With multiple series on one chart, each trendline belongs to one series only. Right-clicking the wrong marker adds a fit for the other group.
  • Reading R-squared as cause. A high R-squared means the line describes the points well, not that X causes Y. It also says nothing about whether the straight-line model is the right shape for your data.
  • Assuming mobile can do it. The Excel mobile apps allow limited chart editing, and adding a trendline with a displayed R-squared label is not a reliable option there. Build or edit the chart on desktop or in Excel for the web instead.
  • Forgetting that polynomial fits inflate R-squared. Raising the polynomial order almost always raises the number, even when the extra terms add nothing useful. Keep the order as low as the data justifies.

Tips

  • Keep a clean copy of the raw data on a separate sheet before you start charting, so an accidental sort or edit does not quietly change the fit.
  • Add the data labels or a chart title that states what the axes are; a bare R-squared label is meaningless without context.
  • If you need more than the R-squared - slope, intercept, standard errors - use the Analysis ToolPak's Regression tool (enable it via File > Options > Add-ins > Excel Add-ins > Analysis ToolPak). It produces a full summary table.
  • Set the number format on the trendline label to a fixed number of decimals so the figure does not change width as you edit the chart.
  • When you swap datasets, update the chart's source range rather than retyping values - the trendline recalculates automatically, though the label position may need nudging.
  • For a quick check without a chart, =RSQ(y_range, x_range) or =CORREL(y_range, x_range)^2 both work.

Troubleshooting

The Add Trendline option is greyed out or missing. The chart is not a scatter chart, or nothing in the series is actually selected. Click directly on a marker first, then right-click.

No R-squared checkbox appears. Scroll down inside the trendline pane; the checkbox sits below the trend type and order settings, and on smaller windows it is easy to miss.

The label shows R² = 1 or R² = 0. A value of 1 usually means too few points, duplicated pairs, or a polynomial order high enough to pass through every point. A value of 0 with an obviously sloping line suggests text-formatted X values.

The chart shows points bunched at one side. Classic text-versus-number symptom. Select the X column, use Data > Text to Columns and finish the wizard with the column formatted as General, or multiply the column by 1 in an empty helper column.

The label is invisible or off-chart. Select it and drag it inward, or delete the trendline and re-add it - the label is recreated at a default position.

The chart opens but the pane behaves oddly. Save, close and reopen the workbook, and make sure Excel is updated. Corrupt chart objects are usually cleared by deleting the chart and inserting a fresh one.

Frequently Asked Questions

Can I get R-squared without adding a trendline?

Yes. Type =RSQ(y_range, x_range) into any empty cell, with the Y values first. It returns the same figure the label would show.

Why is my R-squared different from what I expected?

Check the argument order in RSQ, confirm the X and Y columns are not swapped between the chart and the formula, and make sure the ranges cover the same rows. It is also possible the chart contains a different series than you think.

Does R-squared tell me which model is best?

No. It only says how much of the variation in Y the fitted line explains. A higher number from a more complex curve is not automatically a better model.

Can I add R-squared on a line chart?

Excel may let you add a trendline to a line chart, but the fit then uses the category positions rather than the true X values. Convert the chart to a scatter (XY) chart to get a correct regression.

Does this work in Excel for the web?

Yes. The web version supports scatter charts, trendlines and the R-squared display option, though the pane layout is slightly different from the desktop app.

How many decimal places should I show?

Two to four is usually enough for reporting. More digits imply a precision the fit rarely has.