Finding the height of a d-ary heap
A path from the last node to the leaf would always be a longest path. This is because the last node is always at the lowest level in the heap. Now, assume the root is at level $0$. Then the number of nodes at a completely filled level $i$ would be $d^i$. 

Let level $k$ be the last completely filled level in the heap. So the number of nodes upto (and including) level $k$ is: $$\sum\limits_{i = 0}^{k}d^i = \frac{d^{k+1} - 1}{d - 1}$$

Now, the last node - the $n^{th}$ node - can either be the last node at level $k$, or it can be in an incomplete level $k+1$. Taking care of these two cases, it can be seen that:
$$\frac{d^{k+1} - 1}{d - 1} \le n &lt; \frac{d^{k+2} - 1}{d - 1}$$
$$\Rightarrow k\le \log_d(n(d-1) + 1) - 1 &lt; k+1$$

Now, equality is only if the last node is the last leaf of level $k$, which also has distance $k$ from the root. If not, that is if there is a level $k+1$, then the $\log$ term would not be an integer, and applying the ceiling operator would give the right height of $k+1$. Thus, if the last element of the array is at position $n$, the height of the heap is: 
$$h = \lceil \log_d(nd - n + 1) \rceil - 1$$
You can change the base of the logarithm using the change of base formula. Note that this is the same method that Yuval gives in his answer.