Solenoid Magnetic Field Calculator
Calculate the magnetic field inside a solenoid from turn count, length, and current using B=μ₀nI.
Includes worked examples for air-core and iron-core solenoids.
A solenoid is a coil of wire wound in a helix. When current flows through it, it creates a uniform magnetic field inside:
B = μ₀nI = μ₀NI/L
Where:
- B = Magnetic flux density (Tesla, T)
- μ₀ = Permeability of free space = 4π × 10⁻⁷ T·m/A ≈ 1.2566 × 10⁻⁶ T·m/A
- n = Turn density = N/L (turns per meter)
- N = Total number of turns
- I = Current through the wire (amperes)
- L = Length of the solenoid (meters)
Key observations:
- The field inside is uniform (same everywhere along the axis, well away from the ends)
- The field is proportional to both current and turns-per-meter
- Outside the solenoid, the field is nearly zero (it’s a good magnetic “shield”)
Inductance of a solenoid: L = μ₀N²A/ℓ = μ₀n²V where A is the cross-sectional area and V is the volume.
Reference values:
| Application | Typical B |
|---|---|
| Earth’s magnetic field | ~50 μT |
| Small electromagnet (lab) | 10–100 mT |
| MRI machine | 1.5–3 T |
| Strong research magnet | 20–45 T |
| Neutron star surface | 10⁸–10¹⁵ T |
Tip: Adding a ferromagnetic core (iron) multiplies B by the relative permeability μr — typically 100–10,000 for iron alloys.
How we build and check this calculator
This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.
SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.