Skip to content
Magnetism · Physics

Magnetic Field of a Straight Wire Simulation

Circular field lines round a current-carrying wire in 3D, with compass needles and a probe reading B = μ₀I/2πr. Switch to a strength map to see the field halve each time the distance doubles.

Interactive virtual lab · no download · works on phones and laptops

Chapter
Moving Charges and Magnetism
For
Class 10–12 · JEE · NEET
Time
~10 min

Magnetic Field of a Straight Wire is a Pro simulation

Pro opens all 125 virtual labs — 483 simulations with guides and quizzes.

How to use it

  1. 1Change the current (negative is downwards).
  2. 2Move the probe outwards.
  3. 3Switch between field lines and the strength map.

What to notice

  • Field lines are closed circles centred on the wire.
  • B falls as 1/r, not 1/r².
  • Reversing the current reverses every line.

For teachers

A ready-made teaching kit comes with this lab

  • Lesson plan

    18 min, 4 steps

  • Ask the class

    3 questions with answers

  • Quick quiz

    5 questions, printable

  • Key formulas

    1 formulas

About the Magnetic Field of a Straight Wire simulation

A long straight current-carrying wire is surrounded by a magnetic field whose lines are circles centred on the wire, with no beginning and no end. This simulation draws them in 3D with compass needles on a card around the wire, and a probe that reads the field at any distance from B = μ₀I/(2πr).

The strength map makes the 1/r law visible: double the distance and the field halves, a slower fall than the 1/r² of a point charge. Reverse the current and every field line and compass needle reverses — the right-hand grip rule in action.

Also covers: magnetic field due to straight wire, mu0 i / 2 pi r, concentric field lines, right hand grip rule, compass around a wire, oersted.

Frequently asked questions

What is the shape of the magnetic field lines around a straight wire?

Concentric circles in planes perpendicular to the wire, centred on it.

How does the field change with distance from the wire?

It is inversely proportional to the distance: B ∝ 1/r. At twice the distance it is half as strong.

How do I find the direction of the field?

Right-hand grip rule: point the thumb along the conventional current; the fingers curl in the direction of the field lines.