Solenoid Calculator (Magnetic Field and Inductance)
Magnetic field inside a coil, its inductance by the long-coil formula and by Wheeler's formula, stored energy and flux, with the coil drawn to scale.
Results
What this tool does
Inside a long coil the field is almost perfectly uniform and depends only on turns per metre and current — not on the diameter. The textbook inductance formula assumes the coil is much longer than it is wide; real coils leak field at the ends and come out lower. Wheeler's 1928 formula allows for that and is accurate to about 1 % for air-cored coils longer than 0.4 times their diameter, which is why both are shown. An iron core multiplies the field by its relative permeability only until it saturates, somewhere around 1.5 to 2 T for iron and much earlier for ferrite.
Formula
B = μ₀ μᵣ N I ÷ l · L = μ₀ μᵣ N² A ÷ l · Wheeler (air): L[µH] = r² N² ÷ (2.54 × (9r + 10l)), r and l in cm
Variables
| Symbol | Meaning | Unit |
|---|---|---|
nt | Number of turns | — |
l | Coil length | cm |
d | Mean coil diameter | cm |
i | Current | A |
mr | Relative permeability µr | — |
B | Magnetic field | mT |
H | Magnetising field H | A/m |
L | Inductance (long-coil formula) | µH |
LW | Inductance, air core (Wheeler) | µH |
W | Energy stored in the field | mJ |
FX | Magnetic flux | µWb |
Worked example
- Number of turns200
- Coil length10 cm
- Mean coil diameter2 cm
- Current1 A
- Relative permeability µr1
- Magnetic field2.51327 mT
- Magnetising field H2000 A/m
- Inductance (long-coil formula)157.914 µH
- Inductance, air core (Wheeler)144.477 µH
- Energy stored in the field0.0789568 mJ
- Magnetic flux0.789568 µWb
Limitations
- The formula assumes ideal geometry — an infinitely long wire or coil, a perfectly uniform sphere — in empty space or a uniform material. Real parts come close, but ends, nearby metal and magnetic materials change the field.
- The result is an estimate based only on the values you type. Real situations often include factors this calculator does not know about.