
Pearson linear correlation
Pearson linear correlation: calculate a transparent estimate from the values and assumptions you provide.
Your inputs stay in your browser. Displayed results are rounded to a maximum of 12 significant digits.
Method and assumptions
Method version 1.0.0 · Updated
Calculate
Formula: r = Σ[(x−x̄)(y−ȳ)] / √[Σ(x−x̄)² Σ(y−ȳ)²]
Pearson linear correlation: calculate a transparent estimate from the values and assumptions you provide.
- xValues
- X values separated by ;
- yValues
- Y values separated by ;
Correlation does not establish causation.
Calculate with code
These short examples use the same inputs and core calculation as this tool. Adapt validation and formatting to your application.
JavaScript
const r = 10 / Math.sqrt(5 * 20); // 1 for perfectly linear data