Gauss's Law Calculator

Calculate electric field and flux for spherical, cylindrical, and planar symmetries using Gauss's Law. Perfect for physics students and educators.

Gauss's Law: Φ = ∮ E · dA = Qenc / ε0

For symmetric charge distributions, the electric field is constant over the Gaussian surface.

Select the symmetry of the charge distribution.
Sphere: Q=1nC, r=0.1m Cylinder: λ=1nC/m, r=0.05m Plane: σ=1nC/m²
Enter charge in Coulombs.
Distance from center to point of interest.
Radius of the charged sphere (for inside/outside distinction). Leave 0 for point charge.
ε₀
Default is vacuum permittivity 8.85×10⁻¹² F/m.
Range of distances to display on E vs r graph.
Calculating...

Understanding Gauss's Law

Gauss's Law is a fundamental principle in electromagnetism that relates the electric field on a closed surface to the net charge enclosed by that surface. It is one of Maxwell's four equations and provides a powerful method for calculating electric fields when the charge distribution possesses high symmetry.

What is Electric Flux?

Electric flux (Φ) measures the flow of the electric field through a given area. For a flat surface of area A and a uniform electric field E making an angle θ with the normal to the surface, the flux is:

Φ = E · A = E A cosθ

More generally, for a curved surface and non‑uniform field, the flux is the surface integral:

Φ = ∮S E · dA

where dA is a vector perpendicular to the surface element with magnitude equal to its area.

Mathematical Formulation

Integral form:

S E · dA = Qenc / ε0

where the circle on the integral sign indicates integration over a closed surface (Gaussian surface).

Differential form (using the divergence theorem):

∇ · E = ρ / ε0

where ρ is the volume charge density. This form relates the divergence of the electric field at a point to the local charge density.

How to Choose a Gaussian Surface

The power of Gauss's Law lies in choosing a surface that matches the symmetry of the charge distribution. The surface should be such that:

  • The electric field magnitude is constant over portions of the surface.
  • The electric field direction is either perpendicular or parallel to the surface normal, making the dot product simple.
  • The surface can be divided into regions where the flux is easy to compute.
Spherical symmetry
Gaussian surface: concentric sphere.
E is radial and constant on the sphere.
Cylindrical symmetry
Gaussian surface: coaxial cylinder.
E is radial and constant on the cylindrical side.
Planar symmetry
Gaussian surface: "pillbox" crossing the plane.
E is perpendicular and constant on each face.

Applying Gauss's Law to Common Symmetries

Below we outline how the electric field formulas (shown in the table) are obtained from Gauss's Law.

Spherical symmetry (point charge or uniform sphere):

E · dA = E · 4πr² = Qenc/ε₀ ⇒ E = Qenc / (4πε₀ r²).
For a point charge, Qenc = Q. For a uniformly charged sphere of radius R, when r < R, Qenc = Q (r³/R³), yielding E = (Q r) / (4πε₀ R³).

Cylindrical symmetry (infinite line charge):

Take a Gaussian cylinder of radius r and length L. Flux through ends is zero (E parallel to ends). Side flux: E · (2πr L) = λL / ε₀ ⇒ E = λ / (2πε₀ r).
For a uniform cylinder of radius R, inside (r < R) we have λenc = λ (r²/R²), so E = (λ r) / (2πε₀ R²).

Planar symmetry (infinite sheet):

Use a pillbox of area A crossing the sheet. Flux through the two faces: 2 E A = σA / ε₀ ⇒ E = σ / (2ε₀), independent of distance.

Gauss's Law vs. Coulomb's Law

Coulomb's Law gives the electric field of a point charge as E = kQ/r². Gauss's Law can be derived from Coulomb's Law, but it is more general: it applies to any closed surface and any charge distribution. In fact, Gauss's Law is equivalent to Coulomb's Law plus the principle of superposition. For symmetric situations, Gauss's Law often provides a much simpler path to the electric field.

Applications of Gauss's Law

  • Electrostatics: Computing E‑fields for spheres, cylinders, planes.
  • Conductors: Proving that excess charge resides on the surface and that the field inside a conductor is zero.
  • Capacitors: Deriving capacitance of parallel‑plate, cylindrical, and spherical capacitors.
  • Shielding: Understanding Faraday cages and electrostatic shielding.
  • Charge distributions with holes: Finding fields in cavities inside conductors.

Calculator Features:

  • Handles inside/outside regions for spherical and cylindrical symmetry
  • Uses vacuum permittivity by default, but you can adjust ε for different media
  • Provides electric field magnitude and direction
  • Visualizes E as a function of distance with a clear marker at your chosen point

Frequently Asked Questions

A Gaussian surface is an imaginary closed surface used to apply Gauss's Law. It is chosen to match the symmetry of the charge distribution so that the electric field is constant over parts of the surface, simplifying the flux integral.

Gauss's Law is most useful when the charge distribution has spherical, cylindrical, or planar symmetry. In these cases, the electric field is constant over a suitably chosen Gaussian surface, allowing easy calculation of the flux.

ε₀ (epsilon naught) is the vacuum permittivity, a fundamental constant approximately 8.854×10⁻¹² F/m. It relates the electric field to charge in free space. In materials, the permittivity is larger, reducing the electric field for the same charge.

For a uniformly charged sphere, the electric field inside is proportional to the distance from the center: E = (Q r) / (4πε₀ R³). Our calculator automatically switches to this formula when you set the sphere's radius R > 0 and r < R.

This calculator assumes uniform charge distributions within the given symmetry. For non-uniform distributions (e.g., ρ varies with r), you would need to integrate, which is beyond the scope of this tool. However, you can still use Gauss's Law in integral form with appropriate Qenc.