MachineCalcs

Solenoid Magnetic Field Calculator

Estimate the center magnetic field of an air-core or first-pass core solenoid from turns, current, coil length, coil diameter and relative permeability. Includes finite-length correction, ampere-turns and H-field.

Calculator

Total winding turns.

Current through the winding.

A

Wound length of the solenoid.

mm

Mean winding diameter used for the finite-length correction.

mm

Use 1 for air core. Ferromagnetic cores are nonlinear, so catalog or test data should control final design.

Results

Default result
Edit inputs
Center magnetic field(B_c)
23.34mT
Pass

Also computed

Center field(B_c)0.02334T

Long-solenoid field(B_long)25.13mT

Finite-length correction(k_L)92.85%

Magnetizing field(H)20,000A/m

Ampere-turns(NI)1,000A·turn

Turn density(n)10,000turns/m

Center field (mT) vs Coil current (A)Field is linear with current in this simplified model. Real ferromagnetic cores bend away from this line as they approach saturation.Center field (mT) vs Coil current (A)0204060012345currentCoil current (A)Center field (mT)
Field is linear with current in this simplified model. Real ferromagnetic cores bend away from this line as they approach saturation.
Method notes 3 notes
  • Long-solenoid field uses B = mu0*mu_r*N*I/L.
  • Center field multiplies the long-solenoid result by L/(2*sqrt(R^2 + (L/2)^2)) to account for finite length.
  • Ferromagnetic cores are nonlinear. Relative permeability is only a first-pass input and drops near saturation.

A long solenoid's magnetic field is B = mu0*mu_r*N*I/L, where N is turns, I is current and L is coil length. This calculator also applies a finite-length center-field correction from coil radius, so short wide coils are not treated like ideal long coils. It returns center field, ampere-turns, H-field and turn density.

Continue workflow

All Electromechanical

How to use this calculator

  1. Enter turns and current. Use the total winding turns and operating coil current in amperes.
  2. Enter coil geometry. Use wound length and mean coil diameter, not only bobbin outside diameter.
  3. Set permeability. Use mu_r = 1 for air core. For steel cores, use a conservative effective permeability.
  4. 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.

References

Embed this calculator on your site free

Paste this where you want the calculator to appear. It stays in sync — same formulas, metric & imperial, light/dark — and a small credit link helps people find more tools.

Open widget

Live preview