Correlation Coefficient CalculatorFree online math calculator — instant results, no sign-up

Calculate Pearson's correlation coefficient for paired values.

Inputs

Pearson correlation
1

Sign in to save results and favorites.

About the Correlation Coefficient Calculator

The Correlation Coefficient Calculator calculates Pearson's correlation coefficient for two lists of paired numerical values. It measures the direction and strength of their linear relationship on a scale from −1 to 1. With Values set to 2, 4, 6, 8, 10 and Paired values or weights set to 1, 2, 3, 4, 5, the Pearson correlation is 1.

Values
Enter the first variable's numerical observations, defaulting to 2, 4, 6, 8, 10, in consistent units appropriate to that variable.
Paired values or weights
Enter the second variable's observations in matching order, defaulting to 1, 2, 3, 4, 5, in consistent units appropriate to that variable; for this Pearson calculation, these entries are paired values rather than weights.

Formula and method

r = Σᵢ₌₁ⁿ[(xᵢ − x̄)(yᵢ − ȳ)] / √{[Σᵢ₌₁ⁿ(xᵢ − x̄)²][Σᵢ₌₁ⁿ(yᵢ − ȳ)²]}, where x̄ = (Σᵢ₌₁ⁿxᵢ)/n and ȳ = (Σᵢ₌₁ⁿyᵢ)/n. For the default inputs: r = 20 / √(40 × 10) = 1.
  • rPearson's correlation coefficient, a dimensionless measure of linear association.
  • xᵢThe observation in position i of the Values list.
  • yᵢThe observation in position i of the Paired values or weights list.
  • x̄The mean of the Values list; it is 6 for the default inputs.
  • ȳThe mean of the paired-values list; it is 3 for the default inputs.
  • nThe number of complete pairs; it is 5 for the default inputs.
  • iThe position of a pair in the lists, from 1 through n.
  • ΣSummation over all paired observations.

Match the entries by position to form (2, 1), (4, 2), (6, 3), (8, 4), and (10, 5). Calculate the means, x̄ = 6 and ȳ = 3, and subtract the corresponding mean from each observation. The sum of the paired deviation products is 20, while the sums of squared deviations are 40 for x and 10 for y. Divide 20 by √(40 × 10) to obtain r = 1.

Worked example

These are the calculator's starting values and the results it actually produces for them.

Inputs

  • Values2, 4, 6, 8, 10
  • Paired values or weights1, 2, 3, 4, 5

Results

  • Pearson correlation1

How to use the Correlation Coefficient Calculator

  1. 1Enter the first list in Values; use 2, 4, 6, 8, 10 to reproduce the worked example.
  2. 2Enter the corresponding second list in Paired values or weights; use 1, 2, 3, 4, 5 for the worked example.
  3. 3Check that both lists contain the same number of entries and that entries in the same position belong to the same observation.
  4. 4Check that each list contains at least two observations and that neither list is constant, then run the calculation.
  5. 5Read the Pearson correlation output; the default lists produce 1, indicating a perfect positive linear relationship.

Reading your result

The Pearson correlation row reports r, which has no units. A value of 1 indicates a perfect positive linear relationship, −1 indicates a perfect negative linear relationship, and 0 indicates no linear association. Values closer to either endpoint indicate stronger linear association. For the default inputs, the output is 1 because every paired value is exactly half its corresponding Values entry.

Limitations

Pearson's correlation measures linear association, not every kind of relationship, and it does not establish causation. Both lists must have equal length, contain valid numerical pairs, and have nonzero variation; correlation is undefined if either list is constant. At least two pairs are required, but very small datasets provide weak evidence about a wider population. Outliers can strongly influence the result. The coefficient alone does not report statistical significance or uncertainty. Despite the second input's label, this calculation treats its entries as paired observations, not observation weights.

Common questions

Why do the default lists produce a Pearson correlation of 1?+

For Values 2, 4, 6, 8, 10 and paired values 1, 2, 3, 4, 5, every pair satisfies y = x/2. All points therefore lie exactly on a straight line with positive slope, giving r = 1.

Should I enter weights in Paired values or weights?+

No. For this Pearson correlation calculation, enter the second variable's measurements. Weighted correlation would require two measurement lists plus a separate set of weights.

Does the order of the values affect the correlation?+

The pairing matters. Reordering complete pairs leaves the result unchanged, but rearranging only one list changes which observations are paired and can change the correlation.

Must the two lists use the same units?+

No. Each variable should use consistent units within its own list, but the two variables may have different units. Pearson's correlation is dimensionless, and a positive linear unit conversion does not change it.

Does the calculator save my information?+

Calculations run in your browser. While signed in, inputs and results are automatically recorded in account history; saving a result creates a separate saved record.

You might also like

Results are estimates for informational purposes and are not financial, medical or legal advice.