The penetration depth of broad spectrum solar irradiation over the wavelength range 300-1,100 nm has been experimentally measured for water and carbon dioxide ices of different grain size ranges. Both of these ice compositions are found on the surface of Mars and have been observed as surface frosts, snow deposits, and ice sheets. The e-folding scale of snow and slab ice has been previously measured, but understanding the behavior between these end-member states is important for modeling the thermal behavior and surface processes associated with ice deposits on Mars, such as grain growth and slab formation via sintering, and carbon dioxide jetting leading to the formation of araneiforms. We find the penetration depth increases in a predictable way with grain size, and an empirical model is given to fit these data, varying with both ice composition and grain size.Plain Language Summary Most water on Mars exists as ice, both on the polar caps and in the subsurface (like permafrost on Earth). Temperatures fall low enough for carbon dioxide to also freeze. Carbon dioxide is the main constituent of Mars' seasonal polar caps. During spring, the increased sunlight results in warming within and sometimes below the ice, resulting in a "Solid-State Greenhouse Effect." This internal heating can cause the ice sheets to break up. Understanding this process requires quantifying the amount of sunlight transmitted through samples of water and carbon dioxide ice. In this paper, we have combined new and previous measurements to achieve an empirical model that predicts the penetration depth of sunlight as a function of the grain size and ice composition. This model may be used to aid the understanding of unusual ice-related features observed on the surface of Mars.