A spectral calibration algorithm for the hyperspectral geostationary environmental monitoring spectrometer (GEMS) onboard GEO-KOMPSAT-2B (GK-2B) planned to launch in 2019 has been developed. Although spectral registration for the CCD detector is done by the optical parameters prepared during the ground test of the instrument, the algorithm is applied for the improved spectral accuracy. The prototype algorithm is based on the best fitting of the measured spectrum to the known high resolution reference spectrum such as the solar irradiance. To characterize the prototype algorithm, a series of sensitivity tests for various spectral parameters, such as squeeze, shift, spectral response function, and reference solar spectrum, has been performed. The prototype algorithm shows a minimal sensitive to the uncertainties associated with several parameters such as squeeze, shift, or spectral band. However, the algorithm performance degrades by an order if the spectral response function including its shape has uncertainty. Thus, it is recommended to measure the spectral response function at the ground test as accurately as possible. Furthermore, the prototype algorithm is also highly sensitive to the used reference solar spectrum, which needs further investigation.