A correlation coefficient is a single number between −1 and +1 that tells you how closely two things move together. A value near +1 means they rise together, a value near −1 means one rises as the other falls, and a value near 0 means there’s no straight-line pattern at all.
Picture a teacher who wonders whether students who read more each day also score higher on vocabulary quizzes. Eight students, eight pairs of numbers, one question: is there a real link? The correlation coefficient turns that messy scatter of dots into one number you can compare, report and test.
Here’s what you’ll get: what r means, how to read its size and sign, the main types (Pearson, Spearman and Kendall), the formula in plain words, a full worked example, an interactive chart, and the one mistake that can wreck a correlation with a single data point.
Quick Info
| Topic | Detail |
|---|---|
| Short definition | A number from −1 to +1 that measures how strongly two variables move together in a straight line |
| Usual symbol | r (for a sample), ρ “rho” (for a population) |
| Main types | Pearson (straight-line), Spearman and Kendall (rank-based) |
| Key formula | r = Sxy ÷ √(Sxx × Syy) |
| Common mistake | Reading a strong r as proof that one thing causes the other |
| Key warning | One outlier can push r up or down a lot, so always look at a scatter plot first |
| Reading time | About 12 minutes |
What Is a Correlation Coefficient?
In one sentence: a correlation coefficient measures the direction and strength of the relationship between two numeric variables, on a scale from −1 (perfect negative) through 0 (none) to +1 (perfect positive).
You always need two variables measured on the same people or things: height and shoe size, study hours and test scores, outdoor temperature and ice cream sales. Each person gives you one pair of numbers, and each pair becomes one dot on a scatter plot.
The coefficient has no units. Measure height in inches or centimeters and r comes out the same, which is why it’s so handy for comparing very different relationships.
Penn State’s STAT 462 course notes that r is unitless and that what counts as a “large” correlation depends greatly on the research area: Penn State: (Pearson) Correlation Coefficient r.
Correlation coefficient vs coefficient of determination
These two get mixed up all the time, partly because one is just the other squared.
| Correlation coefficient (r) | Coefficient of determination (r²) | |
|---|---|---|
| Range | −1 to +1 | 0 to 1 |
| Shows direction? | Yes (the sign) | No (squaring removes the sign) |
| What it tells you | How tightly the dots hug a straight line, and which way it slopes | The share of the variation in one variable that the straight line accounts for |
| Example | r = 0.80 | r² = 0.64, or 64% |
How to Read r: Sign and Size
Every correlation coefficient answers two questions at once. The sign gives the direction, and the size (ignoring the sign) gives the strength.
- Positive r: as one variable goes up, the other tends to go up (practice time and free-throw accuracy).
- Negative r: as one goes up, the other tends to go down (a car’s age and its resale price).
- r close to 0: no straight-line pattern (shoe size and math grades).
For strength, many intro courses use a rough guide like the one below. Treat it as a starting point, not a law. A correlation of 0.3 can be big news in medicine and disappointing in physics.
| Size of r (ignore the sign) | Common label | What the scatter plot looks like |
|---|---|---|
| 0.00 to 0.19 | Very weak or none | A shapeless cloud |
| 0.20 to 0.39 | Weak | A faint tilt you might miss |
| 0.40 to 0.59 | Moderate | A clear tilt with lots of scatter |
| 0.60 to 0.79 | Strong | A tilted band, fairly tight |
| 0.80 to 1.00 | Very strong | Dots packed close to a line |
Notice that −0.85 is stronger than +0.60. The minus sign only tells you which way the line slopes.
The 3 Main Types of Correlation Coefficient
1. Pearson’s r (the default)
When someone says “the correlation” without naming a type, they almost always mean Pearson’s r. It measures how well the dots fit a straight line. It works best when both variables are numeric, the pattern is roughly linear and there are no extreme outliers.
2. Spearman’s rank correlation (ρ or rs)
Spearman first swaps each value for its rank (1st, 2nd, 3rd and so on) and then runs Pearson on the ranks. That makes it a good fit for ranked data, like finishing places in a race, and for curved patterns that keep moving in one direction.
JMP’s statistics guide describes the Spearman correlation as a close variant of Pearson that applies to ranked data: JMP Statistics Knowledge Portal: Correlation Coefficient.
3. Kendall’s tau (τ)
Kendall’s tau also uses ranks, but it counts how many pairs of points are in the same order on both variables versus the opposite order. It tends to give smaller numbers than Spearman for the same data and holds up well with small samples and lots of tied values.
| Type | Uses | Measures | Pick it when |
|---|---|---|---|
| Pearson r | Raw values | Straight-line relationship | Both variables are numeric and the scatter plot looks linear |
| Spearman ρ | Ranks | Any steady upward or downward trend | Data are ranks, the curve bends, or there’s an outlier you can’t remove |
| Kendall τ | Ranks (pair by pair) | Agreement in ordering | Small samples or many ties |
The Pearson Formula, in Plain Words
The formula looks scary until you see that it’s built from three sums you can work out with a pencil.
r = Sxy / √(Sxx × Syy)
Sxy = Σ (x − x̄)(y − ȳ)
Sxx = Σ (x − x̄)²
Syy = Σ (y − ȳ)²
- x̄ and ȳ are the means (averages) of the x values and the y values.
- (x − x̄) is how far one x value sits above or below its average. Same idea for y.
- Sxy multiplies those two distances for each pair and adds them up. When both are above average (or both below), the product is positive and pushes r up.
- Sxx and Syy measure the spread of each variable on its own, much like the first step of a standard deviation.
- Dividing by √(Sxx × Syy) rescales everything so the answer always lands between −1 and +1.
Worked Example: Does Daily Reading Track Vocabulary Scores?
A teacher records how many minutes eight students read each day (x) and their score on a 100-point vocabulary quiz (y). The numbers below are illustrative, made up for this guide.
| Student | Minutes read (x) | Quiz score (y) |
|---|---|---|
| A | 10 | 52 |
| B | 15 | 58 |
| C | 20 | 55 |
| D | 25 | 66 |
| E | 30 | 70 |
| F | 35 | 68 |
| G | 40 | 79 |
| H | 45 | 81 |
Step 1: Find the two means
x̄ = (10 + 15 + 20 + 25 + 30 + 35 + 40 + 45) ÷ 8 = 220 ÷ 8 = 27.5 minutes.
ȳ = (52 + 58 + 55 + 66 + 70 + 68 + 79 + 81) ÷ 8 = 529 ÷ 8 = 66.125 points.
Step 2: Work out each distance from the mean
| Student | x − x̄ | y − ȳ | (x − x̄)(y − ȳ) | (x − x̄)² | (y − ȳ)² |
|---|---|---|---|---|---|
| A | −17.5 | −14.125 | 247.19 | 306.25 | 199.52 |
| B | −12.5 | −8.125 | 101.56 | 156.25 | 66.02 |
| C | −7.5 | −11.125 | 83.44 | 56.25 | 123.77 |
| D | −2.5 | −0.125 | 0.31 | 6.25 | 0.02 |
| E | 2.5 | 3.875 | 9.69 | 6.25 | 15.02 |
| F | 7.5 | 1.875 | 14.06 | 56.25 | 3.52 |
| G | 12.5 | 12.875 | 160.94 | 156.25 | 165.77 |
| H | 17.5 | 14.875 | 260.31 | 306.25 | 221.27 |
| Sum | 877.5 | 1,050 | 794.875 |
Look at the fourth column. Every product is positive, because students who read less than average also scored below average, and the heavy readers scored above it. That’s what a positive correlation looks like from the inside.
Step 3: Plug the sums into the formula
r = 877.5 / √(1,050 × 794.875)
= 877.5 / √834,618.75
= 877.5 / 913.58
= 0.96
Step 4: Read the result
r = 0.96 is positive and very strong. In this class, more daily reading goes hand in hand with higher vocabulary scores, and the dots sit close to a rising straight line.
Square it and you get r² = 0.92. A straight line through these points accounts for about 92% of the variation in quiz scores.
Step 5: Check it isn’t a fluke
With only eight students, could a pattern this strong appear by luck? You can answer that with a hypothesis test. The null hypothesis says the true correlation is zero, and the test statistic follows the same t distribution used in a t-test:
t = r × √(n − 2) / √(1 − r²)
= 0.9605 × √6 / √(1 − 0.9226)
= 8.46 (degrees of freedom = n − 2 = 6)
A t of 8.46 with 6 degrees of freedom gives a two-tailed p-value below 0.001, far under the usual 0.05 cutoff. So the link is very unlikely to be pure chance in data like these. You can check the p-value yourself with the P-Value Calculator.
Step 6: Compare with Spearman
Rank both columns from 1 to 8 and run the same formula on the ranks, and you get Spearman’s ρ = 0.95. The two agree closely because the pattern is close to a straight line and there’s no outlier. Hold that thought for the next section.
Try It: See What Different Values of r Look Like
Drag the slider to set how strongly the two variables are linked. The chart redraws 40 points with roughly that correlation and calculates Pearson’s r for them. Then tick the box to add a single outlier and watch what it does to r.
Points are generated from a fixed pseudo-random sequence, so the same slider value always draws the same chart. Illustrative.
Set the slider to 0.9, then add the outlier. One point out of 41 is enough to drag r down by a big chunk. The dashed line of best fit tilts toward it too.
What One Outlier Can Do to r
Go back to the reading example, where r was 0.96. Now suppose a ninth student is added: someone who reads 60 minutes a day but scored only 40, maybe because they were sick on quiz day.
Recalculate with all nine students and r drops from 0.96 to 0.07. A very strong relationship suddenly looks like no relationship at all, and the only thing that changed was one unusual student.
The same thing works in reverse. One extreme point far out along the line can make a weak cloud look strongly correlated. That’s why the first step with any correlation is to plot the data and look, not to calculate.
If you find an outlier, don’t just delete it. Check whether it’s a data-entry error, report results with and without it, or switch to Spearman’s rank correlation, which is far less sensitive to one wild value.
Correlation Doesn’t Mean Causation
Our r of 0.96 does not prove that reading causes higher vocabulary scores. Students who read more might also have more books at home, more help with homework, or simply enjoy words more. Any of those hidden factors could drive both numbers.
A correlation coefficient describes a pattern in the data you have. To show cause and effect, you need a controlled experiment, such as randomly assigning some students extra reading time and comparing results with a group that didn’t get it.
How to Find a Correlation Coefficient: A 5-Step Checklist
| Step | What to do | Why it matters |
|---|---|---|
| 1. Pair the data | Make sure each x value belongs to the same person or item as its y value | Shuffled pairs give a meaningless r |
| 2. Plot first | Draw a scatter plot | Spots curves, clusters and outliers that r alone hides |
| 3. Pick the type | Pearson for straight-line numeric data, Spearman for ranks or bends | The wrong type can understate a real pattern |
| 4. Calculate r | By hand, in a spreadsheet (=CORREL in Excel or Google Sheets) or with a calculator | Gives the direction and strength in one number |
| 5. Test and report | Give r, the sample size and the p-value | A strong r from 5 points means much less than one from 500 |
If you also want to predict one variable from the other, the next step is a line of best fit. The Linear Regression Calculator gives you the slope and intercept for the same kind of paired data.
Common Correlation Mistakes and Myths
| Myth | Reality |
|---|---|
| r = 0 means the variables are unrelated | It means no straight-line relationship. A perfect U-shaped curve can have r close to 0 |
| A negative correlation is a weak correlation | The sign is only direction. r = −0.9 is just as strong as r = +0.9 |
| r = 0.5 means half the points are on the line | r isn’t a percentage. Squared, it says the line explains about 25% of the variation |
| A strong correlation proves cause and effect | Hidden factors or plain coincidence can create strong correlations |
| More data always makes r bigger | More data makes r more reliable, not larger |
| You can average correlations from different groups | Combining groups can create or hide a correlation, so look at each group’s scatter plot |
Frequently Asked Questions
What is a good correlation coefficient?
It depends on the field. In tightly controlled lab measurements, anything under 0.9 might be disappointing. In social science, education or medicine, where people vary a lot, a correlation of 0.3 to 0.5 can be meaningful. Judge r against similar studies, the sample size and the p-value, not against one universal cutoff.
Can a correlation coefficient be greater than 1?
No. The formula always produces a value between −1 and +1. If you get 1.2 or −1.5, something went wrong: usually a mistake in one of the sums, mismatched pairs, or dividing by the wrong number. Recheck the Sxx and Syy values first, since a small slip there is the most common cause.
What does a correlation of −1 mean?
It’s a perfect negative relationship. Every point sits exactly on a straight line that slopes downward, so each increase in one variable comes with a fixed decrease in the other. Real data almost never hit exactly −1, but some physical relationships, such as distance left to drive versus distance already driven on a fixed trip, come very close.
How many data points do you need for a correlation?
You can calculate r with as few as three pairs, but small samples give unstable results. With five points, even r = 0.8 can fail a significance test. Many teachers suggest at least 20 to 30 pairs for a rough picture, and more if you expect a weak relationship. Always report the sample size next to r.
What’s the difference between correlation and regression?
Correlation gives one number for how strongly two variables move together, and it treats both the same way. Regression fits a line so you can predict one variable (y) from the other (x), and it gives a slope and intercept. Swap x and y and r stays the same, but the regression line changes.
How do you calculate a correlation coefficient in Excel?
Put your x values in one column and y values in the next, then type =CORREL(A2:A9, B2:B9) with your own cell ranges. Google Sheets uses the same function. For the reading example above, that formula returns about 0.96. For Spearman, rank each column first with RANK.AVG and then run CORREL on the ranks.
Conclusion
A correlation coefficient packs a whole scatter plot into one number: the sign tells you the direction, the size tells you the strength, and r² tells you how much a straight line explains. It’s quick to calculate and easy to compare, but it only sees straight lines, it can be fooled by a single outlier, and it never proves cause on its own.
Carry this rule of thumb with you: plot first, calculate second, and ask “what else could explain this?” before you believe it.
References
- Penn State Eberly College of Science, STAT 462, “2.6 – (Pearson) Correlation Coefficient r”. https://online.stat.psu.edu/stat462/node/96
- JMP Statistical Discovery, Statistics Knowledge Portal, “Correlation Coefficient”. https://www.jmp.com/en/statistics-knowledge-portal/linear-models/correlation-coefficient
Disclaimer
This article is for general educational purposes only. The students, minutes and quiz scores in the worked example and the interactive chart are illustrative, not real data. For research design or published analysis, consult a qualified statistician.