The \ensuremath{\pi}-electronic excitations of graphite layers are studied within the random-phase approximation. They principally reflect the \ensuremath{\pi}-band characteristics, the strong wave-vector dependence, the anisotropic behavior, and the special symmetry. The \ensuremath{\pi} plasmons in graphite have strong dispersion relations with the transferred momentum (q). They behave as an optical plasmon in a three-dimensional electron gas at small q. Moreover, the anisotropic behavior at the plane is apparent at large q. For a single graphite layer, the \ensuremath{\pi} plasmons would disappear at very small q, and their frequencies are obviously reduced. The absence of interlayer Coulomb interactions is the main reason for this. The stage-1 graphite intercalation compounds (GIC's), as compared with graphite, exhibit the richer excitation spectra and the lower \ensuremath{\pi}-plasmon frequencies. They have the intraband plasmon as well as the interband \ensuremath{\pi} plasmon. These two kinds of plasmons are quite different from each other in certain respects, e.g., the cause of the plasmon. The enhanced interlayer distances could effectively reduce the \ensuremath{\pi}-plasmon frequency, but not the transferred charges. The calculated plasmon frequencies are consistent with the experimental measurements on graphite and stage-1 GICs.