The general formula for any unsaturated hydrocarbon (alkane) is CnH2n+2. In an alkyl halide, a halogen atom takes the place of one (or more) of the hydrogens. Therefore, for an alkyl halide with a single halogen substituent, the general formula will be:
CnH2n+1X
where X is the particular halide. This formula holds for unsaturated alkyl halides only.