With their dramatic improvement of photoconversion efficiency, metal-halide perovskite (MHP) solar cells are receiving great attention. For successful deployment of these materials as next-generation solar cells, many research efforts are being undertaken to develop highly efficient and stable perovskite solar cells. Because compositional engineering in particular has provided a powerful route to optimize the material properties, MHPs with high efficiency and stability often include a number of different components. In this study, using ab initio thermodynamics for ternary mixtures at the A-site (FA, MA, and Cs) and varying Br/I content at the X-site, we provide thermodynamic modeling on how mixtures of different cations and halides at A- and X-sites can modify the stability of MHPs. Our in-depth calculation reveals that Br mixing is inevitable to stabilize the corner-shared perovskite structure of highly efficient FAPbI(3) with low bandgap. To maintain the minimal content of Br, which widens the bandgap, MA co-mixing is required, while Cs mixing contributes to prevent the decomposition of MHPs into precursors. We anticipate that the present study will provide thermodynamic insight into the distinctive roles of different components of MHPs and offer a design guideline for future compositional engineering of MHPs.