Magnetic field strength calculation