The invisible influence of magnets and currents

Magnetic Field

A magnetic field is the region around a magnet, a current-carrying wire or any moving electric charge in which other magnets and moving charges feel a magnetic force. It has both a strength and a direction at every point, so it is a vector field. Its SI unit is the tesla (T), and it is usually drawn as closed loops called field lines.

Iron filings forming curved arcs around a bar magnet under glass, revealing the shape of its magnetic field
Iron filings line up along the field, making the invisible pattern around a magnet visible.

At a Glance

A magnetic field is the vector field around magnets and electric currents that pushes on moving charges and on other magnets. It is measured in teslas, and near a long straight wire its strength is B = μ0 I / (2πr), so it grows with current and fades with distance from the wire.

Symbol
B (magnetic flux density)
SI unit
tesla (T), equal to 1 N/(A·m) or 1 kg/(A·s²)
Straight-wire formula
B = μ0I / (2πr)
Scalar or vector
Vector, with a direction at every point
Created by
Moving charges, electric currents and electron spin in magnets
Earth's field at the surface
About 25 to 65 μT, depending on location
On this page
  1. What Is a Magnetic Field?
  2. Magnetic Fields Explained Simply
  3. What Do Magnetic Field Lines Show?
  4. What Is the Unit of Magnetic Field?
  5. How Does Electric Current Create a Magnetic Field?
  6. What Is the Formula for a Magnetic Field?
  7. How Strong Are Magnetic Fields Around Us?
  8. How Does a Magnetic Field Affect Moving Charges?
  9. Where Do You Find Magnetic Fields in Everyday Life?
  10. How Is a Magnetic Field Different From an Electric Field?
  11. Practice Magnetic Field Problems
  12. Common Misconceptions
  13. Key Facts
  14. Quiz
  15. FAQ

What Is a Magnetic Field?

A magnetic field is the influence that a magnet or an electric current spreads into the space around it. You cannot see it or feel it directly, yet it decides which way a compass needle points, why a fridge magnet clings to the door and how an electric motor turns. Wherever the field exists, a moving charge or a second magnet placed there experiences a push or a twist.

Physicists describe the field with the letter B. At every point it has a size, called the field strength or magnetic flux density, and a direction. That direction is defined as the way the north end of a small compass needle would point if you placed it there.

The field is not made of anything you could collect in a jar. It is a property of space near magnets and currents, in the same way that the electric field is a property of space near electric charges. Both store energy, both carry influence at the speed of light, and both are two faces of a single electromagnetic field.

Magnetic Fields Explained Simply

Imagine every magnet is surrounded by an invisible bubble of influence. Close to the magnet the bubble is strong; far away it fades to almost nothing. Anything magnetic that wanders into the bubble gets tugged or turned.

Now picture tiny arrows filling that bubble, each one showing which way a compass would point at that spot. Join the arrows into smooth curves and you get field lines. They loop out of the north pole, curve around and come back into the south pole, never starting or ending in empty space.

Here is the surprising part: magnets are not the only source. Any wire carrying electric current builds the same kind of bubble around itself. In fact, at the deepest level, every magnetic field comes from electric charges in motion.

What Do Magnetic Field Lines Show?

Field lines are a drawing tool that shows two things at once. The direction of a line at any point is the direction of the field there, and the spacing between neighboring lines shows the strength. Where lines crowd together, near the poles of a bar magnet, the field is strong. Where they spread apart, the field is weak.

Magnetic field lines follow a few firm rules:

  • Outside a magnet they run from the north pole to the south pole.
  • Inside the magnet they continue from south back to north, so every line forms a closed loop.
  • Two lines never cross, because the field can only point one way at each spot.
  • They never begin or end on a single isolated pole, since no one has ever found a lone north or south pole.

You can see the pattern for yourself by sprinkling iron filings around a magnet, as in our magnetic field mapping experiment. For more about drawing and reading them, see magnetic field lines.

Magnetic field lines of a bar magnet looping from the north pole around to the south pole, crowded near the poles
Field lines leave the north pole, curve around and enter the south pole, packed most tightly where the field is strongest.

What Is the Unit of Magnetic Field?

The SI unit of magnetic field strength is the tesla, symbol T. One tesla is the field that pushes with one newton of force on a wire one meter long carrying one ampere at right angles to the field. Written in base units, that is one kilogram per ampere per second squared.

A full tesla is a strong field. Everyday fields are usually quoted in millitesla (mT, a thousandth of a tesla) or microtesla (μT, a millionth). You will also meet the older unit, the gauss (G), where 1 G equals 10-4 T. Earth's field of about 0.5 G is the same as about 50 μT.

Be careful with one naming detail. Some books use the symbol H for a related quantity called the magnetic field intensity, measured in amperes per meter. In most school and college physics, "magnetic field" means B in teslas, and that is how we use it here.

