Correlation Calculator

Pearson's r and Spearman's rho with exact p-values, confidence intervals, R², and a scatter plot.

Runs entirely in your browserFree · no signup

1. Choose the correlation

Pearson's r measures a straight-line relationship between two continuous variables. Use it when both variables are interval or ratio and the relationship looks roughly linear.

2. Enter your paired data

Row 1 in each box must be the same participant. One number per line.

n = 15 · mean 9

n = 15 · mean 78.53

3. Results

Pearson's r
.985

large positive

p (two-tailed)
< .001

significant at .05

r²
.970

97.0% of variance shared

N
15

df = 13

95% confidence interval for r
[.95, 1.00]

excludes zero

t statistic
20.556

df = 13

506070809010005101520Study hoursExam score
15 paired observations. The dashed line is the least-squares fit. Hover a point to read its values.

What this does and does not tell you

A correlation of .98 means that as study hours increases, exam score tends to increase. It shares 97.0% of its variance.

It does not establish that one causes the other. A third variable could drive both, or the causal arrow could point the other way.

Small sample

With N = 15, the confidence interval is wide — your estimate of r could easily be off by a lot. Correlations from small samples are notoriously unstable; a single influential point can move r substantially. Look at the scatter plot before trusting the number.

Check the scatter plot for these

Pearson's r only detects straight-line relationships. A strong curved relationship can produce r near zero, and a single outlier can create or destroy a correlation on its own. If the plot shows a curve, a cluster pattern, or one point far from the rest, switch to Spearman's rho or investigate that point.

Descriptive statistics
VariableNMeanSDMinMax
Study hours159.004.472.0016.00
Exam score1578.5313.9055.0098.00

4. APA-formatted write-up

APA results text
A Pearson correlation was computed to assess the relationship between study hours and exam score (N = 15).
There was a large positive correlation, which was statistically significant: r(13) = .98, p < .001, 95% CI [.95, 1.00].
Study hours accounted for 97.0% of the variance in exam score (r² = .970).

Inline: r(13) = .98, p < .001

What a correlation coefficient tells you

A correlation measures how consistently two variables move together. It runs from −1 to +1:

  • +1 — perfect positive: every increase in one is matched by a proportional increase in the other.
  • 0 — no linear relationship at all.
  • −1 — perfect negative: one goes up exactly as the other goes down.

The sign tells you direction; the magnitude tells you consistency. It does not tell you the steepness of the relationship — that is the regression slope, a different quantity. A correlation of 0.9 can describe a very shallow trend, as long as the points hug the line.

The four numbers to report

APA style expects the coefficient, degrees of freedom, exact p-value, and — increasingly — the confidence interval:

r(88) = .34, p = .001, 95% CI [.14, .51]

Note the missing leading zeros: APA drops them for values that can’t exceed 1. Degrees of freedom is N − 2, so the reader can recover your sample size. For Spearman, use rs as the symbol.

Why the scatter plot is not optional

The most important habit in correlation analysis is looking at the data. Francis Anscombe famously constructed four datasets with identical means, variances, and correlations, of which only one was a real linear relationship — the others were a curve, a perfect line with one outlier, and a vertical cluster with one distant point.

Three patterns to watch for in the plot above:

  • Curvature. A strong U-shaped relationship can give r ≈ 0. The variables are clearly related; they are just not relatedlinearly.
  • Influential outliers. A single distant point exerts enormous leverage in a small sample. Report with and without it, and say that you did.
  • Restricted range. If you only sampled high scorers, the correlation will be attenuated relative to the full population. Common in student samples, and worth naming as a limitation.

Correlation and causation, concretely

Ice cream sales correlate with drowning deaths. Neither causes the other; summer causes both. This is the confounding-variable problem, and it is not a technicality — it is the default state of observational data.

What you can legitimately write: “study hours were positively associated with exam scores.” What you cannot: “studying more improved exam scores.” The second requires a design that rules out the alternatives — random assignment, or at minimum statistical control of the plausible confounds. Keeping your language associational is not hedging; it is accuracy.

Frequently asked questions

Should I use Pearson or Spearman?
Use Pearson's r when both variables are continuous (interval or ratio) and the relationship looks roughly linear on a scatter plot. Use Spearman's rho when either variable is ordinal — including Likert items — when the relationship is monotonic but curved, or when outliers are distorting the result. Spearman works on ranks, so it's insensitive to extreme values.
What counts as a strong correlation?
Cohen's conventions for the social sciences are 0.1 small, 0.3 medium, 0.5 large. But context matters far more than the benchmark: r = 0.3 is a substantial finding in personality psychology and a poor result in a physical measurement calibration. Report the value and the confidence interval and let readers judge.
What does r² mean?
The proportion of variance in one variable that is shared with the other. An r of 0.5 gives r² of 0.25, meaning 25% of the variance is shared and 75% is not — which is why a 'large' correlation still leaves most of the variation unexplained. Squaring r is a useful antidote to over-reading a correlation coefficient.
Does a significant correlation mean one variable causes the other?
No. Correlation is symmetric — r is identical whichever variable you call the predictor — while causation is directional, so the statistic cannot distinguish cause from effect. Three explanations always remain: X causes Y, Y causes X, or a third variable causes both. Only design (experimental manipulation, or careful control) can separate them.
Why do I need to look at the scatter plot?
Because r compresses the entire relationship into one number and several very different patterns give identical values. Anscombe's quartet is the classic demonstration: four datasets with the same r, only one of which is a genuine linear relationship. Curves, clusters, and single influential outliers are all invisible in r and obvious in a plot.
Can one outlier really change my correlation?
Yes, dramatically, especially in small samples. A single point far from the cluster can push r from near zero to 0.8, or the reverse. The tool draws the scatter plot for exactly this reason. If you find an influential point, check whether it's a data-entry error, report the correlation with and without it, or use Spearman's rho.
What is the confidence interval for r?
The range of population correlations consistent with your data, computed via the Fisher z transformation. It's the most under-reported number in correlation analysis: with N = 20, an observed r of 0.4 has a 95% interval running from roughly -0.05 to 0.72. That is a very different claim from 'r = .40' stated alone.

Related free tools

Need the whole analysis, not just this step?

Analytika picks the right test for your data, checks the assumptions, and writes up the results in APA format. Upload a dataset and ask a question in plain English.

Try it free