Effects of distance on magnetic strength