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.
But magnetization is famously path-dependent, so now I'm tending to believe the force will be closer to 1/r^7 when moving on the direction of the magnet, but 1/r^4 when moving away. And not exactly any of those functions.
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.