Compute the magnetic flux density B (in teslas) for three fundamental current configurations: an infinite straight wire, a circular loop on its axis, and a long solenoid. Visualize the field strength as a function of distance, compare configurations, and explore the underlying electromagnetism.
The magnetic field (symbol B, measured in teslas) is a vector field that describes the magnetic influence of moving electric charges, currents, and magnetic materials. In SI units, the tesla (T) is defined as N·s/(C·m) or V·s/m². The field exerts a force on charged particles via the Lorentz force law: F = q(v × B). Magnetic fields are fundamental to electromagnetism, underpinning electric motors, transformers, MRI machines, particle accelerators, and even the Earth's magnetosphere.
Biot–Savart law (general):
dB = (μ₀ / 4π) · (I dℓ × r̂) / r²
Ampère's law (integral form):
∮ B · dℓ = μ₀ Ienc
This calculator implements closed‑form solutions for three canonical current geometries, each of which is derived directly from the Biot–Savart law or Ampère's law. These solutions are cornerstones of undergraduate electromagnetism and appear in standard textbooks (Griffiths, Jackson, Purcell).
For a long, straight conductor carrying current I, Ampère's law gives a cylindrically symmetric field:
The field lines form concentric circles around the wire; the direction is given by the right‑hand rule (thumb along current, fingers curl in the direction of B). This result is exact for an infinitely long wire; for a finite wire, end corrections appear.
For a circular loop of radius R carrying current I, the field on the symmetry axis at distance x from the centre is:
At the centre (x = 0), this reduces to B(0) = μ₀ I / (2R). Far from the loop (x ≫ R), the field falls off as μ₀ I R² / (2 x³), matching the magnetic dipole behaviour.
A solenoid is a tightly wound helical coil. For an infinite solenoid, Ampère's law gives a uniform interior field and zero exterior field:
where n is the number of turns per unit length. For a finite solenoid, the field is weaker near the ends and slightly non‑uniform; our calculator assumes the idealised infinite case, which is an excellent approximation for long solenoids (length ≫ radius).
Values below are computed using the tool's default parameters and verified against standard textbook results.
| Configuration | Parameters | B (T) | Order of magnitude |
|---|---|---|---|
| Straight wire | I = 5 A, r = 0.1 m | 1.00 × 10−5 | Earth's field (~5×10−5 T) |
| Circular loop (centre) | I = 2 A, R = 0.1 m | 1.26 × 10−5 | Small bar magnet |
| Circular loop (x = 0.05 m) | I = 2 A, R = 0.1 m | 8.96 × 10−6 | — |
| Solenoid | I = 3 A, n = 500 m−1 | 1.88 × 10−3 | MRI scanner (~1–3 T) |
A Helmholtz coil consists of two identical circular loops separated by a distance equal to their radius. This configuration produces a nearly uniform magnetic field in the central region. Using our calculator, you can compute the on‑axis field for a single loop and then superposition to design a Helmholtz pair. For R = 0.2 m, I = 1 A, the field at the midpoint is approximately B = 8.99 × 10−6 T per loop, or ~1.8×10−5 T for the pair. Such coils are used in laboratories to cancel the Earth's magnetic field and to calibrate magnetometers.
The constant μ₀ = 4π × 10−7 T·m/A is the vacuum permeability, also known as the magnetic constant. It appears in all magnetostatic formulas and defines the strength of the magnetic field produced by a given current. In the SI system, μ₀ is an exact defined value (since 2019, it is fixed via the definition of the ampere). Together with the vacuum permittivity ε₀, it determines the speed of light: c = 1 / √(μ₀ ε₀).