CO2 and CCl4 are examples of chemical formulas of nonpolar molecules. In the case of CO2, the polarities of the two carbon-oxygen double bonds cancel, resulting in an overall nonpolar molecule. The Lewis structure of CCl4 shows four polar carbon-chlorine bonds that also cancel, producing a net polarity of zero.
Drawing Lewis structures can help determine whether a molecule is overall polar or nonpolar, although Lewis structures can sometimes be misleading. For example, the Lewis structure of CH2Cl2 depicts the four bonds to the central carbon atom as being arranged symmetrically, giving the false impression that the molecule is nonpolar due to canceling polarities. In reality, this is a polar compound because the two polar carbon-chlorine bonds are not arranged symmetrically and, therefore, do not cancel one another out. Also considering a molecule's geometric sketch can help guard against misleading Lewis structures.
It is not always the case that a molecule is overall nonpolar if it consists of a central atom bonded to two identical atoms. For example, OF2 consists of two fluorine atoms connected to a central oxygen atom, but the molecule is overall nonpolar due to a bent molecular geometry. The bent geometry is the result of the two lone pairs of electrons surrounding the oxygen atom. Another example of a polar molecule with a bent molecular geometry is H2O, or water.