Free tools that run in your browser. Use any tool without an account.

Favourites Cart
Sign in
Join free

Correlation Coefficient Calculator

  • Free
  • Runs in your browser
  • No account needed

Use Pearson r to measure linear link. For X 1,2,3,4,5 and Y 2,4,5,4,5 the tool returns r = 0.775, r² = 0.600, slope = 0.600, p = 0.12, n = 5.

Pearson correlation r
0.529809
Strength
Fairly strong positive linear relationship
r squared (share of variation explained)
0.280697
Best-fit line
y = 0.385225x + 65.141572
p-value (two-tailed, r = 0 test)
0.279645
Number of pairs
6

Strength words follow a common rule of thumb (under 0.3 weak, 0.5 to 0.7 fairly strong, over 0.9 very strong); fields differ. Correlation does not show that one thing causes the other.

Runs in your browser. Your files and values are not sent to us. Report a problem
Advertisement

About the Correlation Coefficient Calculator

This tool computes Pearson correlation r for paired X and Y values you type or paste. You get r, r squared (share of variation explained), the least squares best-fit line, the two-tailed p-value for r = 0, and the number of pairs. Everything runs in your browser; nothing is uploaded to a server. Results update instantly as you type, and you can copy results or share a link that reopens with your numbers. The calculator uses the standard Pearson formula and the t test for r, so it gives the same answers you would get from stat texts, Microsoft PEARSON, or NIST. The interface keeps input simple and quick for students, analysts, teachers and researchers who need fast, transparent checks of linear association.

How to use it

  1. 1Enter matching X values and Y values in the two input fields in the same order.
  2. 2Watch Pearson r, r², slope, intercept, p-value and pair count update instantly as you type.
  3. 3Copy the numeric results or click Share to create a link that reopens with your numbers.
Advertisement

Worked example

Input X: 1, 2, 3, 4, 5 and Y: 2, 4, 5, 4, 5. Results: r = 0.775, r² = 0.600 (60.0%), slope = 0.600, intercept = 2.200, p-value (two-tailed) ≈ 0.12, n = 5.

The formula

r = sum((x - mean x)(y - mean y)) / sqrt(sum((x - mean x)^2) x sum((y - mean y)^2))It runs from -1 (perfect falling line) to +1 (perfect rising line); 0 means no straight-line linkThe p-value tests r = 0 with t = r sqrt((n - 2) / (1 - r^2)) on n - 2 degrees of freedomThe best-fit line is least squares: slope = Sxy / Sxx

Source: Microsoft support: PEARSON functionNIST Dataplot reference: correlationPearson correlation coefficient (Wikipedia). Last checked 6 November 2026.

What it is good for

  • Runs entirely in your browser, so inputs do not leave your computer.
  • Shows r, r², slope, intercept, p-value and number of pairs instantly.
  • Copy numeric results or share a link that reopens with your data.
  • Computes Pearson r only; it does not compute Spearman rho or Fisher confidence intervals.
  • Correlation measures association, not causation; check study design before making causal claims.
Advertisement

Questions people ask

What input format does the tool accept?

Enter matching X and Y values separated by commas, spaces or newlines. Each X must line up with the corresponding Y in the same order.

How many pairs do I need?

You need at least three pairs to compute r. For reliable inference you normally want many more than three; treat p-values and estimates with caution for very small samples.

What does the Strength result mean?

Strength follows a common rule of thumb: under 0.3 weak, 0.5 to 0.7 fairly strong, over 0.9 very strong. These cutoffs are approximate and different fields use different standards.

Does a high correlation prove causation?

No. Correlation only measures linear association. Causal claims require experimental design, longitudinal data or causal analysis outside this calculator.

How is the p-value calculated?

The tool uses t = r sqrt((n - 2)/(1 - r^2)) with n - 2 degrees of freedom and returns the two-tailed p-value for r = 0. This is the standard test in statistics texts.

Can I use commas as decimal separators or semicolon lists?

The tool expects dot decimals by default and accepts commas, spaces or newlines as separators. If your locale uses comma decimals, replace decimals with dots or paste values on separate lines to avoid ambiguity.

Help keep every tool free

FreeToolr stays free because people help it grow. Share a tool you like, tell us what to build next, or support us on Ko-fi.

Advertisement
Advertisement