Let \((R, \mathfrak {m})\) be a commutative Noetherian local ring, I an ideal of R and let M be a non-zero I-cofinite R-module. In this paper we show that if M has finite injective dimension, then \(\dim R/I\leqslant \mathrm{inj\, dim}\, M \leqslant \textrm{depth}\, R\) ; and \(\mathrm{inj\, dim }\,M=\textrm{depth}\,R\) , whenever \(\mathfrak {m} M \ne M\) . These generalize the classical Bass formulas for injective dimension. As an application we obtain some results on the injective dimension of local cohomology modules. In addition, we show that R is a Cohen–Macaulay ring if admits a Cohen–Macaulay R-module of finite projective dimension.