Solenoid Magnetic Field Calculator

Enter the number of turns, the solenoid length and the current to find the magnetic field.

Result

0.005027 T
5.0265 mT
50.2655 G

How it is calculated

Enter the number of turns N, the coil length L in metres and the current I in amperes. The field inside the coil is

B = μ₀ × N × I ÷ L

with μ₀ = 4π × 10−7 T·m/A, so B comes out in tesla. The tool also converts it to millitesla (× 1000) and gauss (× 10 000). Fields below 1 mT are printed in scientific notation, for example 2.5133 × 10⁻⁵ T, instead of with decimals. The length must be greater than zero; a negative current simply gives a negative field, meaning the opposite direction. The formula is for a long, tightly wound coil with an air or non-magnetic core, and it describes the field in the middle, not near the ends or outside.

Worked example

A coil with 500 turns wound over 0.25 m, carrying 2 A:

  1. Turns per metre: 500 ÷ 0.25 = 2000.
  2. Multiply by the current: 2000 × 2 = 4000 A-turns per metre.
  3. B = 4π × 10−7 × 4000 = 0.005027 T.

The tool shows 0.005027 T, which is 5.0265 mT or 50.2655 G.

Try this example →

Common mistakes

  • Entering the length in centimetres or millimetres. The field is in metres, so a 25 cm coil must be typed as 0.25; entering 25 makes the result 100 times too small.
  • Counting turns per layer or per centimetre instead of the total number of turns. N is the whole count over length L.
  • Using the formula for a short, fat coil. B = μ₀NI/L assumes the length is much greater than the diameter; a flat coil has a very different field.
  • Expecting an iron or ferrite core to be included. The result is for an air core; a magnetic core would multiply the field by its relative permeability, which this tool does not take as an input.
  • Mixing up the units. 1 mT equals 10 G, so comparing the result in tesla with a value in gauss without converting is a frequent slip.

About this calculator

A solenoid — a coil of wire wound in tight loops — produces a nearly uniform magnetic field inside its core when current flows through it. That field strength is given by B = μ0·N·I/L, where μ0 is the permeability of free space (4π×10⁻⁷ T·m/A), N is the number of turns, I is the current, and L is the coil's length: more turns or more current packed into a shorter coil means a stronger field.

This relationship is fundamental to designing electromagnets, relays, inductors, MRI magnets, and solenoid valves, and it's a standard formula in introductory electromagnetism courses — this calculator lets you plug in turns, length and current to get the field strength directly instead of working the formula by hand.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    The tool gives the field in the middle of a long coil; at either end it falls to roughly half. For scale, the gauss line helps: Earth's field is about half a gauss, so a coil giving 25 G is around fifty times stronger. An iron core would multiply the result, but permeability is not included here. What are you winding the coil for, and did your measured field agree with the figure?

Popular calculators

All Calculators