Let $\left( R,\,\mathfrak{m} \right)$ be a local ring and $\mathfrak{a}$ be an ideal of $R$. The inequalities
$$\text{ht}\left( \mathfrak{a} \right)\,\le \,\text{cd}\left( \mathfrak{a},\,R \right)\,\le \,\text{ara}\left( \mathfrak{a} \right)\,\le \,l\left( \mathfrak{a} \right)\,\le \,\mu \left( \mathfrak{a} \right)$$
are known. It is an interesting and long-standing problem to determine the cases giving equality. Thanks to the formal grade we give conditions in which the above inequalities become equalities.