Gauss’s law states that the Electric flux (ø) through a closed surface S is 1/ ε0 times the total charge enclosed by S.
ø = q/ ε0
Here, q = total charge enclosed by S. The law implies that the total electric flux through a closed surface is zero if no charge is enclosed by the surface.
Proof :
Consider the total flux through a sphere of radius r, which encloses a point charge q at its centre. Divide the sphere into small area elements, as shown in Fig.

The flux through an area element ΔS is

where we have used Coulomb’s law for the electric field due to a single charge q. The unit vector ˆr is along the radius vector from the centre to the area element. Now, since the normal to a sphere at every point is along the radius vector at that point, the area element ∆S and ˆr have the same direction. Therefore,

since the magnitude of a unit vector is 1.
The total flux through the sphere is obtained by adding up flux through all the different area elements:

Since each area element of the sphere is at the same distance r from the charge,

Now S, the total area of the sphere, equals 4πr2. Thus,

which is a simple illustration of a general result of electrostatics called Gauss's law.