The 4f-5d transition of Ce3+ in crystals is used in a variety of optical materials, including scintillators and phosphors. It also has the advantages that the wavelength can be controlled by the coordination environment and that Ce3+ is relatively inexpensive among rare earth elements. For the theoretical design of novel Ce3+-doped phosphors, prediction of 4f-5d transition energy by first-principles molecular orbital calculations using model clusters is effective. In general, increase of the cluster size improves the accuracy of calculations and reduces the difference between the experimental and calculated values while very large clusters have the disadvantage of requiring a huge amount of calculation time. Hence, understanding the cluster size dependence is important to determine the efficient and effective cluster size for the first-principles calculations.In this study we focused on Ce3+-doped in YAlO3, and performed first-principles calculations of the 4f-5d transition energies for model clusters with different sizes. At first, the local structures around the Y3+ site of YAlO3 were cut out from the crystal structure. Then the central Y3+ ions of these clusters were replaced by Ce3+ ions. Then the transition energy of Ce3+ in YAlO3 was calculated by the relativistic discrete-variational Xα (DV-Xα) molecular orbital calculations using the Slater's transition state method. The detailed comparison of the results showed that for clusters larger than a certain size, the error between the experimental and calculated values became negligibly small. For comparison, the lattice relaxation was also taken into account by modifying the model clusters using two different methods: the method based on the Shannon's crystal radii and the structural optimization using the CASTEP code, and the results were compared in detail.