We report on a theoretical investigation of extended planar defects in 3C-, 4H-, 6H-, and 15R-SiC which can be formed without breaking any bonds, covering a wide range of planar defects: twin boundaries, stacking faults, and polytype inclusions. Their electronic structures have been intensively studied using an ab initio supercell approach based on the density functional theory. Stacking fault energies are also calculated using both the supercell method and the axial next-nearest-neighbour Ising model. We discuss the electronic properties and energies of these defects in terms of the geometrical differences of stacking patterns.