Solenoid Magnetic Field Calculator

Calculate magnetic field B = μ₀nI inside a solenoid. Includes field intensity H, magnetic flux, inductance, stored energy, field strength scale, and parameter sensitivity table.

mm
A
mm
1 = air, 2000 = ferrite, 5000 = iron
Magnetic Field (B)
12.5664 mT
125.66 gauss
Field Intensity (H)
10,000.00 A/m
125.66 Oe (oersted)
Magnetic Flux (Φ)
3.9478 μWb
394.78 maxwell
Turns Density (n)
5,000.0 turns/m
500 turns / 100 mm
Inductance
986.9604 μH
L = μ₀μᵣN²A/l
Stored Energy
1.9739 mJ
E = ½LI²

Field Strength Scale

Earth's field50.0000 μT
Fridge magnet5.0000 mT
This solenoid12.5664 mT
Strong lab magnet1.0000 T
MRI machine3.0000 T

Parameter Sensitivity

ChangeB FieldInductanceEnergy
½× current6.2832 mT986.96 μH0.49 mJ
1× (current)12.5664 mT986.96 μH1.97 mJ
2× current25.1327 mT986.96 μH7.90 mJ
2× turns25.1327 mT3.95 mH31.58 mJ
½× length25.1327 mT1.97 mH15.79 mJ
Planning notes, formulas, and examples

About the Solenoid Magnetic Field Calculator

The magnetic field inside an ideal solenoid is remarkably uniform and depends only on the turns density and current: B = μ₀nI, where n is the number of turns per unit length and I is the current. This simple relationship makes solenoids the go-to geometry for generating controlled, uniform magnetic fields in laboratory and industrial applications.

By inserting a ferromagnetic core, the field is amplified by the relative permeability: B = μ₀μᵣnI. This is the principle behind electromagnets, relays, solenoid valves, and magnetic actuators. The field outside the solenoid is approximately zero for a long solenoid, making it an efficient geometry for containing magnetic flux.

This calculator computes the magnetic field B, field intensity H, total magnetic flux, inductance, and stored energy for a solenoid with specified geometry and current. A field strength scale provides context by comparing your solenoid to familiar magnetic fields, and a sensitivity table shows how changes to current, turns, and length affect the results.

When This Page Helps

Solenoid field calculations involve multiple physical quantities (B, H, Φ, L, E) and unit conversions between SI and CGS systems (Tesla vs Gauss, Wb vs Maxwell). This calculator handles all conversions and provides both the magnetic field data and the associated electrical parameters (inductance, stored energy) in one comprehensive view.

How to Use the Inputs

  1. Enter the total number of turns (N) in the solenoid.
  2. Enter the solenoid length in millimeters.
  3. Enter the excitation current in amperes.
  4. Enter the solenoid diameter for flux and inductance calculations.
  5. Set the relative permeability (μᵣ) for core material (1 for air).
  6. Use preset buttons for common solenoid configurations.
  7. Compare your field strength to familiar references on the field scale chart.
Formula used
Magnetic Field: B = μ₀ × μᵣ × n × I B = μ₀ × μᵣ × (N/l) × I Field Intensity: H = n × I = N × I / l Magnetic Flux: Φ = B × A = B × π(d/2)² Inductance: L = μ₀ × μᵣ × N² × A / l Stored Energy: E = ½ × L × I² Where: μ₀ = 4π×10⁻⁷ H/m n = N/l (turns per meter)

Example Calculation

Result: B = 12.57 mT

With N = 500 turns over l = 100 mm = 0.1 m, n = 5000 turns/m. At I = 2 A, B = 4π×10⁻⁷ × 1 × 5000 × 2 = 0.01257 T = 12.57 mT (about 126 gauss). This is roughly 250 times stronger than Earth's magnetic field.

Tips & Best Practices

  • The field is uniform only inside the solenoid and away from the ends. At the ends, the field is approximately B/2.
  • For the strongest field, maximize NI/l — more current and more turns per unit length.
  • Ferromagnetic cores amplify the field but saturate above a certain B level (typically 0.3-1.5 T for ferrite, 1.5-2 T for iron).
  • Superconducting solenoids can carry enormous currents without resistive losses, achieving fields of 10+ Tesla.
  • The force on a ferromagnetic object near a solenoid is proportional to B²/2μ₀ times the area — this is the pull force of an electromagnet.
  • For pulsed applications, the solenoid's inductance limits how quickly the current (and field) can change: di/dt = V/L.

Ampere's Law and the Solenoid

Ampere's law states that the line integral of B around a closed path equals μ₀ times the enclosed current. For an ideal solenoid, applying this law to a rectangular path that runs along the solenoid axis inside and returns outside (where B ≈ 0) gives B × l = μ₀NI, yielding the familiar B = μ₀nI. This elegant derivation shows why the field depends only on turns density and current.

Practical Solenoid Design Considerations

Real solenoid design must account for wire resistance (which generates heat), available power supply voltage and current, thermal management (air cooling, water cooling, or cryogenic cooling), and mechanical stress on the windings. At high fields, the outward electromagnetic force on the conductors can be enormous — high-field magnets use reinforced structures of steel and composites.

Applications Beyond Uniform Fields

While solenoids are prized for uniform fields, the field gradient near the solenoid ends is also useful. Magnetic particle separators, magnetophoresis devices, and magnetic levitation experiments exploit the strong field gradient region. Gradient coils in MRI machines are specialized solenoids designed to create precisely controlled non-uniform fields for spatial encoding of the MR signal.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • B (magnetic flux density, in tesla) is the total field including the core contribution. H (magnetic field intensity, in A/m) is the external driving field from the current. In free space, B = μ₀H. With a core, B = μ₀μᵣH. H depends only on current geometry; B depends on the medium.