Correlation coefficient calculator

Enter both variables in matching order, such as study hours and marks, to see how strongly they move together in a straight line.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter x values and y values (same order as x).
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

r = Σ(x - x̄)(y - ȳ) ÷ √(Σ(x - x̄)² × Σ(y - ȳ)²). Significance: t = r√((n - 2) ÷ (1 - r²)) with n - 2 degrees of freedom.

Example

Result: Correlation coefficient (r): 0.774597; Coefficient of determination (r²): 0.6; p-value (two-tailed): 0.124027.

Limits and caveats

  • Measures straight-line association only; r can be near zero even when a strong curved pattern exists.
  • The strength bands (0.3 and 0.7) are a common rule of thumb, not a fixed standard.
  • Correlation does not show that one variable causes the other.

Questions about this tool

What does r between -1 and 1 mean?

1 is a perfect positive line, -1 a perfect negative line and 0 means no linear relationship.

How do I read the p-value?

If p is below 0.05, the correlation is significant at the 5% level, meaning chance alone is an unlikely explanation.

Does it match Excel CORREL?

Yes, r here equals the result of CORREL and PEARSON.