Magnetic Field Formula

Magnetic field is a vector field around magnets and moving charges that exerts force on other moving charges and magnetic materials.

The Formula

B=μ0I2πr (field at distance r from a long straight wire)

Ask yourself: Is the question about which way a compass would point, and how strongly, at places near a magnet or a current?

Quick example

Earth's magnetic field is about 50 μT — enough to deflect a compass needle but too weak to pick up a paper clip. A junkyard magnet creates fields of about 1 T.

Notation

B⃗ is the magnetic field in tesla (T), μ0=4π×10−7 T·m/A is the permeability of free space, I is the current in amperes, and r is the distance from the wire in metres.

What this formula means

A vector field around magnets and moving charges that exerts force on other moving charges and magnetic materials.

A magnetic field is like the wind across a field of weather vanes: at every spot it has a direction and a strength, and each vane (a compass needle) swings to point along it. The wind is strongest in some places, just as the field is strongest near the poles. Unlike wind, field lines never start or stop; they always close into loops.

Formal view

The magnetic field due to a long straight current is B=μ0I2πr (from Ampère's law). For a solenoid, B=μ0nI, where n is the number of turns per unit length. Maxwell's equation ∇⋅B⃗=0 guarantees that magnetic field lines are always closed loops (no magnetic monopoles).

Worked examples

Example 1

medium
A proton (q=1.6×10−19 C) moves at 3×106 m/s perpendicular to a magnetic field of 0.5 T. What force does it experience?
Show solution

Answer

F=2.4×10−13 N

First step

1.
Force on a moving charge in a magnetic field: F=qvBsin⁡θ.

See the full worked solution + why-it-works coaching

SetupKey insightWhy it worksCommon pitfallConnection

Free: full solutions on 3 topics a day. No card.

Every topic, every day: the Family plan

Example 2

hard
A wire carrying 5 A of current is 0.3 m long and placed perpendicular to a 0.2 T magnetic field. What force acts on the wire?

Example 3

medium
A field of B=0.4 T passes perpendicular to a 0.5 m×0.3 m rectangular loop. Find the magnetic flux through the loop.

Common mistakes

  • Thinking magnetic fields only come from permanent magnets — any moving charge or current creates a magnetic field.
  • Drawing magnetic field lines that start or end in space — unlike electric field lines, magnetic field lines always form closed loops.
  • Confusing the direction of the magnetic field with the direction of the force on a charge — the force is perpendicular to both the velocity and the field (use the right-hand rule or cross product).

Why this formula matters

The magnetic field explains how a compass finds north, why a fridge magnet holds through a sheet of paper but not through a thick book, and how a scrapyard electromagnet can drop a car at the flick of a switch. It is also the first step toward motors, generators and speakers, which all work by moving currents through magnetic fields.

Frequently asked questions

What is the Magnetic Field formula?

A vector field around magnets and moving charges that exerts force on other moving charges and magnetic materials.

How do you use the Magnetic Field formula?

Use the magnetic field when something is affected by a magnet, a compass, or a wire carrying current without being touched: a needle turning, iron filings lining up, a paper clip pulled from a distance. Signals are north and south poles, field lines, and tesla. If the push comes from a still charge, like a rubbed balloon, use Electric Field; if the question asks for the push on a moving charge or a wire in the field, use Magnetic Force.

What do the symbols mean in the Magnetic Field formula?

B⃗ is the magnetic field in tesla (T), μ0=4π×10−7 T·m/A is the permeability of free space, I is the current in amperes, and r is the distance from the wire in metres.

Why is the Magnetic Field formula important in Physics?

The magnetic field explains how a compass finds north, why a fridge magnet holds through a sheet of paper but not through a thick book, and how a scrapyard electromagnet can drop a car at the flick of a switch. It is also the first step toward motors, generators and speakers, which all work by moving currents through magnetic fields.

What do students get wrong about Magnetic Field?

Students often know a formula related to magnetic field but skip the recognition step: Is the question about which way a compass would point, and how strongly, at places near a magnet or a current? That leads to a correct-looking substitution attached to the wrong physical model.

What should I learn before the Magnetic Field formula?

Before studying the Magnetic Field formula, you should understand: electric current, electric field.