Biot-Savart Law Simulator Back
Electromagnetism Simulator

Biot-Savart Law Simulator — Magnetic Field of a Circular Current Loop

Compute the on-axis magnetic flux density B(z) of a circular current loop (current I, radius R, turns N) in real time from the Biot-Savart law. The center field, half-width, 3D loop perspective, and bell-shaped B(z) profile are visualized side by side.

Parameters
Current I
A
Loop radius R
cm
Axial distance z
cm
Number of turns N
turns

Vacuum permeability mu0 = 4 pi x 10^-7 T m / A. Positive current flows in the direction of the arrows (counter-clockwise) and the field points in +z by the right-hand rule.

Results
Magnetic field B(z)
Center field B(0)
B(z) / B(0)
Half-width z_(1/2)
Current loop and observation point (3D perspective)

Blue ellipse = current loop / red arrows = current direction / horizontal line = symmetry axis / yellow dot = observation point on +z / orange arrow = magnetic field B (length proportional to |B|)

On-axis field profile B(z)

X = axial distance z (cm), -3R to +3R / Y = magnetic field B / yellow dots = center (0, B(0)) and current (z, B(z)) / dashed = half-width at +/- z_(1/2)

Theory & Key Formulas

The Biot-Savart law gives the magnetic flux density produced by an infinitesimal element $I\,d\boldsymbol{\ell}$ of a steady current. For a circularly symmetric loop the integral closes in a simple analytical form on the axis.

On-axis field of a circular loop (radius $R$, current $I$, $N$ turns):

$$B(z) = \frac{\mu_0\,N\,I\,R^2}{2\,(R^2 + z^2)^{3/2}}$$

Center field at $z = 0$:

$$B(0) = \frac{\mu_0\,N\,I}{2R}$$

Half-width (the distance where $B = B(0)/2$):

$$z_{1/2} = R\sqrt{2^{2/3} - 1} \approx 0.766\,R$$

$\mu_0 = 4\pi \times 10^{-7}$ T m / A is the vacuum permeability, $N$ is the number of turns, $I$ is the current [A], $R$ is the loop radius [m], and $z$ is the on-axis distance from the loop center [m].

What is the Biot-Savart Law Simulator?

🙋
I learned the Biot-Savart law $dB = (\mu_0 / 4\pi) (I\,d\boldsymbol{\ell} \times \hat{\boldsymbol{r}}) / r^2$ in class, but I cannot picture what kind of magnetic field actually comes out of it. What is the cleanest example?
🎓
The cleanest application is the on-axis field of a circular loop of radius R. The symmetry lets you do the integral by hand and you get the closed form $B(z) = \mu_0 N I R^2 / [2(R^2 + z^2)^{3/2}]$. That is exactly what this simulator shows: a 3D perspective of the loop and observation point on the left, and a bell-shaped B(z) on the right. Move the I, R, z, N sliders.
🙋
More current giving more field is intuitive, but I am surprised that a larger radius R reduces the center field. Why?
🎓
Because $B(0) = \mu_0 N I / (2R)$ is inversely proportional to R, so doubling the radius halves the center field. Intuitively, a bigger loop puts each current element farther from the observation point, and the $1/r^2$ falloff dilutes their contribution. The benefit of a larger R is a wider profile (half-width $z_{1/2} \approx 0.766R$). Compare R = 5 cm vs R = 10 cm in the profile and you will see this strength-vs-extent trade-off.
🙋
Increasing N multiplies the center field by N — does that mean we can make N as large as we want?
🎓
Linearly in theory, but in practice three things bite. First, ohmic heat: more turns means longer wire and higher resistance, so you need more voltage to push the same current. Second, wire size: keeping the current rating forces thicker wire and bigger coil volume. Third, inductance scales as N squared, so the transient response gets slow. That is why spot welders use few turns of fat wire while a galvanometer or speaker uses many turns of fine wire.
🙋
What does the "half-width" actually mean and how do designers use it?
🎓
It is the distance from the loop center where B(z) drops to half of B(0); here that is about 0.766 R. Physically it sets the scale over which the field is "useful." If you want to focus charged particles at the center, choose R so that z_(1/2) is bigger than the beam diameter. A Helmholtz coil — two identical loops separated by R — exploits this by adding two single-loop fields so that the central region becomes extremely flat.

Frequently Asked Questions

