PhysSandbox
Classical MechanicsWaves & SoundElectricity & MagnetismOptics & LightGravity & OrbitsLabs
🌙Astronomy & The Sky🌡️Thermodynamics🌍Biophysics, Fluids & Geoscience📐Math Visualization🔧Engineering🧪Chemistry

Related simulators

Continue with similar topics in this category — or all 65 in Electricity & Magnetism.

View category →
NewSchool

Biot–Savart Law

Launch Simulator

Infinite wire B ∝ 1/r; ring via segment sum; heatmap + probe.

NewKids

Bar Magnet & Iron Filings

Launch Simulator

Drag-and-drop bar magnet on a card of iron-filing rods; each filing aligns with the local two-pole B field.

NewSchool

Electric Dipole Field (2D)

Launch Simulator

±q on axis: V heatmap, equipotentials, E field lines; formulas.

School

Electromagnetic Induction

Launch Simulator

Move magnet through coil. Faraday's law visualized.

NewSchool

Electric Potential

Launch Simulator

2D heatmap V = Σ kq/r. Drag charges, see equipotential colors.

NewSchool

Eddy Current Tube

Launch Simulator

Magnet fall: dv/dt = g in air vs g − k v in copper pipe (toy drag model).

PhysSandbox

Interactive physics, chemistry, and engineering simulators for students, teachers, and curious minds.

Physics

  • Classical Mechanics
  • Waves & Sound
  • Electricity & Magnetism

Science

  • Optics & Light
  • Gravity & Orbits
  • Astronomy & The Sky

More

  • Thermodynamics
  • Biophysics, Fluids & Geoscience
  • Math Visualization
  • Engineering
  • Chemistry

© 2026 PhysSandbox. Free interactive science simulators.

PrivacyTermsContact
Home/Electricity & Magnetism/Magnetic Field

Magnetic Field

Bar magnets and current-carrying wires with field line visualization.

Place on canvas

1
12
Rotate all magnets

Shortcuts

  • •Click — place magnet or wire (see mode)
  • •Drag objects to move them

Measured values

|B| at center29.2147(rel.)
Magnets1
Wires1

About this model

This simulator visualizes magnetic fields from two classroom sources: bar magnets and straight current-carrying wires. Wires make circular fields given by the right-hand rule, while magnets are drawn as point dipoles with streamlines suggesting N↔S paths outside the magnet. Add and move sources to see superposition and how current, distance, and orientation shape B.

Who it's for: High school and introductory undergraduate physics students studying electromagnetism, particularly those learning about magnetic fields, the right-hand rule, and field superposition.

Key terms

  • Magnetic Field
  • Biot-Savart Law
  • Ampere's Law
  • Right-Hand Rule
  • Field Lines
  • Magnetic Dipole
  • Permeability of Free Space (μ₀)
  • Superposition Principle

How it works

Magnetic dipoles are modeled as point dipoles (field ∝ 1/r³). Long straight wires produce the familiar 1/r circular field in the plane (right-hand rule). Pink arrows show local B direction with length/opacity indicating relative |B|; gold curves are field-line streamlines traced from both the north and south sides of each magnet (suggesting N↔S paths). External field only — no interior magnet model.

Key equations

Dipole (sketch): B ∝ 3(m·r̂)r̂ − m over |r|³
Long wire: |B| ∝ |I|/r, tangent to circles (right-hand rule)

Frequently asked questions

Why are the field lines around a wire circles, but they curve between the poles of a magnet?
The geometry of the source dictates the field shape. A long, straight wire has a symmetrical cylindrical geometry, so the field lines form concentric circles around it. A bar magnet is a dipole, with a north and south pole; outside the magnet, field lines leave the north pole and enter the south pole, creating the characteristic curved arcs. Both patterns are solutions to the fundamental magnetic field equations for their respective source geometries.
Can magnetic field lines ever cross?
No. At any point in space, the magnetic field has a single, unique direction and strength. If field lines crossed, it would imply two different field directions at the same point, which is physically impossible. When you place multiple sources, the pink arrows and gold streamlines follow the vector sum of the individual fields, so the net pattern stays non-crossing.
How is the strength of the field represented in the visualization?
Relative |B| is shown mainly by the pink arrow grid: longer and more opaque arrows mean a stronger field. Gold curves are a fixed set of streamlines seeded near each magnet’s poles to suggest N↔S paths — their spacing is not a quantitative |B| map. Near wires and poles the arrows grow quickly because the model fields diverge as 1/r or 1/r³.
Does the simulator show the magnetic field inside the magnet?
No. Magnets are treated as point dipoles for the exterior field only. A real bar magnet has an interior field from south to north that closes the loop; that interior region is omitted here for clarity, so gold lines stop near the dipole rather than continuing through the magnet.