Correlation Calculator

Calculate Pearson correlation for paired numeric observations, with both means and pair count shown.

Enter one x,y pair per line. Both variables need nonzero variation and at least two paired observations. Numeric magnitudes must be at most 1e12; nonzero magnitudes must be at least 1e-12.

Calculations stay in this browser; entered values are not uploaded.

Correlation Calculator: inputs and meaning

Calculate Pearson correlation for paired numeric observations, with both means and pair count shown. Enter one x,y pair per line. Both variables need nonzero variation and at least two paired observations.

Enter the data

Paste the matched observations into Paired observations, one pair on each line. Separate the two values with a comma, spaces or tabs. Blank internal rows, missing values and extra columns are rejected. Do not sort x and y independently: that changes the relationship. Choose Calculate or load the example to replace the input with the pairs below.

Worked example

Pairs (1, 2), (2, 4), (3, 6) give Pearson r = 1, a perfect positive linear relationship. Changing the y values to 6, 4, 2 gives r = −1.

Calculation and interpretation

Pearson r is the cross-deviation sum divided by the product of the two square-root squared-deviation sums. The result is dimensionless and lies between −1 and 1. No sample/population selector is needed: using consistent covariance and standard-deviation divisors makes that factor cancel.

What this result cannot tell you

Correlation does not establish causation, and zero Pearson correlation does not rule out a nonlinear relationship. Outliers can substantially change r. Constant x or y makes correlation undefined, so this tool reports an error rather than zero. It calculates no p-value, confidence interval, rank correlation or regression model. With only two distinct nonconstant pairs, r is necessarily +1 or −1 and provides little evidence of a broader relationship.

Precision and input bounds

Use finite decimal numbers, optionally with signs or exponent notation such as 1e3, without thousands separators or unit suffixes. Magnitudes cannot exceed 1e12; nonzero magnitudes must be at least 1e-12. The limit is 1,000 pairs and 100,000 characters. Both values on a line must be present; missing observations are not silently dropped. Displayed answers use 12 significant digits and browser floating-point arithmetic, not arbitrary-precision calculations. Decimal differences smaller than floating-point precision cannot be recovered from the entered numbers.

Changing inputs clears the result. Copy results copies the displayed summary.

Use Covariance Calculator to inspect the corresponding association in the product of the original measurement units.