How to make a scatter plot
- Copy two columns from Excel or Google Sheets (x first, then y) and paste them into any cell of the grid, or into the Paste data box. Comma and semicolon separated text works too. On a phone, the paste box is the easy way in.
- If the first row is text, it becomes the axis labels. Change them, and the title, in the fields under the grid.
- Leave Line of best fit on to get the trend line, its equation, r and R² under the chart. Turn it off for points only.
- Download the chart as PNG (2,400 pixels wide), JPEG or SVG, or press Copy to put the picture on your clipboard.
There is no Generate button. The chart redraws on every change, and nothing you paste leaves your browser.
Add a line of best fit
The line of best fit (also called a trendline or regression line) is the straight line that sits closest to all the points at once. It is found by least squares: of all possible lines, it has the smallest total of squared vertical distances to the points.
The example in the editor has 12 students, with hours studied on the x-axis and exam score on the y-axis. Its line is y = 3.29x + 50.5. Read it like this:
- 3.29 is the slope. Each extra hour of study goes with about 3.29 more points.
- 50.5 is the y-intercept. It is where the line crosses the y-axis, so it is the predicted score for someone who studied 0 hours.
- To predict, put a value in for x. For 6 hours: 3.29 × 6 + 50.5 = 70.2 points.
- r = 0.807 says the relationship is positive and fairly strong. R² = 0.652 says hours studied account for about 65% of the differences in score. The rest is everything else.
One student studied 8.5 hours and scored 60, where the line predicts 78.5. Remove that row and R² climbs from 0.65 to 0.97, and the slope from 3.29 to 4.48. A single point can move the line that much, so look at the plot before you quote the equation.
Chartty fits a straight line only. If your points bend (growth that speeds up, something that levels off), a straight line is the wrong model and R² will tell you so by being low.
Reading correlation
The correlation coefficient r runs from −1 to 1. The sign is the direction of the line, and the distance from 0 is how tightly the points hug it.
A rough guide used in school statistics: above 0.7 (or below −0.7) is strong, 0.3 to 0.7 is moderate, under 0.3 is weak. Those cut-offs are a convention. In physics 0.9 can be disappointing, and in psychology 0.3 can be a finding.
Name your points
Add a third column and every point gets a label. The labels are moved apart so they don't sit on each other or on a neighbouring point, and a thin line connects a label to its point when it had to move further away.
If a label is a country name, the flag becomes the point. If it is an emoji, the emoji becomes the point. Flag emoji are swapped for drawn flags, because Windows shows them as two letters. Turn this off with Flags and emoji as markers to get dots with names instead.
A fourth column splits the points into groups. Rows with the same text in it share a color, and a legend appears. The line of best fit is always drawn through all points together.
Scatter plot or line graph?
Use a scatter plot when both columns are things you measured and you want to see whether they move together: height and shoe size, price and rating. Use a line graph when one of them is time and you want to follow a value from one date to the next. The line graph maker reads dates in the first column and draws one line per further column.
In between sits the XY graph, where points are joined in order of x. Turn on Connect points in x order to get one.
Scatter plot examples
FAQ
How do I make a scatter plot with a trendline and equation?
Paste your two columns into the grid. The trendline is on by default, and its equation, r and R² are written under the plot and included in the PNG, JPEG and SVG downloads. The checkbox that controls it is called Line of best fit.
What does R² mean on a scatter plot?
R² is the share of the variation in y that the line accounts for, from 0 to 1. An R² of 0.65 means 65% of the differences in y line up with differences in x. For a straight-line fit it is r multiplied by itself, so it is never negative.
What is the y-intercept on a scatter plot?
It is the value of y where the line of best fit crosses the y-axis, which is the predicted y when x is 0. In y = 3.29x + 50.5 the y-intercept is 50.5. It only means something in real life if x = 0 is a sensible value for your data.
Which equation best models the data in the scatter plot?
For points that follow a straight path, the least-squares line shown under the plot (y = slope × x + intercept). If the points curve, a straight line is the wrong model. Chartty does not fit curves, so use a spreadsheet for exponential or polynomial fits.
Does correlation mean causation?
No. A high r says two things move together. It does not say one causes the other. Ice cream sales and sunburn rise together because of a third thing, hot weather.
Should the axes start at zero?
Not for a scatter plot. The axes fit the data by default so the points fill the plot. If you need the origin in view, tick Start axes at zero.
Can I plot more than one group in different colors?
Yes. Put the group name in the fourth column. Each distinct name gets its own color from the palette and an entry in the legend.
How do I make a scatter plot in Excel or Google Sheets?
In Excel: select both columns, then Insert, Scatter. To add the line, click the chart, choose Chart Elements, Trendline, More Options and tick Display Equation on chart. In Google Sheets: Insert, Chart, set the chart type to Scatter chart, then Customize, Series, Trendline. Or copy the two columns and paste them here.
Is my data uploaded anywhere?
No. The chart is drawn in your browser and saved in your browser, so it is still here when you come back on the same device. A share link carries the data inside the link itself.
What is the difference between a scatter plot, a scatter graph, a scatter chart and a scatter diagram?
None. They are four names for the same chart. "Scatter plot" is the usual name in the US, "scatter graph" in UK schools, "scatter chart" in Excel, and "scatter diagram" in quality control. A correlation graph is the same thing too.
Is this scatter plot maker free?
Yes. No account, no watermark, no limit on downloads. It warns you above 5,000 points because the page gets slow, but it does not stop you.