The development of transition-metal-alloyed (Ti,Al)N thin films has become a common strategy to achieve optimized mechanical and thermal properties. Selection of a suitable alloying element, however, should consider the effect on Al solubility, directly influencing phase stability during the deposition. Here we use high-throughput ab initio formation enthalpy calculations to assess stability of the cubic (c) vs. hexagonal wurtzite-type (w-) phase of TM-alloyed (Ti,Al,TM)N. This compositionally-limited ab initio dataset serves to fit several machine-learning (ML) models enabling phase stability predictions over the entire compositional range. Of all the models, the linear regression using Magpie feature descriptor pre-processed by a genetic algorithm has the highest accuracy. For Ta, Nb, Mo, and W addition below ∼10 at.%, our ML model predicts enhanced stability of c-(Ti,Al,TM)N due to increased solubility of Al. Other alloying elements, especially Sc and Y from IIIB group and Hf and Zr from IVB group, decrease the cubic metastable solubility limit. In agreement with available experimental data, all transition metals except for Cr and V increase the volume of c-(Ti,Al,TM)N and w-(Ti,Al,TM)N.