Skip to content

Solenoid Calculator

B = μ₀nI — turns per metre, not total turns.

Work out Solenoid. B = μ₀nI — turns per metre, not total turns. Says where the formula stops holding.

Written and maintained by Mohit PatelLast checked August 4, 2026How we build these
A
m
m

Optional — gives inductance and stored energy.

1 for air, about 200 for iron, up to 100,000 for mu-metal.

Magnetic field inside

5.0265e-3 T

2,000 turns per metre · 5.027 mT

Magnetic field B5.02655e-3 T
In millitesla5.0265
In gauss50.265
Turns per metre2,000
Inductance3.1583e-3 H
Energy stored0.00632 J

B = μ₀nI, where n is turns per METRE rather than total turns. Stretching a coil to twice the length with the same winding halves the field, and a longer coil with the same spacing gives exactly the same field as a short one. The field inside a long solenoid is essentially uniform, which is why they are used wherever a known, even field is needed — MRI scanners, particle beam optics, laboratory magnets. An iron core multiplies it by the relative permeability, which is how a modest current produces a strong electromagnet.

How the Solenoid Calculator works

Enter turns, current and length for the field inside a solenoid, with inductance and stored energy if you supply a radius. The field depends on turns per metre, so stretching a coil weakens it without unwinding anything.

Also known as: magnetic field of a solenoid calculator · coil magnetic field calculator · solenoid inductance calculator · electromagnet strength calculator

Frequently asked questions

How do I calculate the field inside a solenoid?

B = μ₀nI, where n is turns per metre. With an iron core, multiply by the relative permeability.

Why turns per metre rather than total turns?

Because a longer coil spreads the same turns over more distance. Two coils with identical winding density give identical fields regardless of overall length.

Why is the field uniform inside?

In a long solenoid the contributions from all the loops add to something nearly constant across the interior and nearly zero outside. That uniformity is why MRI scanners and beam optics use them.

How much does an iron core help?

Enormously — a factor of a few hundred for ordinary iron and up to 100,000 for mu-metal. It is how a modest current produces a genuinely strong electromagnet.

Put this calculator on your own site

Free to use, on any site, commercial or not. Paste this where you want it to appear. It is a plain iframe, so it works in WordPress, Squarespace, Wix, Webflow, Ghost and anything else that accepts HTML.

The one-line version
<iframe src="https://www.thecalclibrary.com/embed/solenoid-calculator" width="100%" height="640" style="border:1px solid #e2e8f0;border-radius:12px" loading="lazy" title="Solenoid Calculator"></iframe>
<p style="font:13px/1.5 system-ui,sans-serif;margin:6px 0 0;color:#64748b">Powered by <a href="https://www.thecalclibrary.com/solenoid-calculator" style="color:#64748b">Solenoid Calculator</a> from The Calc Library</p>

The only condition is that the credit line below the frame stays in place. That one line is what pays for the tool being free — it is how anyone else finds it.

Related calculators