The coefficient of determination, denoted $R^2$ or $r^2$, pronounced "R squared", is the proportion of the variance in the dependent variable that is predictable from the independent variable(s).
We define it as $$ R^2 = 1 - \frac{SS_{res}}{SS_{tot}} $$ where the total sum of squares is given as $$ SS_{tot} = \sum_i (y_i - \bar{y})^2 $$ and the sum of residuals is given as $$ SS_{res} = \sum_i (y_i - \hat{y}_i)^2 $$ Here we have that bar/overline means the arithmetic mean, and we have that $\hat{y}_i$ is the modeled/predicted value at index $i$.