Calculators
Home › Calculators › Correlation Coefficient

Correlation Coefficient Calculator

The coefficient itself: what it packs into one unit-free number.

Compute the coefficient from paired data

Same engine as the correlation calculator, plot included.

Quick answer: The coefficient is covariance scaled by the two standard deviations, which is why scales and units cancel. Advertising spend against weekly sales: r = 0.975, a very strong positive association.

One number, three pieces of information

The correlation coefficient packs a lot into one figure. Its sign gives the direction of the relationship. Its size gives the strength. And because it is unit-free, it travels across studies: a coefficient computed on pounds and inches can sit next to one computed on kilograms and centimetres. The calculator above computes Pearson's coefficient from paired data, with the plot that should always accompany it.

Worked example

A shop records weekly advertising spend (2, 4, 6, 8, 10, 12, 14, 16, in hundreds of dollars) and the week's sales (15, 19, 26, 24, 31, 36, 35, 42, same units). The coefficient comes out at r = 0.975: a very strong positive association. Bigger spend weeks are bigger sales weeks, almost without exception. Whether the ads caused the sales is a separate question: December weeks, for example, would push both numbers up at once.

How the coefficient is built

Each variable is centered on its own mean. Points in the top-right and bottom-left quadrants (both variables above their means, or both below) contribute positive products; points in the other two quadrants contribute negative ones. The coefficient is those products, summed and scaled. This is why outliers matter so much: a point far from both means contributes a huge product and can dominate the sum.

Watch out

Comparing coefficients computed on different ranges. Restricting the range (only tall players, only high scorers) shrinks r even when the underlying relationship is unchanged. A coefficient is a property of the data you fed it, not of the world in general.

Pearson, Spearman, and when each applies

Pearson is the default for two continuous variables with a roughly straight-line relationship. When the data are ranks, or the relationship climbs steadily but curves, Spearman's rank coefficient is the better tool: it correlates the ranks instead of the raw values. Both are in the related tools below.

Frequently asked questions

Is the correlation coefficient the same as the slope?

No. The slope has units (marks per hour) and depends on the scales; the coefficient is unit-free. They are linked: slope = r x (s_y / s_x). Same sign, different jobs.

What does a correlation coefficient of exactly -1 mean?

Every point lies on a single downward-sloping straight line. Real data almost never does this; rounded or invented data sometimes does.

How many pairs do I need for a meaningful coefficient?

The formula works from 3 pairs up, but small samples swing wildly. Under about 10 pairs, treat the value as a sketch. The significance test on the linked page quantifies the uncertainty.