# Formula for correlation coefficient

Correlation coefficient measures the level of the association between two variables (x and y). Pearson correlation analysis method is the most used one.

The formula for the correlation coefficient is :

$r = \frac{\sum{(x-m_x)(y-m_y)}}{\sqrt{\sum{(x-mx)^2}\sum{(y-my)^2}}}$

$$m_x$$ and $$m_y$$ are the means of x and y variables.

The correlation coefficient can be negative, zero (no dependence) or positive.

The formula is described in details here.

Note that an online correlation coefficient calculator is available here.