Calculate the magnetic field of a straight wire, a solenoid or a circular loop.
Straight wire: B = μ0·I/(2πr). Solenoid (long): B = μ0·(N/L)·I. Loop centre: B = μ0·I/(2R), with μ0 = 4π×10⁻⁷ T·m/A. Solenoid result is for the field deep inside a long solenoid; ends and short coils give less.
Magnetic field (µT)
How to use this tool
Pick a straight wire, a solenoid or a circular loop. Only the inputs for your choice affect the result.
Type the current in amperes flowing through the wire or coil.
For a wire, enter the distance from the wire; for a loop, its radius; for a solenoid, the number of turns and the coil length.
Results are shown in microtesla, millitesla and tesla. Earth's field is roughly 25–65 µT for comparison.
Formula & worked example
A 10 A wire at 0.1 m gives B = 4π×10⁻⁷ × 10 / (2π × 0.1) = 2×10⁻⁵ T = 20 µT. A 1000-turn, 0.5 m solenoid at 2 A gives about 5026.5 µT inside.
Limitations — read this before you rely on it
Idealised geometries in vacuum (or air): infinite straight wire, infinitely long solenoid, and the exact centre of a loop. Finite wires, short solenoids and off-centre points need the full Biot–Savart integral, and magnetic materials change the field greatly.
Frequently asked questions
The SI unit of magnetic flux density. One tesla is a strong field — a fridge magnet is about 5 mT at its surface, an MRI scanner 1.5–3 T, and Earth's field only about 50 µT.
Each turn contributes, and the turns are packed closely, so the field inside scales with turns per metre times current. That is why electromagnets use many-turn coils.
Outside the wire, no — only the total current and distance matter. Inside a thick conductor the field behaves differently and this formula does not apply.
Deep inside a long solenoid, away from the ends. Near the ends the field falls to about half the central value, and outside a long solenoid it is nearly zero.
As 1/r — double the distance, halve the field. This slow falloff is why power-line fields are still measurable many metres away.
