Scatter Plots With Trendlines: How to Make One and Read R² Without Fooling Yourself
How to make a scatter plot from spreadsheet data, choose between linear, polynomial and exponential trendlines, and read R² and correlation honestly.

When you suspect that two things are related, a scatter plot is the first chart to draw. Each observation becomes a dot, with one measurement along the bottom and the other up the side. If the dots form a band rising to the right, the two go up together; falling to the right, one goes down as the other rises; a shapeless cloud means no clear relationship. It is the chart behind school science practicals, sales analysis, sports statistics and countless research papers.
Getting the data in
The Scatter Plot Maker takes data the way you already have it. Copy two columns from Excel or Google Sheets and paste, type pairs like 3, 65 one per line, or open a CSV file. A header row is recognised automatically and used for the axis titles.
Two optional columns make the chart much richer. A label column, such as student names or product codes, can be written next to each dot, so outliers can be identified at a glance. A group column, such as class, region or treatment, colours the dots by group and adds a legend. The tool guesses which columns play which role and you can change any of them.
Adding a trendline
A trendline summarises the pattern with an equation. The tool fits it by least squares, which finds the curve that keeps the squared vertical distances from the dots as small as possible. Six models are available.
Linear: y = a + bx. The default, and the right choice far more often than people expect.
Polynomial of second or third order: curves with one or two bends. Useful within the range of your data, risky beyond it.
Exponential: growth or decay at a constant percentage rate, such as bacteria or compound interest.
Logarithmic: fast early gains that level off, such as practice and skill.
Power: relationships that appear as straight lines when both axes are logarithmic, common in physics and biology.
Ticking one trendline per group fits each coloured group separately, which is how you compare, say, two classes or two fertiliser treatments.
Reading R² and r
R², shown with the equation, is the share of the variation in y that the trendline accounts for. In the sample data of study hours against exam scores, the straight line has R² of 0.992: the line explains over 99 percent of the variation. Pearson's correlation r, shown separately, measures the strength and direction of the straight-line relationship, from −1 to +1; here it is 0.996.
Three cautions keep R² honest.
More flexible curves always score higher. A third-order polynomial will beat a straight line on R² almost every time, even when the extra bends only chase noise. The comparison table shows every model's R² side by side, which is useful precisely because it reveals this effect. In the sample, the polynomial reaches 0.995 against 0.992 for the line: a trivial gain for a more complicated, less trustworthy model.
Correlation is not causation. Ice-cream sales and drowning rates rise together because both follow hot weather. A scatter plot shows that two things move together, not why.
Do not extend curves far beyond your data. The exponential fit in the sample predicts a score above 100 at ten hours of study, which is impossible.
Log scales
When values span several orders of magnitude, such as city populations or animal body masses, a linear axis squashes most points into a corner. Switching an axis to log scale spreads them out. A power relationship then appears as a straight line, which is a quick visual test. Zero and negative values cannot be shown on a log axis and are left out.
Making it presentable
Give the chart a title that states the finding rather than just the variables, and axis titles with units. Make points slightly transparent when they overlap, and keep the number of groups small enough to tell the colours apart. Download a PNG for documents and slides; it is drawn at double size so it stays sharp. Use the SVG for print and design programs, or paste the SVG code into a web page where it scales to any width.
When you need more
A scatter plot with a trendline is a description, not a statistical test. To say whether a relationship is significant, report a p-value or confidence interval from a statistics tool. For the first look at your data, though, nothing beats putting the dots on a chart.


