Solenoid Magnetic Field Calculator – B = μ₀nI Inside a Coil
Use this free Solenoid Magnetic Field Calculator to find the field inside a solenoid (a long coil of wire) from its number of turns, its length and the current, using B = μ₀nI.
Formula
B = μ₀ × n × I, where n = N ÷ L is the number of turns per metre • B in tesla (T), I in amps (A), μ₀ = 4π × 10⁻⁷ H/m. Note: inside a long solenoid the field is strong and almost perfectly uniform, while just outside it is very weak (nearly zero) — the field is "stored" inside the coil.
How to use
- Enter the total number of turns wound on the solenoid.
- Enter the length of the coil (not the wire) in metres, and the current.
- Click "Calculate" to get the turns per metre and the field inside, in tesla and millitesla.
Worked example
A solenoid has 1000 turns wound over a length of 0.5 m and carries 2 A.
Turns per metre: n = 1000 ÷ 0.5 = 2000 turns/m.
B = μ₀nI = 4π × 10⁻⁷ × 2000 × 2 = 0.00503 T = 5.03 mT.
That is about 100 times stronger than the Earth's field — and sliding an iron core inside would multiply it further still.
FAQ
Why is the field uniform inside a solenoid?
The fields of all the loops add up along the axis and cancel outside. Deep inside a long solenoid every point "sees" the same arrangement of loops, so the field has the same strength and direction everywhere — ideal for experiments needing a steady, known field.
What happens at the ends of the solenoid?
Right at each open end the field is about half its central value, because loops are missing on one side. The formula B = μ₀nI is most accurate for the middle of a long, tightly wound solenoid.
How can the field be made stronger?
Increase the current, pack in more turns per metre, or insert a ferromagnetic core such as iron — the core becomes magnetised and can boost the field hundreds of times. That is how electromagnets and MRI scanners are built.