It's 1/r^4 for magnetic dipoles, where both have fixed a fixed dipole moment. So it's 1/r^4 between two permanent magnets.
Where one object is a permanent magnet and the other is some unmagnetized ferromagnetic/paramagnetic piece metal, then the dipole moment of that piece of metal also depends on the distance. Assuming it's proportional to the magnetic field of the other dipole (~1/r^3) then the force is going to be ~1/r^7 for this pair of objects.