How Does Electric Current Create a Magnetic Field?

In 1820 the Danish scientist Hans Christian Ørsted noticed that a compass needle swung whenever a nearby wire carried current. It was the first proof that electricity and magnetism are linked, and you can read the story on our Ørsted biography or repeat it with the Ørsted compass experiment.

Around a long straight wire the field lines are circles centered on the wire. Their direction follows the right-hand rule: point your right thumb along the current and your curled fingers show the way the field circles. Reverse the current and the field reverses too.

Bend the wire into a loop and the circles from every part of the loop add up in the middle, making a stronger field that points straight through it. Wind many loops into a coil, called a solenoid, and the inside field becomes strong and nearly uniform, looking just like the field of a bar magnet from outside.

Example 2 How much current moves the compass?

A hobbyist places a compass 6.0 cm (0.060 m) from a long straight wire and finds the needle is pushed noticeably once the wire's field reaches 50 μT (5.0 × 10⁻⁵ T). What current in the wire produces that field at the compass?

  1. Given:
    • magnetic field magnitude: B=5×10−5 T
    • perpendicular distance from the wire: r=0.06 m
    • permeability of free space: μ0=1.257×10−6 T·m/A
  2. Formula: I=2πrBμ0
  3. Substitute: B=5×10−5 T,r=0.06 m,μ0=1.257×10−6 T·m/A
  4. Answer: I=15 A

A current of this size is common in car electrical systems and kitchen appliances, so it is easy to repeat Ørsted's discovery at home.

Cross-section of a wire with current out of the page and circular magnetic field lines spaced wider with distance
Around a straight wire the field forms circles that weaken with distance, following B = μ0I/(2πr).

What Is the Formula for a Magnetic Field?

There is no single formula for every magnetic field, because the field depends on the shape of whatever creates it. The cleanest case is a long straight wire, where the field strength is B=μ0I2πr. Here I is the current in amperes, r is the perpendicular distance from the wire in meters, and μ0 is the permeability of free space, about 1.2566×10−6 T·m/A.

The formula says two simple things. Double the current and the field doubles. Double your distance from the wire and the field halves. That one-over-distance falloff is gentler than the one-over-distance-squared falloff of gravity or of the field around a point charge.

Other shapes have their own results: a coil of N turns gives B=μ0NI/(2R) at its center, and a long solenoid gives B=μ0nI inside. All of them come from the Biot-Savart law and Ampère's law. For the straight-wire result in more depth, see the magnetic field of a straight wire, and for quick answers in other units use our magnetic field calculator.

The simplest field you can calculate exactly is the one around a long straight wire. Here is the formula with each symbol and its SI unit, plus the forms solved for current and distance.

B=μ0I2πr
What each symbol means
SymbolQuantitySI unit
Bmagnetic field magnitudetesla (T)
μ0permeability of free space (4π × 10⁻⁷ T·m/A (approximately; 1.2566 × 10⁻⁶ T·m/A))tesla meter per ampere (T·m/A)
Icurrentampere (A)
rperpendicular distance from the wiremeter (m)

Rearranged to find another variable:

I=2πrBμ0r=μ0I2πB

Valid for: long straight wire; field lines are circles (right-hand rule).

Example 1 Field next to a jumper cable

While a car is being jump-started, one jumper cable carries a current of 150 A. Treating the cable as a long straight wire, what is the magnetic field strength 3.0 cm (0.030 m) from its center? Use μ0 = 1.25663706127 × 10⁻⁶ T·m/A.

  1. Given:
    • permeability of free space: μ0=1.257×10−6 T·m/A
    • current: I=150 A
    • perpendicular distance from the wire: r=0.03 m
  2. Formula: B=μ0I2πr
  3. Substitute: μ0=1.257×10−6 T·m/A,I=150 A,r=0.03 m
  4. Answer: B=1×10−3 T

That is roughly twenty times Earth's field, which is why a compass held near a jumper cable swings hard while the engine cranks.

How Strong Are Magnetic Fields Around Us?

Magnetic fields span an enormous range. The field from the electrical activity of a human brain is around a femtotesla to a picotesla, so faint that special sensors in shielded rooms are needed to detect it. At the other extreme, some collapsed stars called magnetars hold fields of around ten billion teslas.

In daily life you live inside Earth's magnetic field, which is weak but steady and covers the whole planet. A fridge magnet is about a hundred times stronger at its surface, and a small neodymium magnet can reach close to one tesla right at its face. Hospital MRI scanners use superconducting coils to hold a few teslas across a whole human body.

The tables below list typical values and show how quickly the field of a wire drops as you move away from it.

Example 3 Distance from a power line

