On this page
When you study electrostatics, Gauss's law is one of the most powerful tools in your toolkit. It tells you that the electric flux through a closed surface is directly proportional to the charge trapped inside. But when you move to magnetism, the rule changes.
According to the OpenStax *University Physics* textbook/Book%3A_University_Physics_II_-_Thermodynamics_Electricity_and_Magnetism_(OpenStax)/16%3A_Electromagnetic_Waves/16.02%3A_Maxwells_Equations_and_Electromagnetic_Waves), Gauss's law for magnetism states that the net magnetic flux through any closed surface is always exactly zero. This simple statement is the second of Maxwell's equations, and it holds the key to how magnetic fields behave in our universe.
What does Gauss's law for magnetism state?
Gauss's law for magnetism can be written mathematically as a surface integral over a closed area:
∮ B · dA = 0
In this equation, B is the magnetic field vector, and dA is a tiny piece of the closed surface area pointing outwards. The integral sign with a circle (∮) means we are adding up the flux over a complete, unbroken surface (like a sphere or a box).
The result is always zero. This means the number of magnetic field lines pointing out of the surface perfectly cancels the number of field lines pointing into the surface.
If you are setting up flux integrals for your physics assignments and struggling to keep track of the signs, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer.
Why is the net magnetic flux always zero?
The fact that the net flux is zero is a direct consequence of how magnetic fields are built. Magnetic field lines form continuous, unbroken loops. They do not have a start or an end point.
Imagine drawing an imaginary "Gaussian bubble" around the North pole of a bar magnet. You will see magnetic field lines leaving the North pole and bursting outward through your bubble. If you only look at the space outside the magnet, it seems like there is a positive outward flux.
However, those same field lines travel through the space around the magnet, enter the South pole, and travel *back through the body of the magnet* to return to the North pole. As they travel through the magnet's interior, they cross your imaginary bubble again—this time pointing inward. The outward lines and inward lines perfectly balance out, making the net flux zero.
What if you draw a much larger closed surface that swallows the entire bar magnet? The principle remains exactly the same, but the visual is even simpler. Every single magnetic field line that leaves the North pole will eventually curve around and re-enter the surface to reach the South pole. If 1,000 field lines exit the surface on the top half, exactly 1,000 field lines must re-enter the surface on the bottom half. Because every outward-pointing vector is matched by an inward-pointing vector, the net sum of ∮ B · dA across the entire bubble is exactly zero.
How does Gauss's law for magnetism compare to electrostatics?
Comparing the two laws helps clarify why magnetism is different.
For electricity, Gauss's law is ∮ E · dA = Q/ε₀. Electric field lines begin at positive charges and terminate at negative charges. If you draw a box around a single positive charge (an electric monopole), the field lines only go out. The net flux is positive. You can read more about how this works for complex shapes in our post on Gauss's law for a sphere with non-uniform charge density.
For magnetism, the equation is ∮ B · dA = 0. Because there is no such thing as an isolated "magnetic charge" (Q = 0), the right side of the equation vanishes. When you are connecting the dots between electric and magnetic fields, the Fermi Concept Library puts every concept in physics, chemistry, biology, mathematics and computing, each with its own lesson and its place in the map, so you can see how Maxwell's equations fit together.
Does a magnetic monopole exist?
Gauss's law for magnetism is mathematically equivalent to saying that magnetic monopoles do not exist.
If you break a bar magnet in half, you do not isolate the North pole from the South pole. Instead, you instantly create two smaller magnets, each with its own North and South pole. No matter how many times you divide it, down to the level of individual electrons spinning, the dipole nature remains.
If physicists were to discover a true magnetic monopole in the future, Maxwell's equations would need to be rewritten to include a "magnetic charge" term. Until then, the net flux remains strictly zero. For an example of how changing magnetic fields create other effects, check out Faraday's law and the circulating E inside a solenoid.
How do you solve exam questions on magnetic flux?
While Gauss's law guarantees zero flux for a closed 3D shape, many physics problems ask about open surfaces. When you see a question about Gauss's law for magnetism in JEE, NEET or a board exam, run through this checklist:
Is the surface closed? If the surface is a complete 3D enclosure (a sphere, a cube, a closed cylinder), the net magnetic flux is always zero.
Is it an open surface? An open surface is like a sheet of paper or a wire ring—it has a boundary edge, but it does not trap a volume of space inside. If the question asks for the flux through a flat, open loop, the flux is calculated by taking the dot product of the magnetic field B and the area vector A. If the field is uniform and perpendicular to the loop, the flux is simply the product of the field strength and the area.
Are they asking for field lines? Remember that magnetic field lines are closed loops, while electric field lines are open (starting and ending on charges).
If the magnetic field passing through an open loop changes over time, it will induce an electromotive force (EMF) around the boundary of the loop. Understanding the difference between closed surfaces (always zero flux) and open surfaces (capable of non-zero, changing flux) is a common testing point in university physics.



