Everything runs locally. Your numbers are parsed in the browser, the sums are computed on the page, and nothing is uploaded or stored. Enter as many pairs as you like; the tool updates as you type and works offline once loaded.
Free Correlation Coefficient Calculator
Runs entirely in your browser - no upload, no sign-up.
Paste numbers separated by commas, spaces, or new lines. X and Y must have the same count.
What is the correlation coefficient?
The correlation coefficient measures how strongly two variables move together, on a scale from -1 to +1. This free calculator computes Pearson's r from your paired X and Y values, plus r squared, Spearman's rank correlation, covariance, the means and standard deviations, and the least-squares regression line - all in your browser.
How to use
- 1Enter your X values. Paste or type the first variable into the X box - numbers separated by commas, spaces, or new lines.
- 2Enter your Y values. Add the matching Y values in the second box. X and Y must have the same number of points, paired in order.
- 3Read the result. Pearson's r appears with a plain-language strength and direction, alongside r squared, Spearman's rho, covariance, means, standard deviations and the regression equation. Use Copy results to grab them all.
Who it's for
- Students and researchers checking Pearson's r for a lab report, thesis, or statistics homework without opening SPSS or R.
- Analysts and marketers testing whether two metrics (spend and revenue, price and demand) actually move together before building a model.
- Data scientists sanity-checking a correlation and its r squared quickly, then reaching for Spearman when the relationship looks non-linear.
- Teachers demonstrating positive, negative and near-zero correlation with live numbers a class can change and re-run.
- Spreadsheet users who want the same answer as Excel's CORREL and PEARSON functions but with the extra stats shown side by side.
FAQ
Is the correlation coefficient calculator free?
Yes - 100% free, no sign-up, and no limit on how many data points you enter. The whole calculation runs in your browser and your data is never uploaded.
How is Pearson's correlation coefficient calculated?
Pearson's r = (n·Σxy - Σx·Σy) / √[(n·Σx² - (Σx)²)(n·Σy² - (Σy)²)], where n is the number of pairs. It equals the covariance of X and Y divided by the product of their standard deviations, giving a value between -1 and +1.
What does the correlation coefficient tell you?
Its sign shows direction: positive means the variables rise together, negative means one falls as the other rises. Its size shows strength: values near ±1 are a tight linear relationship, values near 0 mean little or no linear relationship. As a rough guide, |r| under 0.2 is very weak, 0.2-0.4 weak, 0.4-0.6 moderate, 0.6-0.8 strong, and above 0.8 very strong.
What is r squared?
R squared (r²) is Pearson's r multiplied by itself. It is the proportion of the variance in one variable that is explained by the other, from 0 to 1. An r of 0.8 gives r² = 0.64, meaning about 64% of the variation is shared.
What is the difference between Pearson and Spearman correlation?
Pearson measures a linear relationship between the raw values. Spearman applies the same formula to the ranks of the values, so it measures whether the relationship is monotonic (consistently increasing or decreasing) even if it is curved, and it is far less sensitive to outliers. This tool shows both.
How many data points do I need?
You need at least two paired points to compute a coefficient, but two points always give r = ±1, which is meaningless. For a result you can trust, use more points - many textbooks suggest 30 or more, and always check the pattern rather than relying on r alone.
Why is my correlation coefficient undefined?
If every value in X (or every value in Y) is identical, that variable has zero variance and the formula divides by zero, so r cannot be defined. Enter data that actually varies in both columns.
Does this match Excel's CORREL function?
Yes. The Pearson value here is identical to Excel's CORREL and PEARSON functions, and the standard deviations match STDEV (the sample formula that divides by n-1).