How to Make a Scatter Plot with a Trend Line

Paste pairs of numbers and get a scatter plot with a least-squares trend line, its equation and R², point labels and groups. Export PNG, JPG or SVG.

3 min read ·

To make a scatter plot, open the Scatter Plot Maker and paste one row per point — x, y, or label, x, y — copied from Excel or Google Sheets or typed with commas. Turn on the trend line to draw the best-fit straight line with its equation (y = ax + b) and R². Add point labels, colour points by group, and download a PNG, JPG or SVG.

Make a scatter plot step by step

  1. Open the Scatter Plot Maker.
  2. Paste or type the data, one row per point:
Hours studied,Score
2,55
4,62
5,70
7,78
9,88

A header row names the axes. Add a label column first (label, x, y) to name points, and a last column with group names to colour points by group. 3. Turn on Trend line (least squares), Label the points, or X axis starts at zero / Y axis starts at zero, and set the Point size (px) and Opacity (%). 4. Set the title, colours and image size, then download PNG, SVG or JPG, or copy the image.

Reading the trend line

The trend line is the least-squares straight line — the line that's closest to all points overall.

  • The equation y = ax + b predicts y from x. In the example, a slope of about 4.5 means each extra hour of study goes with about 4.5 more points.
  • R² (0 to 1) says how closely the points follow the line: 0.9 means the line explains 90% of the variation in y; 0.1 means almost nothing.

What the pattern tells you

  • Rising left to right — a positive relationship (more of one, more of the other).
  • Falling — a negative relationship.
  • A shapeless cloud — no linear relationship.
  • A curve — a relationship a straight line doesn't capture well (R² will be low even though there's a clear pattern).
  • Outliers — single points far from the rest; check them before trusting the line.

Correlation isn't causation

A scatter plot shows that two things move together, not why. Ice-cream sales and sunburns rise together because both follow the weather — neither causes the other. Use the chart to spot relationships worth investigating, not as proof.

Groups and labels

  • Groups (a last column such as "Class A", "Class B") colour points and add a legend — useful for comparing whether the relationship differs between groups.
  • Labels (a first column) name each point — countries, products, people — so outliers can be identified.

A worked example

Paste hours studied and test scores for twenty students. With the trend line on, you might see "y = 4.6x + 46, R² = 0.81": each extra hour of study goes with about 4.6 more points, and study time explains about 81% of the variation in scores. Label the points with names to spot the student who studied a lot but scored low — the kind of outlier worth a conversation.

Privacy

Your data stays in your browser — nothing is uploaded or stored.

Frequently asked questions

How many points do I need for a trend line?

At least two, but a trend from fewer than about ten points is fragile — one unusual point can swing it.

Can I fit a curve instead of a straight line?

The trend line is linear. For curved patterns, describe the shape in words or transform the data (for example, plot the logarithm).

Can the axes start at zero?

Yes — tick X axis starts at zero or Y axis starts at zero; otherwise the axes zoom to the data, which shows the pattern more clearly.

Tools mentioned in this guide

← All guides