A long overhead power line carries a steady 400 A. At what distance from the line does its magnetic field drop to 10 μT (1.0 × 10⁻⁵ T)?

  1. Given:
    • current: I=400 A
    • magnetic field magnitude: B=1×10−5 T
    • permeability of free space: μ0=1.257×10−6 T·m/A
  2. Formula: r=μ0I2πB
  3. Substitute: I=400 A,B=1×10−5 T,μ0=1.257×10−6 T·m/A
  4. Answer: r=8 m

Real lines carry alternating current and several conductors whose fields partly cancel, so measured values near the ground are usually lower still.

Typical magnetic field strengths, from faint to extreme
SourceTypical fieldIn teslas
Human brain activity, measured at the scalpAbout 1 pT or lessAbout 10⁻¹² T
Earth's field at the surfaceAbout 25 to 65 μTAbout 5 × 10⁻⁵ T
Long wire with 10 A, 4 cm awayAbout 50 μT5 × 10⁻⁵ T (computed)
Fridge magnet, at its surfaceAbout 5 mTAbout 5 × 10⁻³ T
SunspotAbout 0.1 to 0.4 TAbout 0.3 T
Small neodymium magnet, at its faceAbout 0.5 to 1 TAbout 1 T
Hospital MRI scanner1.5 to 3 TAbout 3 T
Magnetar (neutron star)About 10 GTAbout 10¹⁰ T
Source: Typical published values, rounded; wire row computed with B = μ0I/(2πr), μ0 from NIST CODATA 2022 · Retrieved October 2026
Magnetic field around a long straight wire carrying 10 A
Distance from wireField strength (μT)Compared with 1 cm
0.5 cm4002×
1 cm2001×
2 cm100½
5 cm40⅕
10 cm201/10
50 cm41/50
1 m21/100
Source: Computed with B = μ0I/(2πr), μ0 = 1.25663706127 × 10⁻⁶ T·m/A (NIST CODATA 2022) · Retrieved October 2026
Unbranded hospital MRI scanner with its patient table, a machine that holds a magnetic field of a few teslas
An MRI scanner keeps a steady field of a few teslas, tens of thousands of times stronger than Earth's.

How Does a Magnetic Field Affect Moving Charges?

A magnetic field does nothing to a charge sitting still. Once the charge moves, it feels a force whose size is F=|q|vBsin⁡θ, where θ is the angle between the velocity and the field. The force is greatest when the charge crosses the field at a right angle and zero when it travels along a field line.

The direction of that force is always at right angles to both the velocity and the field. Because it is sideways, it changes a particle's direction without changing its speed, which is why charged particles in a uniform field travel in circles or spirals. Our page on the magnetic force on a moving charge walks through the formula with worked examples.

A current is just a stream of moving charges, so a wire carrying current inside a magnetic field also feels a force. That sideways push on wires is the working principle of every electric motor and loudspeaker.

Where Do You Find Magnetic Fields in Everyday Life?

Magnetic fields are working quietly all around you:

  • Compasses line up with Earth's field to show north, the oldest technology built on magnetism.
  • Electric motors in fans, drills, washing machines and cars turn because current-carrying coils sit in a magnetic field.
  • Generators do the reverse, moving coils through a field to produce electric current.
  • Speakers and headphones push a light cone back and forth using a coil in the field of a permanent magnet.
  • Credit card readers, hard drives and transit cards store or read information with tiny magnetized regions or changing fields.
  • Auroras glow where Earth's field funnels charged particles from the Sun into the upper atmosphere.

Even the electricity in your walls exists thanks to magnetic fields, since almost all power plants generate it by spinning magnets and coils past each other.

How Is a Magnetic Field Different From an Electric Field?

An electric field acts on every charge, moving or not, and pushes it along the field direction. A magnetic field acts only on moving charges and pushes them sideways, at right angles to both their motion and the field. Electric field lines start on positive charges and end on negative ones, while magnetic field lines always close on themselves.

The two are deeply connected. A changing magnetic field creates an electric field, which is how transformers and generators work, and a changing electric field creates a magnetic field. Together they form light and every other electromagnetic wave. For a full side-by-side table, read electric field vs magnetic field.

Practice Magnetic Field Problems

Working through problems is the quickest way to make the formulas feel natural. Our magnetism worksheets include printable sets on fields, forces and the right-hand rule, each with an answer key. The magnetism formula sheet collects every equation in one place, and the magnetic field calculator checks your answers step by step. When you are ready, try the quiz below.

Common Misconceptions

Myth: Magnetic fields only exist around magnets.

Physics: Any electric current or moving charge creates a magnetic field. Permanent magnets are just a special case where the moving charges are electrons inside atoms.

Myth: Field lines are real strings or streams of something flowing out of the magnet.

Physics: Field lines are a drawing convention. They show direction and strength, but nothing physically travels along them.

Myth: A magnetic field can speed up or slow down a charged particle.

