How to use this calculator
- Enter turns and current. Use the total winding turns and operating coil current in amperes.
- Enter coil geometry. Use wound length and mean coil diameter, not only bobbin outside diameter.
- Set permeability. Use mu_r = 1 for air core. For steel cores, use a conservative effective permeability.
- Read center field. Use the finite-length center field for the coil center and the long-solenoid field only as the ideal comparison.
How it works
A solenoid's ideal long-coil magnetic field is proportional to ampere-turns per metre:
B_long = mu0 · mu_r · N · I / L
where N is turns, I is current, L is coil
length and mu_r is relative permeability. The magnetizing field is:
H = N · I / L
Real coils are finite. At the center of a uniformly wound finite solenoid, this page multiplies the ideal long-solenoid value by:
k_L = L / (2 · sqrt(R² + (L/2)²))
A long, narrow coil has k_L close to 1. A short, wide coil has a
lower center field. Use the solenoid force calculator
if you need pull force from this field, pole area and air gap.
Worked example
Verified against the live calculator
A coil has 500 turns, 2 A current, a
50 mm wound length and a 20 mm mean diameter. For an
air core, mu_r = 1.
Ampere-turns are 500 x 2 = 1000 A·turn, and turn density is
500 / 0.05 = 10000 turns/m. The ideal long-solenoid field is
4*pi*10^-7 x 10000 x 2 = 0.02513 T, or about
25.13 mT.
The finite correction for R = 10 mm and L = 50 mm is
about 92.85%, so the center field is about
23.34 mT.
Frequently asked questions
How do you calculate the magnetic field inside a solenoid?
For a long solenoid, use B = mu0 * mu_r * N * I / L, where N is turns, I is current, L is coil length and mu_r is relative permeability. This calculator also applies a center-field correction for finite coil length.
What does the finite-length correction do?
A short, wide coil has a weaker center field than the ideal long-solenoid equation predicts. The correction used here is L / (2 * sqrt(R^2 + (L/2)^2)), where R is coil radius.
Should I use a high relative permeability for an iron core?
Only for a first pass. Steel and iron permeability changes with flux density and drops near saturation. For final core design, use the material B-H curve, measurement or finite-element analysis.
Does this calculate force?
No. It estimates flux density and magnetizing field. Use the solenoid force calculator when you need first-pass pull force from pole area and air gap.
Method & assumptions
- The winding is treated as uniformly distributed over the entered coil length.
- The finite-length correction estimates the field at the coil center on the coil axis.
- Relative permeability is treated as constant. Ferromagnetic cores are nonlinear and can saturate.
- This does not calculate off-axis fields, heating, inductance, wire resistance or AC effects.