Gauss’s Law and Electric Flux Calculator

Gauss's Law: Electric Flux and the Three Fields It Gives You

The flux out of a closed surface depends on the charge inside it and on nothing else — not the surface’s shape, not its size, not where in it the charge sits. This returns Φ = Q/ε₀ for any closed surface you like, and then the three fields your syllabus derives from it: a charged shell, an infinite line and an infinite plane sheet.

Electric flux, and the three standard Gauss's law fields

Φ = Q/ε₀ · shell, line, sheet
In nanocoulombs, and it may be negative — type −50 and watch the field lines in the diagram turn round and point inwards. Only charge inside the surface counts. A charge sitting just outside contributes exactly nothing to the total, because every field line it sends in through one part of the surface comes back out through another, and the two cancel.
Where you want the field. For the shell this is measured from its centre, and for the line charge it is the perpendicular distance from the wire. The plane sheet ignores it completely, which is the surprise on that one.
The shell carries the charge you entered above, spread evenly over its surface. Put r inside R and the field row below goes to exactly zero — a thin charged shell has no field at all in its hollow interior, however much charge is on it, because a Gaussian surface drawn inside encloses nothing.
Charge per metre of wire, for the second of the three standard derivations. The Gaussian surface here is a cylinder round the wire; its flat ends contribute nothing because the field is parallel to them, which is the step that makes the derivation work.
Charge per square metre. The Gaussian surface is a pillbox straddling the sheet, and because it catches flux through both faces you end up with a 2 in the denominator. A conductor’s surface gives σ/ε₀ instead, with no 2, because there the field on one side is zero.
One charge inside two different closed surfaces: a sphere, dashed and round, and a cube seen edge-on. The field lines cross both, and the same number cross each, which is the whole content of Gauss's law. The number of lines drawn grows with the charge you enter and they reverse direction when you make it negative; the blob at the centre grows with the charge too.
5647.05N m²/CExample

50 nC enclosed, r = 0.30 m, shell radius 0.10 m, λ = 20 nC/m, σ = 15 nC/m²

Advertisement

One law, three standard surfaces

Φ = ∮E·dA = Qenclosed/ε0  ·  shell (r > R): E = Q/4πε0r²  ·  shell (r < R): E = 0  ·  wire: E = λ/2πε0r  ·  sheet: E = σ/2ε0
Φ
electric flux, in N m²/C — which is the same unit as the volt-metre, because a volt is a joule per coulomb. Flux is signed: outward is positive, inward negative, so a negative enclosed charge gives a negative flux and this page returns one
Q enclosed
the net charge inside the surface, and only that. Charge outside contributes zero, charge on the surface itself is a boundary case your syllabus avoids, and +3 nC with −3 nC inside gives zero flux even though the field in there is fierce
ε₀
the vacuum electric permittivity, 8.854 187 8188(14) × 10−12 F/m from CODATA 2022. It has carried an uncertainty since the 2019 revision of the SI; before that it was exactly 1/μ0c², and most school books still print 8.85 × 10−12, which is fine
the 2 in the sheet
the pillbox you draw round an infinite sheet has flux coming out of both faces, so Φ = 2EA = σA/ε0 and the E you get is halved. Just outside a charged conductor there is no 2, because the field inside the metal is zero and only one face catches anything. Getting these two mixed up is the single commonest slip on this topic
why it falls off differently
the shape of the Gaussian surface decides the power of r. A sphere’s area grows as r², so E ~ 1/r². A cylinder’s curved area grows as r, so E ~ 1/r. A pillbox’s area does not grow with distance at all, so E is constant

Worked example

