Caterpillars typically cocoon (or form a chrysalis) for a period ranging from about 5 to 21 days during their pupal stage, where they transform into butterflies or moths. This duration can vary depending on the species and environmental conditions. For example, most butterflies and moths stay inside their chrysalis or cocoon for between five to 21 days, but in harsh environments like deserts, some can remain in this stage for up to three years waiting for favorable conditions
. Specifically, monarch butterfly chrysalides usually last about 8 to 14 days, with warmer temperatures speeding up the process and cooler temperatures slowing it down
. Painted lady butterflies generally take about 7 to 14 days inside the chrysalis before emerging as adults
. In summary, the cocoon or chrysalis stage for caterpillars generally lasts from about one to three weeks under normal conditions, but can be significantly longer if environmental factors delay emergence