Magnetic Fields from Currents

A moving electric charge creates a magnetic field around it, so any current-carrying wire is surrounded by circular magnetic field lines. If you bend that wire into a coil, the field lines from each loop add up inside to make one strong, uniform field running down the coil's length. Pack in more turns of wire, or push more current through it, and the field inside gets stronger.

The formula

B = μ₀ · N · I / L

  • B — magnetic field (T): the strength of the magnetic field inside the coil
  • μ₀ — permeability of free space (T·m/A): a fixed constant that sets how strongly a current produces a magnetic field
  • N — number of turns (turns): how many loops of wire make up the coil
  • I — current (A): how much charge flows through the wire each second
  • L — length (m): the length of the coil that the turns are wound over

Worked example

A coil (solenoid) has 500 turns of wire wound over a length of 0.5 meters, carrying a current of 2 amps. What is the magnetic field strength inside?

  • N = 500 turns
  • I = 2 A
  • L = 0.5 m
  1. B = μ₀ · N · I / L
  2. B = (4π × 10⁻⁷ T·m/A) · 500 · 2 A / 0.5 m

B = 8π × 10⁻⁴ T

Test yourself

The solenoid now has 1000 turns instead of 500, with the same current and length. What happens to the magnetic field inside?
  • Correct answer: It doubles to 16π × 10⁻⁴ T
  • It's cut in half to 4π × 10⁻⁴ T
  • It stays the same at 8π × 10⁻⁴ T

Right! B is proportional to N, so doubling the turns doubles the field: 4π×10⁻⁷ × 1000 × 2 A / 0.5 m = 16π × 10⁻⁴ T.

Around a single straight wire carrying current, with no coil involved, what shape do the magnetic field lines make?
  • A uniform field like inside a coil
  • Straight lines running along the wire
  • Correct answer: Circles wrapped around the wire

Exactly — a straight current-carrying wire is surrounded by circular magnetic field loops, following the right-hand rule.

Where you see this

A junkyard crane drops a coil of wire, switches on the current, and lifts a car — switch the current off and the car drops. No magnetism without current, full magnetism on demand: doorbells, MRI scanners, and scrapyard cranes are all the same device, a solenoid whose field you command with a switch.

Common mistakes

First, the field's shape: around a straight wire the field lines form circles wrapped around the wire — not straight lines, not a uniform field; the strong uniform field appears only inside a coil. Second, the scaling: B = μ₀ · N · I / L grows with turns and current, so going from 500 to 1000 turns at the same current exactly doubles the field inside. The current makes the field — an iron core only concentrates it.

How it connects

This is the electromagnetism module's pivot from electricity to magnetism: Coulomb's law and capacitance were about charges at rest, and here moving charge — current — stirs up a field around itself. The Lorentz force, next, closes the loop: those fields push back on any other moving charge that wanders through.

Try the interactive simulation

Related concepts