Use Biot-Savart law for arbitrary wire geometries, and Ampere’s law for symmetrical configurations to calculate the magnetic field produced.
Calculating the Magnetic Field Produced by a Current-Carrying Wire
To calculate the magnetic field produced by a current-carrying wire, we need to consider the geometry of the wire, the current it carries, and the distance from the wire at which the field is being measured. The Biot-Savart law and Ampere’s law are two fundamental tools used to find the magnetic field generated by current-carrying conductors.
Biot-Savart Law
The Biot-Savart law describes the magnetic field B generated by a small section of current-carrying wire, given the current I and the distance r from the wire:
- Identify the geometry of the wire and break it into small sections.
- Calculate the magnetic field contribution d from each section using the Biot-Savart law equation: d = μ0 I (d
× r̂) / 4πr2, where μ0 is the permeability of free space, I is the current, d is the small section of wire, and r̂ is the unit vector pointing from the wire to the point where the magnetic field is being measured. - Integrate the contributions d over the entire wire to find the total magnetic field B.
Ampere’s Law
Ampere’s law is more convenient for calculating the magnetic field of current-carrying wires with symmetrical geometries, such as straight, circular, or solenoidal wires. The law states that the integral of the magnetic field B around a closed loop is equal to μ0 times the total current enclosed by the loop:
- Choose a closed loop, called an Amperian loop, that encloses the current and has a simple geometry.
- Calculate the line integral of B along the Amperian loop: ∮ B · d
= μ0 Ienclosed. - Solve for the magnetic field B using the symmetry of the problem.
For a straight, infinite wire, Ampere’s law simplifies the calculation of the magnetic field. The magnetic field B at a distance r from the wire is given by B = μ0 I / 2πr, where I is the current in the wire.
In summary, calculating the magnetic field produced by a current-carrying wire depends on the wire’s geometry and the laws used. The Biot-Savart law is useful for arbitrary wire geometries, while Ampere’s law simplifies calculations for symmetrical configurations.

