Thin-film solar cells with CuIn(x)Ga(1-x)Se2 (CIGS) absorber are still far below their efficiency limit, although lab cells already reach 20.1%. One important aspect is the homogeneity of the alloy. Large-scale simulations combining Monte Carlo and density functional calculations show that two phases coexist in thermal equilibrium below room temperature. Only at higher temperatures, CIGS becomes more and more a homogeneous alloy. A larger degree of inhomogeneity for Ga-rich CIGS persists over a wide temperature range, which contributes to the observed low efficiency of Ga-rich CIGS solar cells.