Statistics

Correlation Coefficient Calculator

The Correlation Coefficient Calculator measures the linear relationship between two equal-length data lists, returning the Pearson correlation coefficient r and its square r-squared.

What this calculator does

The Correlation Coefficient Calculator estimates your result instantly from the values you enter, using standard statistics formulas. The Correlation Coefficient Calculator measures the linear relationship between two equal-length data lists, returning the Pearson correlation coefficient r and its square r-squared. Calculations run in your browser, so nothing you type is sent to a server, and the output is an estimate rather than a certified or official figure.

Correlation Coefficient Calculator

Result

—
Pearson r
—
r²

About Correlation Coefficient Calculator

Paste two equal-length lists of numbers and this tool computes the Pearson correlation coefficient, a value between −1 and 1 that describes how strongly the two variables move together in a straight line. It also reports r².

Both lists need at least two values and some variation, or the correlation is undefined.

Formula & Mathematical Calculation

Calculation Method

  1. Compute } den=Math.sqrt((n × sx2-sx × sx) × (n × sy2-sy × sy))
  2. Compute } r=(n × sxy-sx × sy) ÷ den

Calculation Example

For X = 1, 2, 3, 4, 5 and Y = 2, 4, 5, 4, 5, the tool finds n = 5, Σx = 15, Σy = 20, Σxy = 66, Σx² = 55, Σy² = 86. The numerator is 5×66 − 15×20 = 30 and the denominator is √((5×55 − 225)(5×86 − 400)) = √(50×30) = √1500.

So r = 30 ÷ √1500 = 0.7746 and r² = 900 ÷ 1500 = 0.6.

Key Benefits

  • Computes the Pearson correlation between two paired data lists
  • Reports r-squared alongside r for the proportion of shared variation
  • Describes the strength and direction of the linear relationship
  • Flags data with no variation, where correlation is undefined

How to Use this Calculator

  1. Enter X values
    Type the first variable's values into the X values field, separated by commas.
  2. Enter Y values
    Type the second variable's values into the Y values field, matching the count of X.
  3. Calculate
    Press Calculate and read the Pearson r and r-squared boxes.

Assumptions & Limitations

What the calculation assumes

  • Every value you enter is treated as an exact, known amount.
  • Any rate or interval you enter is assumed to hold for the whole period unless the form asks for it separately.
  • Results use standard published formulas and account only for the values entered above.
  • Rounding is applied for display; the underlying calculation uses your full precision.
  • Results are returned in the same units you enter, unless the tool states the output unit.

What it does not cover

  • Correlation Coefficient Calculator produces a calculated result for reference and learning, not a certified or official measurement.
  • Real-world outcomes differ when tolerances, rounding rules or local standards apply.
  • Definitions and standards vary by region and change over time; verify the convention that applies to your case.
  • Figures are only as accurate as the inputs you supply — check them before acting on the result.
  • For work where the result carries real consequences, confirm it against an authoritative source.

Frequently Asked Questions

Pearson r ranges from -1 to 1, where values near the extremes indicate a strong linear relationship and values near 0 indicate a weak one.

It is simply r multiplied by itself, representing the proportion of variation in one variable that is linearly associated with the other.

It labels the relationship strong, moderate, or weak based on whether the absolute value of r is above 0.7, above 0.4, or lower, and positive or negative by its sign.

If either list has no variation, the denominator becomes zero and the correlation cannot be computed, so the tool asks you to check your data.

Free to use, no account needed. Calculations run in your browser, so nothing you type is sent to a server. Results are estimates — how we build and check our calculators.