Let $n$ be a positive integer. Let $mathbf U$ be the unit disk, $pge 1$ and let $h^p(mathbf U)$ be the Hardy space of harmonic functions. Kresin and Mazya in a recent paper found the representation for the function $H_{n,p}(z)$ in the inequality $$|f^{(n)} (z)|leq H_{n,p}(z)|Re(f-mathcal P_l)|_{h^p(mathbf U)}, Re fin h^p(mathbf U), zin mathbf U,$$ where $mathcal P_l$ is a polynomial of degree $lle n-1$. We find or represent the sharp constant $C_{p,n}$ in the inequality $H_{n,p}(z)le frac{C_{p,n}}{(1-|z|^2)^{1/p+n}}$. This extends a recent result of the second author and Markovic, where it was considered the case $n=1$ only. As a corollary, an inequality for the modulus of the $n-{th}$ derivative of an analytic function defined in a complex domain with the bounded real part is obtained. This result improves some recent result of Kresin and Mazya.