The specific heats of both a two-layer ferromagnetic superlattice and a two-layer ferrimagnetic one are studied. It is found that the spin quantum numbers, the interlayer and intralayer exchange couplings, the anisotropy, the applied magnetic field, and the temperature all affect the specific heat of these superlattices. For both the ferromagnetic and ferrimagnetic superlattices, the specific heat decreases with increasing the spin quantum number, the absolute value of interlayer exchange coupling, intralayer exchange coupling, and anisotropy, while it increases with increasing temperature at low temperatures. When an applied magnetic field is enhanced, the specific heat decreases in the two-layer ferromagnetic superlattice, while it is almost unchanged in the two-layer ferrimagnetic superlattice at low field range at low temperatures.