Utinzo

Correlation Coefficient Calculator

Calculate Pearson correlation coefficient (r) between two variables. Measures strength and direction of linear relationships.

Did this tool work for you?

How to use this calculator

r = Σ[(x−x̄)(y−ȳ)] / √[Σ(x−x̄)² · Σ(y−ȳ)²]

r ranges from −1 (perfect negative) to +1 (perfect positive). Values near 0 indicate no linear relationship.

  1. 1

    Enter five paired X and Y values. Empty boxes are read as 0, so all five pairs are used.

  2. 2

    The calculator computes Pearson r, which ranges from −1 to +1.

  3. 3

    Read the interpretation: strong positive (r > 0.7) means both variables rise together.

Frequently asked questions

Which correlation coefficient does this calculate, and what is the exact formula?

Pearson’s product-moment coefficient: r = Σ(x − x̄)(y − ȳ) ÷ √[Σ(x − x̄)² · Σ(y − ȳ)²], using the means of the five X values and five Y values. The n − 1 terms that appear in covariance and standard deviation cancel, so the same r results whether you think of the data as a sample or a population. It measures straight-line association only.

How many data pairs can I enter?

Exactly five. There are five X boxes and five Y boxes, and an empty box is turned into 0 by the form before the calculation, so a missing value is treated as a real zero rather than skipped. You cannot calculate r for three or four pairs, and for larger datasets use a spreadsheet function such as CORREL.

Does the calculator tell me whether the correlation is statistically significant?

No, it reports r, R² and a descriptive label only, with no p-value. With five pairs there are 3 degrees of freedom, and a two-tailed test at the 5% level needs |r| of about 0.878 or more. The example data 1–5 against 2, 4, 5, 4, 5 gives r = 0.7746, which looks "strong" in the label but corresponds to p ≈ 0.124 (t = 2.1213 on 3 df), so it is not significant.

What do the words Very strong, Strong, Moderate and Weak mean?

They are fixed cut-offs in this tool’s code, applied to |r|: 0.9 or above is Very strong, 0.7 to below 0.9 Strong, 0.5 to below 0.7 Moderate, 0.3 to below 0.5 Weak, and anything lower Very weak. These are common rules of thumb, not universal standards. What counts as a strong correlation differs between physics, psychology and marketing data, so use the number itself in reports.

Why do I get an error saying "No variation in data"?

Either all five X values are identical or all five Y values are identical. Then one of the sums of squares in the denominator is zero and r is undefined, because a constant cannot rise or fall with anything. Change at least one value in each column.

Can r be zero when the variables are clearly related?

Yes. For X = −2, −1, 0, 1, 2 and Y = 4, 1, 0, 1, 4, Y is fully determined by X (it is X squared), yet the calculator returns r = 0 and "No linear correlation", because the upward and downward halves cancel. Always plot the points before relying on r.

How much can a single outlier change the result?

A great deal with so few points. With X = 1–5 and Y = 1, 2, 3, 4, 5, r is exactly 1.0000. Changing only the last Y to 20 drops r to 0.8000, even though the first four points still sit on a perfect line. Pearson r uses squared distances, so extreme values dominate it.

What does R² (explained) show, and does a high r prove one variable affects the other?

R² is simply r squared, shown as a percentage: for r = −0.9791 it is 95.87%, the share of the variation in Y that a straight line on X accounts for. It says nothing about cause. Two series can move together because of a third factor, a shared time trend, or chance, which is especially easy with five points.

About correlation coefficient calculator

Pearson correlation coefficient calculator for five data pairs

What r is built from

Pearson r is the covariance of two variables divided by the product of their standard deviations. In practice the calculator subtracts each mean, multiplies the paired deviations, adds them up, and scales by the spread of X and Y. The scaling forces the answer into the range −1 to +1. The sign gives the direction and the size gives how tightly the points hug a straight line. The tool reads exactly five pairs and also reports R² and both means.

How the tool labels |r|
|r| rangeLabel shown
0.9 and aboveVery strong
0.7 to below 0.9Strong
0.5 to below 0.7Moderate
0.3 to below 0.5Weak
below 0.3Very weak (or "No linear correlation" at r = 0)

Worked example: a strong but unproven link

Enter X = 1, 2, 3, 4, 5 and Y = 2, 4, 5, 4, 5. The calculator returns r = 0.7746 and R² = 60%, with means of 3 and 4, labelled "Strong positive correlation". The label sounds firm, but five points leave only 3 degrees of freedom. Converting r to t gives 2.1213 and a two-tailed p of about 0.124, so a pattern this clear could easily arise by chance in such a small sample.

Worked example: a negative relationship

Take X = 1, 2, 3, 4, 5 against Y = 10, 8, 7, 3, 2, for instance hours of use against remaining battery points. The result is r = −0.9791, R² = 95.87%, and the label reads "Very strong negative correlation". Here |r| is above the roughly 0.878 needed for significance at 5% with five pairs, though a significance test is still something you must do outside the tool.

Where Pearson r misleads

Curved patterns defeat it: the pairs −2 to 2 against 4, 1, 0, 1, 4 return r = 0 although Y is an exact function of X. Single extreme points distort it: changing the last Y in a perfect 1–5 series from 5 to 20 moves r from 1.0000 to 0.8000. Because you can enter only five pairs, every one of these effects is magnified. Use the figure to describe a pattern you can also see on a scatter plot, and never as proof of cause.

Relationship to regression

Squaring r gives the R² of the least-squares line through the same points, so the correlation calculator and the linear regression calculator agree: both report 60% for the 1–5 and 2, 4, 5, 4, 5 data. Correlation is symmetric, so swapping X and Y leaves r unchanged. Regression is not symmetric, and it adds a slope, an intercept and predictions.

Correlation Coefficient Calculator – Utinzo

Learn more from an authoritative source:

Wikipedia
Related tools

Results are estimates for informational purposes only and do not constitute professional financial, medical, legal, or technical advice. Read full disclaimer →