On this page
Gauss's law is one line long, yet it trips up many students. In a 2006 study in the American Journal of Physics, Chandralekha Singh gave a test on symmetry, electric field and flux to 541 students in introductory calculus-based physics courses, and also to upper-level undergraduates and graduate students in a teaching-assistant seminar. She found that undergraduates have many common difficulties with these ideas.
The fix is to predict rather than memorise: put one charge near one closed surface, move it, guess the total flux, then check. Here are the three cases that matter.
What does Gauss's law say about flux through a closed surface?
In section 1.13 of the NCERT Class 12 Physics Part I textbook, Gauss's law reads: the electric flux through a closed surface S equals q/ε₀, where q is the total charge enclosed by S.
The textbook's notes on the law add that the law holds for any closed surface, whatever its shape or size, and that only the charge inside counts, even though outside charges also shape the field on the surface. For flux through single open surfaces first, see our post on electric flux through flat and curved surfaces.
Why does the shape of the closed surface not matter?
Counting field lines. The OpenStax University Physics chapter on Gauss's law explains that a point charge's field falls as 1/r², which exactly cancels the r² growth of a sphere's area. It adds that a surface enclosing the same charge is crossed by the same number of field lines, whatever its shape or size. Squash the sphere into a cube or a potato shape and every line from the charge still crosses outward once more than it crosses inward, so the net count does not change.
Solid angle. A lecture from IIT Guwahati's PH 102 course shows the algebra. The flux through a tiny patch is (q/4πε₀)(dA cos φ / r²), and dA cos φ / r² is the solid angle dΩ the patch covers, seen from the charge. A closed surface around the charge covers all 4π of solid angle, so the flux is q/ε₀, whatever the geometry.
In the diagram at the top, the circle and the square around the left charge are each crossed once by all 16 lines. Same lines, same flux.
What happens to the flux when the charge is outside the surface?
The net flux is zero. A line from an outside charge that reaches the surface must go in and come out again: in the middle panel, three lines enter (pink) and the same three leave (gold). Inward crossings count negative and outward ones positive, so they cancel.
NCERT shows the same with a closed cylinder in a uniform field: −ES through one end, +ES through the other, nothing through the curved side.
What if the charge sits exactly on the surface?
The honest answer first: NCERT warns you not to let a Gaussian surface pass through a discrete charge, because the field there is not defined. It grows without bound as you get close.
Exam problems still ask, and they use a limiting argument. A smooth surface looks flat from very close up, so half of all directions from the charge point inside. In the right panel, 8 of the 16 lines pass through the inside and cross the surface once; the other 8 never cross it. Half the solid angle means half the flux, q/2ε₀.
The IIT Guwahati lecture works a related example: with a charge q at the origin, the flux through the upper hemisphere of radius R centred there is q/2ε₀. Close that dome with its flat base and the base adds nothing, because the field runs along it.
The same idea gives the corner of a cube. Eight identical cubes meet at a corner, so a charge there shares its flux equally among them: q/8ε₀ each.
How to practise: five predictions before you check
Write each answer down before you move the charge or look at the solution.
Charge q at the centre of a sphere. Now stretch the sphere into an egg. Does the flux change? (No, still q/ε₀.)
Move q off-centre but still inside. Does the flux through the surface change? (No. The field on the surface changes; the total does not.)
Move q just outside. Total flux? (Zero.)
Put q exactly on a flat face of a cube, away from the edges. Flux through the cube? (q/2ε₀, as a limit.)
Put a second charge −q outside. Does the answer to question 2 change? (No; only enclosed charge counts.)
If an answer surprised you, go back to that case and count the crossings again. For harder versions where you pick the surface yourself, see choosing the Gaussian surface, and for the lines themselves, reading electric field lines without common mistakes.
The Fermi Simulation Lab has interactive simulations for ideas that are easier to see than to read, so you can make a prediction and then watch what happens. If flux itself feels shaky, the Fermi Concept Library gives each concept its own lesson.



