Answer
Yes, the Biot–Savart law calculates the magnetic field due to electricity. It is an equation in electromagnetism that relates the magnetic field around a wire to the electric current flowing through the wire. The magnetic field is proportional to the current and inversely proportional to the distance from the wire.