Changing the color of light in a small mode volume is essential for applications that require on-chip operation. Microcavities are profound structures given their property to confine light in a small mode volume. Here, I numerically investigate the frequency conversion of light in a microcavity and show that the frequency converted light intensity is distinguished from an open medium such as an optical fiber or a nonlinear crystal. I observe that the frequency converted light intensity increases with increased rate of change of the refractive index of the microcavity. Notably, this study shows that the intensity of the frequency converted light is maximized when the duration of the index perturbation is matched to the cavity storage time. The results provide a set of optimum parameters for increasing frequency conversion efficiency inside a microcavity.