The MODerate Resolution Imaging Spectroradiometer (MODIS) has 36 spectral bands with wavelengths from 0.41 to 14.5 micrometers. The 36 spectral bands, with a total of 490 detectors, are distributed on four focal plane assemblies (FPAs): visible (VIS), near infrared (NIR), short- mid-wave infrared (SMIR), and long wave infrared (LWIR). Nearly identical copies of the MODIS are currently operating onboard the NASA EOS Terra (launched on December 18,1999) and Aqua spacecraft (launched on May 4, 2002). Prelaunch and on-orbit characterizations of both Terra and Aqua MODIS have shown small but non-negligible out-of-band (OOB) response in the sensor's short-wave infrared bands (SWIR): bands 5-7, and band 26. To minimize the impact due to OOB response on the MODIS SWIR bands calibration and the Earth scene product retrieval, an algorithm has been developed and implemented in the Level 1B (L1B) software for both Terra and Aqua MODIS. In this paper, we describe the algorithm and its applications to the MODIS L1B calibration algorithms. We illustrate how the correction coefficients are derived from on-orbit observations and discuss the test procedures involved before the final implementation in the L1B code. Performance is evaluated for both Terra and Aqua MODIS and the two results are compared.