Gauss’s Law: The law relates the flux through any closed surface and the net charge enclosed within the surface. The law states that the total flux of the electric field E over any closed surface is equal to 1/ ε0 times the net charge enclosed by the surface.
φ = q/ ε0
This closed imaginary surface is called Gaussian surface. Gauss’s law tells us that the flux of E through a closed surface S depends only on the value of net charge inside the surface and not on the location of the charges. Charges outside the surface will not contribute to flux.