OhMyCalc

Magnetic Field Calculator (Wire & Solenoid)

Compute the magnetic flux density around a long straight wire and inside an ideal solenoid from current, distance, turns and length.

How to Use the Magnetic Field Calculator (Wire & Solenoid)

  1. Enter current in amperes.
  2. Enter distance from the wire in centimetres (for wire field).
  3. Enter number of turns and solenoid length (for solenoid).
  4. Click Calculate.

Casi d'Uso

Formula

Wire: B = μ₀·I / (2π·r). Solenoid: B = μ₀·n·I = μ₀·(N/L)·I. μ₀ = 4π × 10⁻⁷ T·m/A.

Domande Frequenti

Is the wire formula exact?
It assumes an infinitely long, thin, straight wire in vacuum. Close to finite wires it overestimates; through ferromagnetic cores it underestimates.
When does the solenoid formula hold?
It is the ideal-solenoid limit: long compared to its diameter, tightly wound, infinite coil. Real coils show end-field drop-off.