No, the observation point is restricted to the symmetry axis. On axis, the radial components cancel by symmetry and only the z component survives, which makes the integral close in elementary functions. Off-axis the Biot-Savart integral involves complete elliptic integrals K(k) and E(k); textbooks and numerical libraries do give a closed form using these special functions, but the on-axis closed form is the best teaching tool for building physical intuition, so this simulator focuses on it.
Reversing the current also reverses the on-axis B vector by the right-hand rule. In this tool the positive current flows counter-clockwise as seen from the observer, and the positive field direction is +z. Mathematically a negative I gives a negative B, but the slider here is restricted to I greater than or equal to 0.1 A. We use the scalar current value and let the drawing convey the vector direction.
Before the 2019 SI revision, the ampere was defined via the force between two infinite parallel wires, which made mu0 = 4 pi x 10^-7 T m / A an exact value. After the revision the elementary charge e is fixed by definition and mu0 becomes a measured constant. The CODATA 2018 value is 1.25663706212 x 10^-6 T m / A, differing from 4 pi x 10^-7 by about 1 part in 10^10. For practical engineering calculations 4 pi x 10^-7 is still perfectly accurate, and that is the value used here.
In the far-field limit z much larger than R, $(R^2 + z^2)^{3/2} \approx z^3$ and $B(z) \approx \mu_0 N I R^2 / (2 z^3) = \mu_0 m / (2 \pi z^3)$, where $m = N I \pi R^2$ is the magnetic moment. So a circular current loop looks like a magnetic dipole from far away — exactly the same field shape as a small bar magnet. Push the z slider beyond about 3R in this tool and you will see the sharp 1/z^3 decay.

Real-World Applications

Main field of MRI machines: Medical MRI scanners place a superconducting solenoid around the patient and create a very uniform field of 1.5 T to 7 T in the imaging volume. Real designs evaluate the Biot-Savart law numerically as a superposition of many circular loops, optimizing winding positions and passive shim iron so that the field non-uniformity stays below a few parts per million across the whole volume. The single-loop B(z) of this tool is the building block from which any axial array of loops, including an MRI main coil, is constructed.

Cancelling Earth's field with Helmholtz coils: In particle and atomic physics experiments, Earth's field (about 50 micro-tesla) deflects beams, so the apparatus is placed inside a pair of Helmholtz coils. With R = 30 cm, I = 1 A, and N = 100 in this tool, the center field is mu0 x 100 x 1 / (2 x 0.3) which is about 209 micro-tesla — well above Earth's field, enough to cancel it with a uniform background. The same idea is used to demagnetize CRT monitors and to calibrate sensors.

Wireless charging and induction heating: A Qi wireless phone charger or an induction cooker uses a transmitter coil to push axial flux into a receiver coil (or pot bottom). With separation z and coil radius R, the coupling strength scales as $R^2 / (R^2 + z^2)^{3/2}$ and falls off rapidly when z/R grows. Sweep z in this tool to see why wireless chargers demand the device be placed nearly in contact.

Foundations of motors and generators: DC motor windings, stepper motor phase coils, and relay pull-in coils — practically every electromagnetic actuator — compute the field "made by current" using the Biot-Savart law as a starting point. With an iron core the field is amplified by the relative permeability mu_r, and the linear-in-N rule of this tool is the very same scaling that drives the design.

Common Misconceptions and Pitfalls

The most common misconception is to think that "a bigger loop gives a stronger field." In fact the center field is $B(0) = \mu_0 N I / (2R)$, inversely proportional to R, so doubling the radius halves the center field. The benefit of larger R is a wider, flatter profile, not a higher peak. Compare R = 5 cm and R = 10 cm in this tool and check how both the center field and the half-width depend on R.

Next is the belief that "B becomes infinite at z = 0." The divergence of Biot-Savart for a point current is not what is happening here. The loop sits at z = 0 in the loop plane, but the on-axis observation point z = 0 is the center of the loop, which is actually a distance R away from the wire. There is no current at that location, so $B(0) = \mu_0 N I / (2R)$ stays finite. A divergence only appears if you approach the wire itself (R going to zero with the observation point on the loop), which never appears in the on-axis formula.

Finally, do not forget that the Biot-Savart law is exact only for steady currents. At high frequency, where the displacement current cannot be neglected, you must return to the full Maxwell equations. As a rule of thumb, the magnetostatic approximation works well as long as the coil dimension L is much smaller than the wavelength (L much less than lambda / (2 pi)). For radio antennas or fast digital traces this no longer holds. Keep in mind that this tool reports the DC / low-frequency (quasi-static) result.