Thermodynamic calculations of the magnetically induced phase separation of the hcp phase in Co-Cr-based alloy systems, which is the origin of the compositional modulation observed in magnetic recording media, have been carried out. The magnetic and nonmagnetic terms in the Gibbs energy are evaluated from available thermodynamic data and Miedema's semiempirical values. It is demonstrated that the phase separation in Co-Cr-X ternary alloys can be classified into four types, depending on the values of interaction energies between Co and/or Cr and X atoms. Existing magnetic data on Co-Cr-based recording media are discussed in terms of the phase stability of the hcp phases. The present calculations would be useful for development of high-density magnetic recording media.