California King Snakes are active, terrestrial snakes that benefit from adequate floor space more than vertical height. The widely accepted minimum enclosure size for an adult king snake is a 40-gallon breeder tank or its equivalent, which provides roughly 36 inches of length by 18 inches of depth. Some keepers house adults comfortably in enclosures as small as 30 gallons, but larger is almost always better for this species. A snake that has room to stretch out, explore, and thermoregulate across a meaningful temperature gradient will display more natural behaviors and tend to be healthier overall.
For hatchlings and juveniles, a smaller enclosure is actually preferable. Young king snakes can become stressed in large, open spaces where they feel exposed and vulnerable. A 10-gallon tank or a small plastic tub with adequate ventilation works well for snakes under a year old. As the snake grows, you can move it into progressively larger enclosures, or skip the intermediate step and provide a well-furnished adult enclosure with plenty of hides and cover to make a young snake feel secure.
Floor space is the priority dimension. California King Snakes are not arboreal and spend the vast majority of their time on or near the ground. Enclosure height of 12 to 18 inches is sufficient for most setups. That said, some king snakes will climb branches and ledges if offered, so a modest amount of vertical furniture is worth including even if the snake is primarily ground-dwelling. Just ensure that any climbing structures are stable and cannot topple onto the snake.
When calculating space, remember that the enclosure footprint will also need to accommodate a warm side, a cool side, at least two hides, a water dish, and substrate. An enclosure that looks spacious when empty can feel cramped once all the essential furnishings are in place. Measure and plan your layout before purchasing to ensure everything fits comfortably without cluttering the space.