Correlation Calculator: Pearson, Spearman and Kendall from a CSV or Excel File
Measure how two columns move together, with p-value, confidence interval, regression line and scatter plot. Free, no signup.
| Hours | Score |
|---|---|
| 1 | 52 |
| 2 | 58 |
| 3 | 61 |
| 4 | 70 |
| 5 | 74 |
| Statistic | Value |
|---|---|
| Pearson r | 0.990 |
| p-value | 0.001 |
| R² | 0.980 |
| Line | y = 5.6·x + 46.2 |
Correlation coefficient, p-value and a scatter plot with the fitted line.
How to Calculate Correlation
A complete guide to configuring your data pipeline.
Step 1: Upload Your Table
Each row should be one observation with the two measurements in two columns — for example Hours studied and Exam score. Rows where either value is empty are skipped automatically.
Step 2: Choose the Columns and the Method
In the Correlation tool, pick the X and Y columns and a method:
- Pearson: strength of a linear relationship. Also returns the regression line and R².
- Spearman: based on ranks; detects any monotonic relationship and is robust to outliers.
- Kendall's tau: rank-based, preferred for small samples with many ties.
Step 3: Read the Scatter Plot
The result shows the coefficient, its p-value and the number of pairs used, together with a scatter plot (with the fitted line for Pearson). Always look at the plot: a single outlier or a curved pattern can produce a misleading coefficient.
Technical Specifications & FAQ
A correlation coefficient ranges from −1 (perfect negative relationship) through 0 (no relationship) to +1 (perfect positive relationship). The p-value tests whether the coefficient differs from zero; for Pearson's r, flowingTable also reports the 95% confidence interval, which is more informative than the p-value alone.
Calculations use SciPy (pearsonr, spearmanr, kendalltau and linregress) and match R's cor.test(). Correlation measures association, not causation: two variables can be correlated because both depend on a third one.
Frequently Asked Questions
Pearson or Spearman — which one should I use?
Use Pearson when the relationship looks linear and there are no extreme outliers. Use Spearman when the relationship is monotonic but curved, when the data are ranks or ordinal scores, or when outliers are present. If both give similar values, the conclusion is robust.
What is a strong correlation?
A common rule of thumb treats |r| below 0.1 as negligible, 0.1–0.3 as weak, 0.3–0.5 as moderate and above 0.5 as strong. The interpretation depends on the field: in physics r = 0.9 may be disappointing, while in psychology r = 0.3 can be important.
Does a significant correlation mean one variable causes the other?
No. Correlation shows that two variables move together, not why. The relationship may be caused by a third variable, may run in the opposite direction, or may be a coincidence in a small sample. Establishing causation requires an experiment or a careful study design.
What do R² and the regression line mean?
For Pearson correlation, R² (the square of r) is the share of the variation in Y explained by a straight-line relationship with X. The line y = a·x + b is the least-squares fit drawn on the scatter plot; the slope a tells you how much Y changes, on average, for each unit increase in X.