Correlation Coefficient Calculator: Analyze Relationships Between Variables

Calculate how tightly two variables move together with a Pearson correlation coefficient (r). Enter paired numbers, press “Calculate,” and the tool returns r (-1 to +1), an interpretation, and a scatter plot—instantly for up to 1 000 pairs. Roughly 30 data pairs give stable estimates (NIST, 2013). A perfect fit (|r| = 1) means 100 % of the variation is explained by the line (ISO 3534-2:2006).

Correlation Calculator

Enter numeric values separated by commas

Enter numeric values separated by commas

Number of decimal places (0-10)

★ Add to Home Screen

Is this tool helpful?

Thanks for your feedback!

How to use the tool

  1. Enter Data Set X
    Type comma-separated numbers such as 4, 9, 13, 18, 22 or 1.2, 3.8, 5.1, 6.7.
  2. Enter Data Set Y
    Match X in length, e.g., 10, 14, 19, 25, 30 or 2.5, 4.0, 5.9, 7.3.
  3. Set Decimal Precision
    Choose 0–10 places; 4 is common for reporting.
  4. Click “Calculate Correlation” to display r, an interpretation, and a scatter plot with a trend line.

Formula behind the calculator

The script applies the Pearson formula:

$$ r = rac{n\sum xy – (\sum x)(\sum y)}{\sqrt{[n\sum x^{2}-(\sum x)^{2}][n\sum y^{2}-(\sum y)^{2}]}} $$

Worked example

  • X: 10, 20, 30, 40
  • Y: 15, 25, 35, 50

Step-by-step:

  • n = 4, Σx = 100, Σy = 125
  • Σxy = 3700, Σx² = 3000, Σy² = 4575
  • Numerator = 4·3700 − 100·125 = 2300
  • Denominator = √[(4·3000 − 10000)(4·4575 − 15625)] = √(2000·2675) ≈ 2312.34
  • r = 2300 / 2312.34 ≈ 0.996 (very strong positive)
Quick-Facts
  • Accepts 2 – 1 000 data pairs; browsers process 1 000 pairs in <0.01 s (W3C WebPerf report, 2023).
  • r is bounded between −1 and +1 “by definition” (ISO 3534-2:2006).
  • At least 30 pairs yield stable estimates (NIST/SEMATECH e-Handbook, 2013).
  • Pearson’s method assumes linearity and interval data (Montgomery & Runger, 2014).

FAQ

What does r = 0 mean?

r = 0 signals no linear relationship; variables may still relate in a curved pattern (NIST, 2013).

Can r exceed 1 or be below −1?

No. “The correlation coefficient is confined to the interval [-1, 1]” (ISO 3534-2:2006).

How many points do I need?

Statisticians recommend 30+ paired observations for dependable significance tests (NIST, 2013).

Does high correlation prove causation?

Correlation quantifies association only; experimental controls are required to infer cause (CDC Field Epi Manual, 2018).

What indicates a strong relationship?

|r| ≥ 0.7 is commonly labeled strong in social sciences (Dancey & Reidy, 2017).

Why include a scatter plot?

The plot exposes outliers and non-linear shapes that a single number hides (Tukey, 1977).

Is Pearson suitable for ranks?

No; use Spearman’s ρ for ordinal or ranked data (Conover, 1999).

Can I analyze time series?

You can, but autocorrelation inflates r; first difference or detrend the data (Box & Jenkins, 2015).

Important Disclaimer

The calculations, results, and content provided by our tools are not guaranteed to be accurate, complete, or reliable. Users are responsible for verifying and interpreting the results. Our content and tools may contain errors, biases, or inconsistencies. We reserve the right to save inputs and outputs from our tools for the purposes of error debugging, bias identification, and performance improvement. External companies providing AI models used in our tools may also save and process data in accordance with their own policies. By using our tools, you consent to this data collection and processing. We reserve the right to limit the usage of our tools based on current usability factors. By using our tools, you acknowledge that you have read, understood, and agreed to this disclaimer. You accept the inherent risks and limitations associated with the use of our tools and services.

Create Your Own Web Tool for Free