We quantify the fraction of the cosmic infrared background ( CIB ) that originates from galaxies identified in the UV/optical/near-infrared by stacking 81,250 ( \sim 35.7 arcmin ^ { -2 } ) K -selected sources ( K _ { AB } < 24.0 ) split according to their rest-frame U - V vs . V - J colors into 72,216 star-forming and 9,034 quiescent galaxies , on maps from Spitzer /MIPS ( 24 \mathrm { \upmu } m ) , Herschel /PACS ( 100 , 160 \mathrm { \upmu } m ) , Herschel /SPIRE ( 250 , 350 , 500 \mathrm { \upmu } m ) , and AzTEC ( 1100 \mathrm { \upmu } m ) . The fraction of the CIB resolved by our catalog is ( 69 \pm 15 ) % at 24 \mathrm { \upmu } m , ( 78 \pm 17 ) % at 70 \mathrm { \upmu } m , ( 58 \pm 13 ) % at 100 \mathrm { \upmu } m , ( 78 \pm 18 ) % at 160 \mathrm { \upmu } m , ( 80 \pm 17 ) % at 250 \mathrm { \upmu } m , ( 69 \pm 14 ) % at 350 \mathrm { \upmu } m , ( 65 \pm 12 ) % at 500 \mathrm { \upmu } m , and ( 45 \pm 8 ) % at 1100 \mathrm { \upmu } m. Of that total , about 95 % originates from star-forming galaxies , while the remaining 5 % is from apparently quiescent galaxies . The CIB at \lambda \lower 2.0 pt \hbox { $ { < \atop \hbox { \raise 4.0 pt \hbox { $ \sim$ } } } $ } 200 \mathrm { \upmu } m appears to be sourced predominantly from galaxies at z \lower 2.0 pt \hbox { $ { < \atop \hbox { \raise 4.0 pt \hbox { $ \sim$ } } } $ } 1 , while at \lambda \lower 2.0 pt \hbox { $ { > \atop \hbox { \raise 4.0 pt \hbox { $ \sim$ } } } $ } 200 \mathrm { \upmu } m the bulk originates from 1 \lower 2.0 pt \hbox { $ { < \atop \hbox { \raise 4.0 pt \hbox { $ \sim$ } } } $ } z \lower 2. % 0 pt \hbox { $ { < \atop \hbox { \raise 4.0 pt \hbox { $ \sim$ } } } $ } 2 . Galaxies with stellar masses log ( M / M _ { \odot } ) = 9.5 –11 are responsible for the majority of the CIB , with those in the log ( M / M _ { \odot } ) = 9.5 –10 bin contributing mostly at \lambda < 250 \mathrm { \upmu } m , and those in the log ( M / M _ { \odot } ) = 10 –11 bin dominating at \lambda > 350 \mathrm { \upmu } m. The contribution from galaxies in the log ( M / M _ { \odot } ) = 9.0 –9.5 ( lowest ) and log ( M / M _ { \odot } ) = 11.0 –12.0 ( highest ) stellar-mass bins contribute the least—both of order 5 % —although the highest stellar-mass bin is a significant contributor to the luminosity density at z \lower 2.0 pt \hbox { $ { > \atop \hbox { \raise 4.0 pt \hbox { $ \sim$ } } } $ } 2 . The luminosities of the galaxies responsible for the CIB shifts from combinations of “ normal ” and luminous infrared galaxies ( LIRGs ) at \lambda \lower 2.0 pt \hbox { $ { < \atop \hbox { \raise 4.0 pt \hbox { $ \sim$ } } } $ } 160 \mathrm { \upmu } m , to LIRGs at 160 \lower 2.0 pt \hbox { $ { < \atop \hbox { \raise 4.0 pt \hbox { $ \sim$ } } } $ } \lambda % \lower 2.0 pt \hbox { $ { < \atop \hbox { \raise 4.0 pt \hbox { $ \sim$ } } } $ } 500 \mathrm { \upmu } m , to finally LIRGs and ultra-luminous infrared galaxies ( ULIRGs ) at \lambda \lower 2.0 pt \hbox { $ { > \atop \hbox { \raise 4.0 pt \hbox { $ \sim$ } } } $ } 500 \mathrm { \upmu } m. Stacking analyses were performed using simstack , a novel algorithm designed to account for possible biases in the stacked flux density due to clustering . It is made available to the public at www.astro.caltech.edu/~viero/viero_homepage/toolbox.html .