We consider the coefficient of determination R2 in a linear regression model under linear constraints. We demonstrate that the usual definition of R2 is no longer useful if the restrictions are inhomogeneous and propose a more meaningful alternative.