Physics: The magnetic force is always at right angles to the motion, so it bends the path but does no work and leaves the speed unchanged.

Myth: The north pole of a compass points to Earth's magnetic north pole.

Physics: Opposite poles attract, so the region near the geographic North Pole is actually a magnetic south pole, which pulls the compass needle's north end toward it.

Key Facts

  • A magnetic field is the region around a magnet or current where moving charges and other magnets feel a force.
  • The SI unit of magnetic field strength is the tesla; one gauss equals one ten-thousandth of a tesla.
  • Magnetic field lines run from north to south outside a magnet and always form closed loops.
  • Every magnetic field is produced by moving electric charges, including the spinning electrons inside magnets.
  • Near a long straight wire, B = μ0I/(2πr), so the field doubles with double the current and halves at double the distance.
  • A magnetic field pushes a moving charge sideways and never changes its speed, only its direction.
  • Earth's field at the surface is roughly 50 μT, strong enough to steer a compass but far weaker than a fridge magnet.
Did you know? The direction of Earth's magnetic field has flipped many hundreds of times over the planet's history, and the record of those flips is frozen into the ocean floor as stripes of rock magnetized in opposite directions.

Quick Quiz: How Well Do You Know Magnetic Field?

6 questions. Tap an answer to check it.

  1. What is the SI unit of magnetic field strength?

  2. Outside a bar magnet, which way do the field lines run?

  3. You double your distance from a long straight wire carrying a steady current. What happens to the field?

  4. A proton sits at rest inside a strong magnetic field. What force does the field exert on it?

  5. Who first showed that an electric current produces a magnetic field?

  6. Why can magnetic field lines never cross?

Frequently Asked Questions

What is a magnetic field in simple terms?

A magnetic field is an invisible zone of influence around a magnet or a wire carrying current. Inside that zone, other magnets get pulled, pushed or turned, and moving charged particles get nudged sideways. The field is strongest close to its source and fades with distance. We usually picture it with field lines that loop from the north pole around to the south pole.

What is the SI unit of magnetic field?

The SI unit is the tesla, written T. One tesla equals one newton per ampere per meter. Because a tesla is large, everyday fields are often given in millitesla or microtesla. The older unit gauss is still common in geology and in magnet catalogs, with ten thousand gauss making one tesla. Earth's field is about half a gauss.

What creates a magnetic field?

Moving electric charge creates every magnetic field. A current in a wire produces circular field lines around it. In a permanent magnet, the electrons in iron atoms each act like tiny spinning, orbiting charges, and when billions of them line up their small fields add into one large field. Earth's field comes from currents of molten iron flowing in its outer core.

Is a magnetic field a vector or a scalar?

A magnetic field is a vector. At every point in space it has both a strength and a direction. The direction is the way the north end of a small compass would point at that spot. That is why diagrams use arrows or field lines rather than just numbers, and why fields from two sources must be added as vectors, not simply summed.

Can magnetic field lines cross each other?

No. If two lines crossed, the field would have two different directions at the same point, which is impossible. When two magnets sit near each other, their fields add together into one combined field, and the lines of that combined field never intersect. You may see lines bunch up, spread apart or bend sharply, but they never cross.

How do you measure a magnetic field?

The most common tool is a Hall-effect sensor, a small chip whose output voltage rises in proportion to the field passing through it. Many phones contain one to run their compass app. For very weak fields, scientists use fluxgate magnetometers or superconducting sensors called SQUIDs. A simple compass also reveals the direction of a field, though not its strength.

Does a magnetic field go through objects?

Yes. Most materials, including wood, plastic, glass, water and your body, let a magnetic field pass almost unchanged. That is why a magnet can hold a note through paper or move a paperclip through a tabletop. Materials rich in iron, nickel or cobalt are different: they gather the field lines into themselves, which is how magnetic shielding works.

Why does a magnetic field get weaker with distance?

The field spreads out as it moves away from its source, so the same field lines are shared over a larger region. Around a long straight wire the field drops as one over the distance. Around a small bar magnet it falls much faster, roughly as one over the distance cubed, which is why a magnet seems to grab suddenly only when it gets close.

Is Earth's magnetic field strong?

Not compared with everyday magnets. At the surface it is about 25 to 65 microtesla, roughly a hundred times weaker than a fridge magnet held against it. Its strength lies in its reach: it surrounds the whole planet, steers compasses and migrating animals, and extends far into space, where it deflects much of the charged particle stream flowing from the Sun.

Sources

Constants come from NIST CODATA 2022 (public domain) and unit definitions from the BIPM SI Brochure (CC BY 4.0). Text, diagrams and illustrations are original work by Physics Tribune.

Physics Tribune Editorial Team
Written by our editors and checked against NIST and BIPM reference data. Every worked example is recomputed in code. Read our editorial policy. Last updated October 2026.