Suppose I have a magnetic dipole oriented vertically in the $\hat{z}$ direction so
$$ \vec{m} = m\hat{z}$$
And the position vector to it is $\vec{r} = z\hat{z}$. It's entirely on the z-axis.
We're using cylindrical coordinates and I have a ring-like current loop with radius $a$ at the origin and the current ($I$) is going in the $\hat{\phi}$ and obviously the magnetic dipole is right above the center of it.
I calculated the magnetic field of the current loop using Bio-Savart's Law and got
$$\vec{B}_{loop}(\vec{r} = z\hat{z}) = \frac{\mu_o Ia^2}{2\pi(a^2 + z^2)^{3/2}}$$
Thus the force that the dipole feels should be $$\vec{F}_{dipole} = \nabla(\vec{m} \cdot \vec{B}_{loop})$$
But then I get that $\vec{F}_{dipole} < 0$ so it's pointing downwards towards the loop. Since the dipole and magnetic field are parallel to each other and aligned, shouldn't the force be upwards? Hence, a positive value?