Ionic compounds are always neutral. Since Na loses one electron and has a +1 charge and Cl gains one electron and has a -1 charge, the formula for sodium chloride is NaCl.