50 nC enclosed, r = 0.30 m, shell radius 0.10 m, λ = 20 nC/m, σ = 15 nC/m²
CONVERT THE CHARGE FIRST. 50 nC = 5.0 × 10−8 C. Forgetting the nano is the mistake that costs the most marks on this topic, because an answer wrong by 109 still looks like a number.
DIVIDE BY ε0 AND STOP. Φ = Q/ε0 = 5.0 × 10−8 / 8.854 × 10−12 = 5647 N m²/C. There is nothing else to do. You were not told the surface's shape and you did not need it.
NOW THE SHELL. The point at r = 0.30 m is outside the 0.10 m shell, so the shell behaves exactly like a point charge at its centre: E = Q/4πε0r² = (8.988 × 109)(5.0 × 10−8)/0.09 = 4993 V/m. Move in to r = 0.05 m, inside the shell, and it drops to exactly zero — not small, zero.
THE WIRE. E = λ/2πε0r = (2.0 × 10−8)/(2π × 8.854 × 10−12 × 0.30) = 1198 V/m. One power of r, not two, because the Gaussian cylinder's curved surface grows as r and not as r².
THE SHEET. E = σ/2ε0 = (1.5 × 10−8)/(2 × 8.854 × 10−12) = 847 V/m, and the r you were given plays no part. That is not a simplification — for a truly infinite sheet the field really is the same a millimetre away and a kilometre away.
CHECK WITH THE CUBE. If that 50 nC sat at the centre of a cube, each of the six faces would take Φ/6 = 941 N m²/C by symmetry. Put it at a corner instead and only an eighth of its field enters the cube, shared over the three faces that touch the corner, giving Φ/24 = 235 N m²/C each. Both rows are below, and both are standard exam questions.
Advertisement

How each geometry falls off, at this page’s own numbers

GeometryFieldAt 0.15 mAt 0.30 mAt 0.60 m
Point charge or thin shell, 50 nCQ/4πε0r²19,972 V/m4,993 V/m1,248 V/m
Long straight wire, 20 nC/mλ/2πε0r2,397 V/m1,198 V/m599 V/m
Infinite plane sheet, 15 nC/m²σ/2ε0847 V/m847 V/m847 V/m
Inside the thin shell (r < 0.10 m)0———
Double the distance and the shell’s field falls by four, the wire’s by two and the sheet’s not at all. If you can say why — because the Gaussian surface you choose for each one grows as r², as r, and not at all — you have understood Gauss’s law rather than memorised three formulae.

Why the shape of the surface does not matter, and what that buys you

Gauss’s law says the flux out of a closed surface is the charge inside divided by ε0. Not roughly, and not for nice surfaces only. A sphere, a cube, a cylinder, a shape with no name — same charge inside, same flux. That is a strange thing to be true, and the reason it is true is that the field of a point charge falls off as exactly 1/r² while the area of a surface grows as exactly r². The two cancel, and the flux stops caring about distance.

The payoff is that you get to choose the surface. On its own, ∮E·dA = Q/ε0 is an integral you cannot do. But pick a surface on which E has the same size everywhere and points straight through it, and the integral becomes E × area, which is arithmetic. That is the whole trick of the three derivations your syllabus asks for: a sphere round a point or a shell, a cylinder round a wire, a pillbox straddling a sheet. The physics is in choosing the surface, not in the algebra that follows.

Where this goes wrong is the factor of two. An infinite sheet of charge gives σ/2ε0; the surface of a charged conductor gives σ/ε0, twice as much. Both are on this page so you can see them side by side. The difference is only that the pillbox round a sheet catches flux through two faces and the pillbox on a conductor catches it through one, because the field inside a conductor in equilibrium is zero. Examiners ask for these in the same question precisely because candidates mix them up.

And then the zero inside a shell. A thin charged shell has no field anywhere in its hollow interior. Draw a Gaussian sphere inside it: it encloses no charge, so the flux through it is zero, and by symmetry the field must be zero everywhere on it. Set r below R above and the row reads zero. That result is why a car is a reasonable place to be in a thunderstorm, and why sensitive instruments sit in earthed metal boxes. For the point-charge field this reduces to, see Coulomb’s law and the electric field; for the energy stored in the field once you have E, see field energy density.

Frequently asked questions

Does the flux change if I move the charge around inside the surface?

No. As long as the charge stays inside, the total flux is Q/ε0 wherever it sits. What changes is how the flux is distributed over the surface — more comes out of the nearby parts and less out of the far parts — but the total is fixed. That is why the cube-face rows on this page differ between a charge at the centre (Φ/6 per face) and a charge at a corner (Φ/24 per face) while the total for a full enclosing surface is the same.

What happens to the flux from a charge just outside the surface?

It contributes exactly zero, and there is a row above that says so. Every field line from an outside charge that enters the surface has to leave it again, so the inward flux and the outward flux cancel perfectly. The field at points on the surface is certainly not zero — you just cannot detect that charge from the total flux alone.

Why is the field inside a charged shell exactly zero and not just small?

