It is generally difficult to quantify the amounts of light elements in materials because of their low X-ray-scattering power, as this means that they cannot be easily estimated via X-ray analyses. Meanwhile, the recently reported layered superconductor, Sc 20 C 8−x B x C 20 , requires a small amount of boron, which is a light element, for its structural stability. In this context, here, we quantitatively evaluate the optimal x value using both the experimental and computational approaches. Using the highpressure synthesis approach that can maintain the starting composition even after sintering, we obtain the Sc 20 (C,B) 8 C 20 phase by the reaction of the previously reported Sc 15 C 19 and B (Sc 15 B y C 19 ). Our experiments demonstrate that an increase in y values promotes the phase formation of the Sc 20 (C,B) 8 C 20 structure; however, there appears to be an upper limit to the nominal y value to form this phase. The maximum T c (= 7.6 K) is found to correspond with the actual x value of x ∼ 5 under the assumption that the sample with the same T c as the reported value (= 7.7 K) possesses the optimal x amount. Moreover, we construct the energy convex hull diagram by calculating the formation enthalpy based on first principles. Our computational results indicate that the composition of Sc 20 C 4 B 4 C 20 (x = 4) is the most thermodynamically stable, which is reasonably consistent with the experimentally obtained value.