Solenoid Inductance Calculator

Work out the self inductance of a coil, the field inside it, the flux and the energy stored, in metric or imperial units.

Technology and NetUpdated 2026-10-225 min read
Solenoid Inductance Calculator
Switches the length, the diameter, the field and the answer between metric and imperial units.
Use 1 for an air core, about 200 to 5000 for an iron core, and tens of thousands for a ferrite or powdered iron core.
Self inductance
...
Turns per unit length...
Magnetic field inside...
Flux through the coil...
Energy stored in the field...

What it does

A coil of wire does two things at once. It makes a magnetic field from the current running through it, and the changing field inside it induces a voltage that tries to fight any change in the current. The size of that effect is the inductance, and it is the first number you need for any circuit with a coil in it.

The physics text behind this page works through it in three steps: assume a current is flowing, work out the magnetic field with the law of Ampere, get the flux through the coil, and then use the relation that the self inductance is the number of turns times the flux divided by the current.

For a long cylindrical solenoid of length l, cross sectional area A and N turns, the field inside is the permeability of free space times the number of turns per unit length times the current, because the ends are far enough away to be ignored. The flux through one turn follows, and dividing out the current gives the inductance as the permeability of free space times N squared times A over l.

This page runs that calculation. Give it the number of turns, the length and the diameter of the coil, the current you plan to run and the relative permeability of the core, and it returns the inductance, the field inside, the flux through the coil, the energy stored in the field and the number of turns per unit length.

The limits are worth stating. The formula is the ideal long solenoid, so it needs the length to be much greater than the diameter, and it ignores the resistance of the wire, the fringing at the ends and the fact that a real coil is not a uniform cylinder. A core of ferromagnetic material also brings saturation, which no permeability value can describe.

How to use

  1. Choose metric or imperial for the length, the diameter and the answer.
  2. Enter the number of turns of wire on the coil.
  3. Enter the length of the coil and its diameter, and check that the length is several times the diameter, because the formula assumes a long solenoid.
  4. Enter the current you want to run through the coil.
  5. Enter the relative permeability of the core, using 1 for an air core and a few hundred to a few thousand for iron.
  6. Read the inductance for the circuit design, the field inside for the magnetic circuit, and the stored energy for the size of the flyback or suppression component you need.

Formula

Self inductance: L = mu0 x mu_r x N^2 x A / l, with A the cross sectional area of the coil, N the number of turns and l the length.
L
Self inductance of the coil, in henries.
N
Number of turns of wire.
A
Cross sectional area inside the coil, in square metres.
l
Length of the coil, in metres.
mu0
Permeability of free space, 4 pi times 10 to the minus 7 henries per metre.

Written another way the inductance is the permeability of free space times the square of the turns per unit length times the volume of the coil, and the text behind this page notes that the inductance of a long solenoid depends only on those physical properties and not on the magnetic field or the current. The field inside is the permeability times the turns per unit length times the current, the flux is the field times the area, and the stored energy is half the inductance times the square of the current.

Worked example

Example: a 500 turn coil 100 mm long and 20 mm across

Defaults: metric units, 500 turns, a length of 0.1 m, a diameter of 20 mm, a current of 1 A and a relative permeability of 1.

  1. The cross sectional area of the coil is pi times 0.02 squared over 4, which is 3.1416e-4 m2.
  2. The permeability of free space is 4 pi times 10 to the minus 7, which is 1.2566e-6 henries per metre.
  3. The inductance is that permeability times 1 for the air core times 500 squared times 3.1416e-4, divided by 0.1, which gives 0.98696 henries.
  4. That is 0.987 mH, and it does not depend on the current.
  5. The field inside is the permeability times 500 turns over 0.1 m times 1 A, which is 0.006283 T.
  6. The flux through the coil is the field times the area, 0.006283 x 3.1416e-4 = 1.9740e-6 Wb, and the energy stored is half the inductance times the square of the current, 0.000493 J.
  7. The tool shows 0.987 mH, 5,000.0 turns per m, 0.006283 T, 0.000002 Wb and 0.000493 J.

Reference table

The same 20 mm coil, 100 mm long, with different numbers of turns
TurnsTurns per mInductanceField at 1 A
1001,000.00.039 mH0.001257 T
2502,500.00.247 mH0.003142 T
5005,000.00.987 mH0.006283 T
100010,000.03.948 mH0.012566 T

Limits

  • The formula is the ideal long solenoid, so it needs the length to be several times the diameter and it ignores the fringing field at the ends.
  • It assumes the core is linear, so it says nothing about saturation in a ferromagnetic core or the hysteresis that goes with it.
  • It ignores the resistance of the wire and the loss in the core, so it cannot be used to predict the behaviour of a real inductor on a bench.
  • Skin effect and proximity effect are absent, which matters as soon as the frequency is high enough for the current to crowd into the outer part of the wire.

Common mistakes

  • Leaving the square of the turns out. The inductance goes as N squared, so 1000 turns is not twice 500 turns but four times the inductance.
  • Using the wire length instead of the length of the coil. The formula uses the length of the winding, not the length of the wire in it.
  • Forgetting that the air core has a relative permeability of 1, and treating a bare coil as if it had an iron core.
  • Using the formula for a coil that is as long as it is wide. The field inside such a coil is nothing like uniform.
  • Mixing up henries and millihenries, or gauss and tesla, which are a factor of 10000 apart.

Try it yourself

Quick checks. Answers sit tucked under each question.

What happens if the number of turns is doubled to 1000?

The inductance goes up four times, to 3.948 mH, because the formula carries the square of the number of turns. The field at the same current doubles to 0.012566 T and the energy stored at 1 A goes up four times as well, to 0.001974 J.

What if the coil is wound on an iron core with a relative permeability of 500?

The inductance is multiplied by 500, giving 493.480 mH, and the field at the same current is multiplied by 500 as well, giving 3.141593 T. That is close to the point where an iron core starts to saturate, and above saturation the real field grows far more slowly than the formula says.

How much energy does the coil store at 1 A?

0.000493 J, which is half the inductance times the square of the current. The same coil at 2 A would store four times as much, 0.001974 J, and at 0.5 A only a quarter as much, 0.000123 J, because the energy depends on the square of the current.

Questions

What is a solenoid?

A coil of wire wound into a cylinder. The text behind this page notes that the length of the solenoid is taken to be much larger than its diameter, so the field inside can be taken as uniform and the end effects ignored.

Why does the inductance depend on the square of the number of turns?

Because the field is proportional to the number of turns and the flux is proportional to the field, so the flux linkage is proportional to the number of turns squared. The text puts it the other way round, as the inductance depending on the turns per unit length squared times the volume of the coil.

Does the inductance change with the current?

Not in the ideal model, and the source is explicit that the self inductance of a long solenoid depends only on its physical properties and not on the magnetic field or the current. With a real ferromagnetic core it does change, because the core permeability depends on the field.

What is the energy in the field for?

It is the energy that has to be put in to build the field, and the energy that comes back out when the field collapses. In a circuit that is why a coil across a switch can produce a damaging voltage spike, and why a diode or a resistor is put across it.

What is a toroid and does this page cover it?

A toroid is a coil bent into a ring, and the same text gives its inductance as the permeability times N squared times the height divided by 2 pi times the logarithm of the ratio of the two radii. This page covers the straight solenoid only.

What does the relative permeability do?

It scales the field and the inductance by the factor by which the core guides the flux compared with air. Air is 1, cast iron is a few hundred, and ferrite and powdered iron cores reach tens of thousands, which is why they are used in high frequency coils.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.