Because a Gaussian sphere drawn inside the shell encloses no charge at all, so its total flux is zero; and because the arrangement is perfectly symmetric, the field has to be the same size everywhere on that sphere and radial. The only number that satisfies both conditions is zero. Set r below R above and the shell row returns 0. Note that this is for a thin shell; a solid sphere with charge spread through its volume has a field inside that grows linearly with r, which your syllabus usually leaves out.

Can the flux be negative?

Yes, and this page returns negative values. Type a negative charge and the headline goes negative and the band above it changes to say so. The sign is a direction: positive flux means net outward, negative means net inward. In the diagram the field lines physically turn round and point at the charge.

Is the infinite sheet result any use, given that no sheet is infinite?

It is the right answer close to a large sheet, which is the case that matters. “Infinite” really means “you are much nearer to it than you are to its edges”, and a centimetre from a 30 cm plate that is comfortably true. It is also what makes a parallel-plate capacitor work out so simply — see the parallel-plate capacitor page.

Related calculators

References

  1. Annual Syllabus, Class XII, Physics, Code 42, Session 2025-26, Central Board of Secondary Education, edustud.nic.in/edu/SYLLABUS_2025_26/12/12_Physics_EM.pdf (read 11 November 2026). The board’s own document, cited and not endorsed by it. Unit I Chapter 1 asks for “Electric flux, statement of Gauss’s theorem and its applications to find field due to infinitely long straight wire, uniformly charged infinite plane sheet and uniformly charged thin spherical shell (field inside and outside)”. Unit III Chapter 4 asks for “force on a moving charge in uniform magnetic and electric fields”, “torque experienced by a current loop in uniform magnetic field” and “Current loop as a magnetic dipole and its magnetic dipole moment”. Unit IV Chapter 6 is one line and covers three of this batch’s records: “Electromagnetic induction; Faraday’s laws, induced EMF and current; Lenz’s Law, Self and mutual induction”. The Hall effect is not in this document.
  2. Fundamental Physical Constants — Frequently used constants (2022 CODATA wallet card), NIST Committee on Data for Science and Technology, physics.nist.gov/cuu/pdf/wallet_2022.pdf (read 11 November 2026). Every constant on this page comes from here, and the thing worth noticing is which numbers have a bracket after them. The elementary charge is printed 1.602 176 634 × 10−19 C and the speed of light 299 792 458 m s−1, both with no bracket at all, because since 2019 they are exact by definition — the coulomb and the metre are now defined from them. But the vacuum electric permittivity is printed 8.854 187 8188(14) × 10−12 F m−1 and the vacuum magnetic permeability 1.256 637 061 27(20) × 10−6 N A−2: both now carry an uncertainty of about 1.6 parts in 1010, where before 2019 μ0 was exactly 4π × 10−7 and ε0 exactly 1/μ0c². Almost every school book still prints the old exact forms. At three significant figures nothing changes; which constants are definitions changed completely.
  3. The International System of Units (SI), 9th edition 2019, version V4.01 of June 2026, Bureau International des Poids et Mesures, bipm.org/documents/d/guest/si-brochure-9-en-pdf (read 11 November 2026). Cited for the units, from Table 4 of coherent derived units with special names: magnetic flux, weber (Wb) = kg m² s−2 A−1 = V s; magnetic flux density, tesla (T) = kg s−2 A−1 = Wb/m²; inductance, henry (H) = kg m² s−2 A−2 = Wb/A. Those three equalities are worth more than they look: a weber is a volt-second, so a flux change of one weber in one second is one volt — which is Faraday’s law written as a unit. And a henry is a weber per ampere, so an inductance is just how much flux linkage one ampere produces.
  4. University Physics Volume 2, chapters 11 and 14, OpenStax, Rice University (openstax.org/books/university-physics-volume-2, key-equations pages read 11 November 2026). An openly licensed university text, cited here because the coaching sites that dominate searches for this topic are not citable and mostly copy one another. Chapter 11 gives the radius of a charged particle’s path as r = mv/(qB), its period as T = 2πm/(qB), the Hall potential as V = IBl/(neA), the drift velocity in crossed fields as vd = E/B, the magnetic dipole moment as μ = NIA and the torque as τ = μ × B. Chapter 14 gives Lsolenoid = μ0N²A/l, NΦ = LI, ε = −L dI/dt, M = N2Φ21/I1 = N1Φ12/I2 and U = ½LI². Neither key-equations page lists a cyclotron frequency or a field energy density, so those two are stated here from the definitions and not attributed to this source.