Scatter Plot Maker

Make a scatter plot from pasted x and y data, with a least-squares trend line, its equation and r², up to three groups and names in tooltips. SVG or PNG.

Hours studied and marks

Scatter plot of Marks against Hours studied, 10 points. Trend: Marks rises by 6.59 for each 1 of Hours studied, r² 0.99. Use the arrow keys to read each point, or switch to the table.

Trend line: Marks = 6.586 × Hours studied + 31.75; r² = 0.992 (a strong straight-line relationship). It shows a pattern, not a cause.

Copy cells from a spreadsheet, or type CSV: either names, x, then y — or x first, then up to 3 columns of y, one group each.

How is this calculated?
Trend line y = a × x + b by least squares: a = Σ(x − x̄)(y − ȳ) ÷ Σ(x − x̄)², b = ȳ − a × x̄. r² = [Σ(x − x̄)(y − ȳ)]² ÷ [Σ(x − x̄)² × Σ(y − ȳ)²].

Runs in your browser — nothing you enter leaves this device.

About this tool

What it does

Scatter Plot Maker shows whether two measures move together: hours studied and marks, price and sales, height and weight. Paste a table with a name for each point (optional), then the x values, then the y values; or put x first and up to three columns of y, one group each. Every row becomes a point, 8 pixels across with a ring so overlapping points stay visible, and with more than one group each has its own colour and shape. With one group, a least-squares trend line is drawn and its equation and r² are given: r² is the share of the variation in y that a straight line explains, from 0 (none) to 1 (all). Hover near a point, or use the arrow keys, to read its name and values; switch to the table to see them all. A relationship in a scatter plot shows a pattern, not a cause — two things can rise together because of a third. Download as SVG or PNG, or the data as CSV.

How to use it
  1. Paste names, x and y — or x and up to three y columns.
  2. Give the chart a title; choose the trend line and zero axes.
  3. Read points with the pointer or the arrow keys.
  4. Download SVG, PNG or CSV.
Limits and your data
  • At most three groups: more colours than that cannot all be told apart in a scatter plot.
  • The trend line is straight; curved relationships need other models.
  • One outlier can move a trend line a lot; check the points before trusting it.
  • The chart and the trend line are worked out in your browser. Your data is not uploaded or kept.

Questions

What does r² mean?

How well a straight line fits: 0.9 means 90% of the variation in y follows the line; 0.1 means the line explains little.

Does a strong trend prove cause and effect?

No. It shows the measures move together; a third factor, or chance, can explain it.

How do I add a line of best fit?

Tick Trend line with one group of y values; its equation and r² appear under the chart.

Can I name the points?

Yes: put names in the first column, x in the second and y in the third. The names show in tooltips.