Magnetic Field Explorer
Select a current source (straight wire, circular loop, solenoid, or two parallel wires), adjust the parameters, and see the 2D field pattern with B-field magnitude and step-by-step derivation. All calculations run in your browser.
Parameters
2D Field Pattern
Cross-section (wire into/out of page)Results for Infinite Straight Wire
Right-Hand Rule
Point thumb in current direction. Fingers curl in the direction of B.
Step-by-Step Derivation
Reference Guide
Biot-Savart Law
The Biot-Savart Law gives the magnetic field produced by a small current element. It is the magnetic analog of Coulomb's Law.
where is the permeability of free space. The cross product means is always perpendicular to both the current element and the displacement vector.
Infinite Straight Wire
Integrating the Biot-Savart Law (or using Ampere's Law with a circular Amperian loop) gives the magnetic field at perpendicular distance r from an infinite wire carrying current I.
The field lines form concentric circles around the wire. The direction is determined by the right-hand rule: point your thumb in the direction of current, and your fingers curl in the direction of the field.
Circular Current Loop
On the axis of a circular loop of radius R carrying current I, the magnetic field at distance x from the center is:
At the center (), this simplifies to . The field pattern resembles a magnetic dipole (bar magnet) far from the loop.
Solenoid Field
A solenoid with N turns over length L produces a nearly uniform magnetic field inside. Using Ampere's Law with a rectangular loop:
The field at the ends is half the interior value: . Outside an ideal, infinitely long solenoid, the field is approximately zero.